Development

#3605: comments_1_0.patch

You must first sign up to be able to contribute.

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  
    8686 
    8787    $content = $fckeditor->CreateHtml(); 
    8888 
    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="&lt;p&gt;default&lt;/p&gt;"> 
     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="&lt;p&gt;default&lt;/p&gt;"> 
    9292    $content = str_replace('type="hidden"','type="text"',$content); 
    9393 
    9494    return $content; 
  • lib/helper/TextHelper.php

    old new  
    9494 
    9595    if ($excerpt_space) 
    9696    { 
    97       //only cut off at ends where $exceprt_string is added 
     97      // only cut off at ends where $exceprt_string is added 
    9898      if($prefix) 
    9999      { 
    100100        $excerpt = preg_replace('/^(\S+)?\s+?/', ' ', $excerpt); 
  • lib/i18n/util.php

    old new  
    151151    $from = strtoupper($from); 
    152152    if ($from != 'UTF-8') 
    153153    { 
    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 
    156157    } 
    157158 
    158159    return $string; 
     
    170171    if ($to != 'UTF-8') 
    171172    { 
    172173      $s = iconv('UTF-8', $to, $string); 
     174 
    173175      return $s !== false ? $s : $string; 
    174176    } 
    175177 
  • lib/util/sfFillInForm.class.php

    old new  
    4646 
    4747    $noHead = strpos($html,'<head>') === false; 
    4848    if ($noHead){ 
    49       //loadHTML needs the conent-type meta for the charset 
     49      // loadHTML needs the conent-type meta for the charset 
    5050      $html = '<meta http-equiv="Content-Type" content="text/html; charset='.sfConfig::get('sf_charset').'"/>'.$html; 
    5151    } 
    5252 
     
    5454    $dom = $this->fillInDom($dom, $formName, $formId, $values); 
    5555 
    5656    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. 
    5858      $headElement = $dom->getElementsByTagName('head')->item(0); 
    5959      if ($headElement) 
    6060      { 
     
    172172      } 
    173173      else if ($element->nodeName == 'select') 
    174174      { 
    175         //if the name contains [] it is part of an array that needs to be shifted 
     175        // if the name contains [] it is part of an array that needs to be shifted 
    176176        $value    = $this->getValue($values, $name, strpos($name,'[]') !== false); 
    177177        $multiple = $element->hasAttribute('multiple'); 
    178178        foreach ($xpath->query('descendant::'.$ns.'option', $element) as $option) 
     
    206206    return null !== sfToolkit::getArrayValueForPath($values, $name); 
    207207  } 
    208208 
    209   //use reference to values so that arrays can be shifted. 
     209  // use reference to values so that arrays can be shifted. 
    210210  protected function getValue(&$values, $name, $shiftArray = false) 
    211211  { 
    212212    if (array_key_exists($name, $values)) 
     
    214214      $return = $values[$name]; 
    215215      if ($shiftArray && is_array($return)) 
    216216      { 
    217         //we need to remove the first element from the array. Therefore we need a reference 
     217        // we need to remove the first element from the array. Therefore we need a reference 
    218218        $arrayRef = &$values[$name]; 
    219219        $return = array_shift($arrayRef); 
    220220      }