Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

1498
 
1512
 
1512
 
language.php
_> 4141 
  4242       $this->set($language);
  4343 
<> 44 -      $this->_definitions = $this->_parseIniFile();
  45 -
  46 -      $this->load(basename($_SERVER['SCRIPT_FILENAME']));
   44+      $this->loadIniFile();
   45+      $this->loadIniFile(basename($_SERVER['SCRIPT_FILENAME']));
4746     }
<> 48 -
  49 -/* Public methods */
  50 -
  51 -    function load($filename) {
  52 -      $this->_definitions = array_merge($this->_definitions, $this->_parseIniFile($filename));
  53 -    }
  54 -
  55 -/* Private methods */
  56 -
  57 -    function _parseIniFile($filename = '', $comment = '#') {
  58 -      if (empty($filename)) {
  59 -        $contents = file('includes/languages/' . $this->getCode() . '.php');
  60 -      } else {
  61 -        if (file_exists('includes/languages/' . $this->getCode() . '/' . $filename) === false) {
  62 -          return array();
  63 -        }
  64 -
  65 -        $contents = file('includes/languages/' . $this->getCode() . '/' . $filename);
  66 -      }
  67 -
  68 -      $ini_array = array();
  69 -
  70 -      foreach ($contents as $line) {
  71 -        $line = trim($line);
  72 -
  73 -        $firstchar = substr($line, 0, 1);
  74 -
  75 -        if (!empty($line) && ($firstchar != $comment)) {
  76 -          $delimiter = strpos($line, '=');
  77 -
  78 -          if ($delimiter !== false) {
  79 -            $key = trim(substr($line, 0, $delimiter));
  80 -            $value = trim(substr($line, $delimiter + 1));
  81 -
  82 -            $ini_array[$key] = $value;
  83 -          } elseif (isset($key)) {
  84 -            $ini_array[$key] .= trim($line);
  85 -          }
  86 -        }
  87 -      }
  88 -
  89 -      unset($contents);
  90 -
  91 -      return $ini_array;
  92 -    }
<_ 9347   }
  9448 ?>