Ticket #3605: comments_1_1.patch
| File comments_1_1.patch, 4.2 kB (added by gordon, 8 months ago) |
|---|
-
lib/helper/JavascriptHelper.php
old new 866 866 $javascript .= "'$field_id', "; 867 867 $javascript .= _array_or_string_for_javascript(url_for($url)); 868 868 869 // translate symfony option names to InPlaceEditor options869 // translate symfony option names to InPlaceEditor options 870 870 if (isset($options['cancel_text'])) 871 871 { 872 872 $options['cancelText'] = _array_or_string_for_javascript($options['cancel_text']); -
lib/helper/sfRichTextEditorFCK.class.php
old new 85 85 86 86 $content = $fckeditor->CreateHtml(); 87 87 88 // fix for http://trac.symfony-project.com/ticket/73289 // fields need to be of type text to be picked up by fillin. they are hidden by inline css anyway:90 // <input type="hidden" id="name" name="name" style="display:none" value="<p>default</p>">88 // fix for http://trac.symfony-project.com/ticket/732 89 // fields need to be of type text to be picked up by fillin. they are hidden by inline css anyway: 90 // <input type="hidden" id="name" name="name" style="display:none" value="<p>default</p>"> 91 91 $content = str_replace('type="hidden"','type="text"',$content); 92 92 93 93 return $content; -
lib/plugins/sfCompat10Plugin/lib/util/sfFillInForm.class.php
old new 46 46 47 47 $noHead = strpos($html,'<head>') === false; 48 48 if ($noHead){ 49 // loadHTML needs the conent-type meta for the charset49 // loadHTML needs the conent-type meta for the charset 50 50 $html = '<meta http-equiv="Content-Type" content="text/html; charset='.sfConfig::get('sf_charset').'"/>'.$html; 51 51 } 52 52 … … 54 54 $dom = $this->fillInDom($dom, $formName, $formId, $values); 55 55 56 56 if($noHead){ 57 // remove the head element that was created by adding the meta tag.57 // remove the head element that was created by adding the meta tag. 58 58 $headElement = $dom->getElementsByTagName('head')->item(0); 59 59 if ($headElement) 60 60 { … … 172 172 } 173 173 else if ($element->nodeName == 'select') 174 174 { 175 // if the name contains [] it is part of an array that needs to be shifted175 // if the name contains [] it is part of an array that needs to be shifted 176 176 $value = $this->getValue($values, $name, strpos($name,'[]') !== false); 177 177 $multiple = $element->hasAttribute('multiple'); 178 178 foreach ($xpath->query('descendant::'.$ns.'option', $element) as $option) … … 206 206 return null !== sfToolkit::getArrayValueForPath($values, $name); 207 207 } 208 208 209 // use reference to values so that arrays can be shifted.209 // use reference to values so that arrays can be shifted. 210 210 protected function getValue(&$values, $name, $shiftArray = false) 211 211 { 212 212 if (array_key_exists($name, $values)) … … 214 214 $return = $values[$name]; 215 215 if ($shiftArray && is_array($return)) 216 216 { 217 // we need to remove the first element from the array. Therefore we need a reference217 // we need to remove the first element from the array. Therefore we need a reference 218 218 $arrayRef = &$values[$name]; 219 219 $return = array_shift($arrayRef); 220 220 } -
lib/util/sfToolkit.class.php
old new 705 705 $from = strtoupper($from); 706 706 if ($from != 'UTF-8') 707 707 { 708 $s = iconv($from,'UTF-8',$string); //to UTF-8708 $s = iconv($from,'UTF-8',$string); // to UTF-8 709 709 710 return $s !== false ? $s : $string; // it could return false710 return $s !== false ? $s : $string; // it could return false 711 711 } 712 712 713 713 return $string;