Revision 1970
Added by Luisehahne about 12 years ago
| Lib.php | ||
|---|---|---|
| 26 | 26 | * @copyright Werner v.d.Decken <wkl@isteam.de> | 
| 27 | 27 | * @license http://www.gnu.org/licenses/gpl.html GPL License | 
| 28 | 28 | * @version 1.6.8 | 
| 29 |  * @revision     $Revision: $
 | |
| 30 |  * @link         $HeadURL: $
 | |
| 31 |  * @lastmodified $Date: $
 | |
| 29 | * @revision $Revision$ | |
| 30 | * @link $HeadURL$ | |
| 31 | * @lastmodified $Date$ | |
| 32 | 32 | * @since File available since 09.01.2013 | 
| 33 | 33 | * @description provides a flexible posibility for changeing to a translated page | 
| 34 | 34 | */ | 
| ... | ... | |
| 62 | 62 | $this->_oApp = (isset($GLOBALS['admin']) ? $GLOBALS['admin'] : $GLOBALS['wb']); | 
| 63 | 63 | $this->_oDb = WbDatabase::getInstance(); | 
| 64 | 64 | $this->_oReg = WbAdaptor::getInstance(); | 
| 65 | 		$this->_config      = parse_ini_file(dirname(__FILE__).'/default.ini',true);
 | |
| 65 | 		$this->_config      = $this->_aConfig = $this->getConfig((dirname(__FILE__)).'/default.ini');
 | |
| 66 | 66 | $this->_aTwigEnv = $this->_config['twig-environment']; | 
| 67 | 67 | $this->_aTwigLoader = $this->_config['twig-loader-file']; | 
| 68 | 68 | } | 
| ... | ... | |
| 185 | 185 | } | 
| 186 | 186 |  | 
| 187 | 187 |  | 
| 188 | protected function getConfig($sFilename) | |
| 189 |     {
 | |
| 190 |         if(is_readable($sFilename)){
 | |
| 191 | return parse_ini_file($sFilename, true); | |
| 192 |         }else {
 | |
| 193 | return null; | |
| 194 | } | |
| 195 | } | |
| 188 | 196 |  | 
| 197 |  | |
| 189 | 198 | private function _getAllowedLanguagesFromAddons($sLangKey='') | 
| 190 | 199 | 	{
 | 
| 191 | 200 | $aLangAddons = array(); | 
| ... | ... | |
| 300 | 309 | // fill page_code with page_id for default_language | 
| 301 | 310 | while( list( $page_id, $val ) = each ( $entries ) ) | 
| 302 | 311 | 		{
 | 
| 303 | 			if( $val['language'] == $this->_oReg->DefaultLangauage ) {
 | |
| 312 | 			if( $val['language'] == $this->_oReg->DefaultLanguage ) {
 | |
| 304 | 313 | 				if( ($retVal = $this->_updatePageCode((int)$page_id, 'pages', (int)$page_id ))==false ){ break;  }
 | 
| 305 | 314 | } | 
| 306 | 315 | } | 
| 307 | 316 | |
Also available in: Unified diff
! Pages settings fix output page_code treelist (not ready yet)