Ticket #3605: comments_1_0.patch
| File comments_1_0.patch, 4.1 kB (added by gordon, 8 months ago) |
|---|
-
lib/helper/sfRichTextEditorFCK.class.php
old new 86 86 87 87 $content = $fckeditor->CreateHtml(); 88 88 89 // fix for http://trac.symfony-project.com/ticket/73290 // fields need to be of type text to be picked up by fillin. they are hidden by inline css anyway:91 // <input type="hidden" id="name" name="name" style="display:none" value="<p>default</p>">89 // fix for http://trac.symfony-project.com/ticket/732 90 // fields need to be of type text to be picked up by fillin. they are hidden by inline css anyway: 91 // <input type="hidden" id="name" name="name" style="display:none" value="<p>default</p>"> 92 92 $content = str_replace('type="hidden"','type="text"',$content); 93 93 94 94 return $content; -
lib/helper/TextHelper.php
old new 94 94 95 95 if ($excerpt_space) 96 96 { 97 // only cut off at ends where $exceprt_string is added97 // only cut off at ends where $exceprt_string is added 98 98 if($prefix) 99 99 { 100 100 $excerpt = preg_replace('/^(\S+)?\s+?/', ' ', $excerpt); -
lib/i18n/util.php
old new 151 151 $from = strtoupper($from); 152 152 if ($from != 'UTF-8') 153 153 { 154 $s = iconv($from,'UTF-8',$string); //to UTF-8 155 return $s !== false ? $s : $string; //it could return false 154 $s = iconv($from,'UTF-8',$string); // to UTF-8 155 156 return $s !== false ? $s : $string; // it could return false 156 157 } 157 158 158 159 return $string; … … 170 171 if ($to != 'UTF-8') 171 172 { 172 173 $s = iconv('UTF-8', $to, $string); 174 173 175 return $s !== false ? $s : $string; 174 176 } 175 177 -
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 }