equal
deleted
inserted
replaced
152 // all done fetching |
152 // all done fetching |
153 $this->merge($strings); |
153 $this->merge($strings); |
154 } |
154 } |
155 else |
155 else |
156 { |
156 { |
157 $db->_die('lang.php - No strings for language ' . $this->lang_code); |
157 if ( !defined('ENANO_ALLOW_LOAD_NOLANG') ) |
|
158 $db->_die('lang.php - No strings for language ' . $this->lang_code); |
158 } |
159 } |
159 } |
160 } |
160 } |
161 } |
161 |
162 |
162 /** |
163 /** |
212 { |
213 { |
213 global $db, $session, $paths, $template, $plugins; // Common objects |
214 global $db, $session, $paths, $template, $plugins; // Common objects |
214 |
215 |
215 if ( !file_exists($file) ) |
216 if ( !file_exists($file) ) |
216 $db->_die('lang.php - can\'t import language file: string file doesn\'t exist'); |
217 $db->_die('lang.php - can\'t import language file: string file doesn\'t exist'); |
|
218 |
|
219 if ( $this->lang_id == 0 ) |
|
220 $db->_die('lang.php - BUG: trying to perform import when $lang->lang_id == 0'); |
217 |
221 |
218 $contents = trim(@file_get_contents($file)); |
222 $contents = trim(@file_get_contents($file)); |
219 |
223 |
220 if ( empty($contents) ) |
224 if ( empty($contents) ) |
221 $db->_die('lang.php - can\'t load the contents of the language file'); |
225 $db->_die('lang.php - can\'t load the contents of the language file'); |