Changeset 559
- Timestamp:
- 08/29/07 22:48:36 (1 year ago)
- Files:
-
- trunk/lib/jelix-modules/junittests/classes/jhtmlrespreporter.class.php (modified) (1 diff)
- trunk/lib/jelix-modules/junittests/classes/jhtmlrespreporter.class.php (modified) (1 diff)
- trunk/lib/jelix-scripts/templates/var/config/cmdline/config.ini.php.tpl (modified) (1 diff)
- trunk/lib/jelix-scripts/templates/var/config/cmdline/config.ini.php.tpl (modified) (1 diff)
- trunk/lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl (modified) (2 diffs)
- trunk/lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl (modified) (2 diffs)
- trunk/lib/jelix-scripts/templates/var/config/index/config.ini.php.tpl (modified) (1 diff)
- trunk/lib/jelix-scripts/templates/var/config/index/config.ini.php.tpl (modified) (1 diff)
- trunk/lib/jelix-scripts/templates/var/config/jsonrpc/config.ini.php.tpl (modified) (1 diff)
- trunk/lib/jelix-scripts/templates/var/config/jsonrpc/config.ini.php.tpl (modified) (1 diff)
- trunk/lib/jelix-scripts/templates/var/config/xmlrpc/config.ini.php.tpl (modified) (1 diff)
- trunk/lib/jelix-scripts/templates/var/config/xmlrpc/config.ini.php.tpl (modified) (1 diff)
- trunk/lib/jelix/core-modules/jelix/controllers/help.cmdline.php (modified) (1 diff)
- trunk/lib/jelix/core-modules/jelix/controllers/help.cmdline.php (modified) (1 diff)
- trunk/lib/jelix/core/defaultconfig.ini.php (modified) (2 diffs)
- trunk/lib/jelix/core/defaultconfig.ini.php (modified) (2 diffs)
- trunk/lib/jelix/core/jConfigCompiler.class.php (modified) (6 diffs)
- trunk/lib/jelix/core/jConfigCompiler.class.php (modified) (6 diffs)
- trunk/lib/jelix/core/jCoordinator.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/jCoordinator.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/jLocale.class.php (modified) (5 diffs)
- trunk/lib/jelix/core/jLocale.class.php (modified) (5 diffs)
- trunk/lib/jelix/core/jSelector.class.php (modified) (5 diffs)
- trunk/lib/jelix/core/jSelector.class.php (modified) (5 diffs)
- trunk/lib/jelix/core/request/jCmdLineRequest.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/request/jCmdLineRequest.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/response/jResponseCss.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/response/jResponseCss.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/response/jResponseHtml.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseHtml.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseLatexToPdf.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseLatexToPdf.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseRdf.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/response/jResponseRdf.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/response/jResponseText.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/response/jResponseText.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/response/jResponseXml.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseXml.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseXmlFeed.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseXmlFeed.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseXmlrpc.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/response/jResponseXmlrpc.class.php (modified) (2 diffs)
- trunk/lib/jelix/core/response/jResponseXul.class.php (modified) (4 diffs)
- trunk/lib/jelix/core/response/jResponseXul.class.php (modified) (4 diffs)
- trunk/lib/jelix/core/response/jResponseZip.class.php (modified) (1 diff)
- trunk/lib/jelix/core/response/jResponseZip.class.php (modified) (1 diff)
- trunk/lib/jelix/dao/jDaoBase.class.php (modified) (1 diff)
- trunk/lib/jelix/dao/jDaoBase.class.php (modified) (1 diff)
- trunk/lib/jelix/db/jDbPDOConnection.class.php (modified) (1 diff)
- trunk/lib/jelix/db/jDbPDOConnection.class.php (modified) (1 diff)
- trunk/lib/jelix/forms/jFormsCompiler.class.php (modified) (1 diff)
- trunk/lib/jelix/forms/jFormsCompiler.class.php (modified) (1 diff)
- trunk/lib/jelix/plugins/coord/autolocale/autolocale.coord.php (modified) (1 diff)
- trunk/lib/jelix/plugins/coord/autolocale/autolocale.coord.php (modified) (1 diff)
- trunk/lib/jelix/plugins/db/mysql/mysql.dbconnection.php (modified) (1 diff)
- trunk/lib/jelix/plugins/db/mysql/mysql.dbconnection.php (modified) (1 diff)
- trunk/lib/jelix/plugins/db/postgresql/postgresql.dbconnection.php (modified) (1 diff)
- trunk/lib/jelix/plugins/db/postgresql/postgresql.dbconnection.php (modified) (1 diff)
- trunk/lib/jelix/plugins/tpl/html/meta.html.php (modified) (1 diff)
- trunk/lib/jelix/plugins/tpl/html/meta.html.php (modified) (1 diff)
- trunk/lib/jelix/plugins/tpl/xul/meta.xul.php (modified) (1 diff)
- trunk/lib/jelix/plugins/tpl/xul/meta.xul.php (modified) (1 diff)
- trunk/lib/jelix/tpl/jTpl.class.php (modified) (1 diff)
- trunk/lib/jelix/tpl/jTpl.class.php (modified) (1 diff)
- trunk/lib/jelix/utils/jDatatype.class.php (modified) (1 diff)
- trunk/lib/jelix/utils/jDatatype.class.php (modified) (1 diff)
- trunk/lib/jelix/utils/jMailer.class.php (modified) (1 diff)
- trunk/lib/jelix/utils/jMailer.class.php (modified) (1 diff)
- trunk/myapp/var/config/defaultconfig.ini.php.dist (modified) (2 diffs)
- trunk/myapp/var/config/defaultconfig.ini.php.dist (modified) (2 diffs)
- trunk/myapp/var/config/index/config.ini.php.dist (modified) (1 diff)
- trunk/myapp/var/config/index/config.ini.php.dist (modified) (1 diff)
- trunk/testapp/modules/jelix_tests/tests/jforms.compiler.html.php (modified) (3 diffs)
- trunk/testapp/modules/jelix_tests/tests/jforms.compiler.html.php (modified) (3 diffs)
- trunk/testapp/var/config/defaultconfig.ini.php.dist (modified) (2 diffs)
- trunk/testapp/var/config/defaultconfig.ini.php.dist (modified) (2 diffs)
- trunk/testapp/var/config/index/config.ini.php.dist (modified) (1 diff)
- trunk/testapp/var/config/index/config.ini.php.dist (modified) (1 diff)
- trunk/testapp/var/config/jsonrpc/config.ini.php.dist (modified) (1 diff)
- trunk/testapp/var/config/jsonrpc/config.ini.php.dist (modified) (1 diff)
- trunk/testapp/var/config/xmlrpc/config.ini.php.dist (modified) (1 diff)
- trunk/testapp/var/config/xmlrpc/config.ini.php.dist (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jelix-modules/junittests/classes/jhtmlrespreporter.class.php
r504 r559 102 102 function _htmlEntities($message) { 103 103 global $gJConfig; 104 return htmlentities($message, ENT_COMPAT, $gJConfig-> defaultCharset);104 return htmlentities($message, ENT_COMPAT, $gJConfig->charset); 105 105 } 106 106 } trunk/lib/jelix-modules/junittests/classes/jhtmlrespreporter.class.php
r504 r559 102 102 function _htmlEntities($message) { 103 103 global $gJConfig; 104 return htmlentities($message, ENT_COMPAT, $gJConfig-> defaultCharset);104 return htmlentities($message, ENT_COMPAT, $gJConfig->charset); 105 105 } 106 106 } trunk/lib/jelix-scripts/templates/var/config/cmdline/config.ini.php.tpl
r256 r559 2 2 ;for security reasons , don't remove or modify the first line 3 3 4 defaultAction = "default_index" 4 startModule = "{$appname}" 5 startAction = "default_index" trunk/lib/jelix-scripts/templates/var/config/cmdline/config.ini.php.tpl
r256 r559 2 2 ;for security reasons , don't remove or modify the first line 3 3 4 defaultAction = "default_index" 4 startModule = "{$appname}" 5 startAction = "default_index" trunk/lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl
r479 r559 2 2 ;for security reasons , don't remove or modify the first line 3 3 4 defaultModule = "{$appname}" 5 defaultAction = "default_index" 6 defaultLocale = "fr_FR" 7 defaultCharset = "UTF-8" 4 5 locale = "fr_FR" 6 charset = "UTF-8" 8 7 9 8 ; see http://www.php.net/manual/en/timezones.php for supported values 10 defaultTimeZone = "Europe/Paris"9 timeZone = "Europe/Paris" 11 10 12 11 checkTrustedModules = off … … 18 17 modulesPath = lib:jelix-modules/,app:modules/ 19 18 20 dbProfils = dbprofils.ini.php 21 22 defaultTheme = default 19 theme = default 23 20 24 21 [plugins] trunk/lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl
r479 r559 2 2 ;for security reasons , don't remove or modify the first line 3 3 4 defaultModule = "{$appname}" 5 defaultAction = "default_index" 6 defaultLocale = "fr_FR" 7 defaultCharset = "UTF-8" 4 5 locale = "fr_FR" 6 charset = "UTF-8" 8 7 9 8 ; see http://www.php.net/manual/en/timezones.php for supported values 10 defaultTimeZone = "Europe/Paris"9 timeZone = "Europe/Paris" 11 10 12 11 checkTrustedModules = off … … 18 17 modulesPath = lib:jelix-modules/,app:modules/ 19 18 20 dbProfils = dbprofils.ini.php 21 22 defaultTheme = default 19 theme = default 23 20 24 21 [plugins] trunk/lib/jelix-scripts/templates/var/config/index/config.ini.php.tpl
r256 r559 2 2 ;for security reasons , don't remove or modify the first line 3 3 4 defaultAction = "default_index" 4 startModule = "{$appname}" 5 startAction = "default_index" 6 5 7 [plugins] 6 8 ;nom = nom_fichier_ini trunk/lib/jelix-scripts/templates/var/config/index/config.ini.php.tpl
r256 r559 2 2 ;for security reasons , don't remove or modify the first line 3 3 4 defaultAction = "default_index" 4 startModule = "{$appname}" 5 startAction = "default_index" 6 5 7 [plugins] 6 8 ;nom = nom_fichier_ini trunk/lib/jelix-scripts/templates/var/config/jsonrpc/config.ini.php.tpl
r256 r559 2 2 ;for security reasons , don't remove or modify the first line 3 3 4 defaultAction = "default_index" 4 startModule = "{$appname}" 5 startAction = "default_index" 5 6 6 7 [plugins] trunk/lib/jelix-scripts/templates/var/config/jsonrpc/config.ini.php.tpl
r256 r559 2 2 ;for security reasons , don't remove or modify the first line 3 3 4 defaultAction = "default_index" 4 startModule = "{$appname}" 5 startAction = "default_index" 5 6 6 7 [plugins] trunk/lib/jelix-scripts/templates/var/config/xmlrpc/config.ini.php.tpl
r256 r559 2 2 ;for security reasons , don't remove or modify the first line 3 3 4 defaultAction = "default_index" 4 startModule = "{$appname}" 5 startAction = "default_index" 5 6 6 7 [plugins] trunk/lib/jelix-scripts/templates/var/config/xmlrpc/config.ini.php.tpl
r256 r559 2 2 ;for security reasons , don't remove or modify the first line 3 3 4 defaultAction = "default_index" 4 startModule = "{$appname}" 5 startAction = "default_index" 5 6 6 7 [plugins] trunk/lib/jelix/core-modules/jelix/controllers/help.cmdline.php
r386 r559 38 38 } else { 39 39 if (!preg_match('/(?:([\w\.]+)~)/', $cmd_name)) { 40 $cmd_name = $gJConfig-> defaultModule.'~'.$cmd_name;40 $cmd_name = $gJConfig->startModule.'~'.$cmd_name; 41 41 } 42 42 $selector = new jSelectorAct($cmd_name); trunk/lib/jelix/core-modules/jelix/controllers/help.cmdline.php
r386 r559 38 38 } else { 39 39 if (!preg_match('/(?:([\w\.]+)~)/', $cmd_name)) { 40 $cmd_name = $gJConfig-> defaultModule.'~'.$cmd_name;40 $cmd_name = $gJConfig->startModule.'~'.$cmd_name; 41 41 } 42 42 $selector = new jSelectorAct($cmd_name); trunk/lib/jelix/core/defaultconfig.ini.php
r516 r559 2 2 ;for security reasons , don't remove or modify the first line 3 3 4 defaultModule = "jelix"5 defaultAction = "default_index"6 defaultLocale = "fr_FR"7 defaultCharset = "UTF-8"8 defaultTimeZone = "Europe/Paris"4 startModule = "jelix" 5 startAction = "default_index" 6 locale = "fr_FR" 7 charset = "UTF-8" 8 timeZone = "Europe/Paris" 9 9 10 10 checkTrustedModules = off … … 18 18 dbProfils = dbprofils.ini.php 19 19 20 defaultTheme = default20 theme = default 21 21 use_error_handler = on 22 22 shared_session = off trunk/lib/jelix/core/defaultconfig.ini.php
r516 r559 2 2 ;for security reasons , don't remove or modify the first line 3 3 4 defaultModule = "jelix"5 defaultAction = "default_index"6 defaultLocale = "fr_FR"7 defaultCharset = "UTF-8"8 defaultTimeZone = "Europe/Paris"4 startModule = "jelix" 5 startAction = "default_index" 6 locale = "fr_FR" 7 charset = "UTF-8" 8 timeZone = "Europe/Paris" 9 9 10 10 checkTrustedModules = off … … 18 18 dbProfils = dbprofils.ini.php 19 19 20 defaultTheme = default20 theme = default 21 21 use_error_handler = on 22 22 shared_session = off trunk/lib/jelix/core/jConfigCompiler.class.php
r516 r559 41 41 } 42 42 $config->isWindows = (substr(PHP_OS,0,3) == 'WIN'); 43 if(trim( $config-> defaultAction) == '')44 $config-> defaultAction = '_';43 if(trim( $config->startAction) == '') 44 $config->startAction = '_'; 45 45 46 46 $config->_allBasePath = array(); … … 66 66 67 67 68 /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config-> defaultLocale,$m)){68 /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config->locale,$m)){ 69 69 if(!isset($m[2])){ 70 70 $m[2] = $m[1]; … … 72 72 $config->defaultLang = strtolower($m[1]); 73 73 $config->defaultCountry = strtoupper($m[2]); 74 $config-> defaultLocale = $config->defaultLang.'_'.$config->defaultCountry;75 }else{ 76 die("Syntax error in the defaultLocale parameter in Jelix config file $configFile !");74 $config->locale = $config->defaultLang.'_'.$config->defaultCountry; 75 }else{ 76 die("Syntax error in the locale parameter in Jelix config file $configFile !"); 77 77 }*/ 78 78 #else … … 91 91 } 92 92 $config['isWindows'] = (substr(PHP_OS,0,3) == 'WIN'); 93 if(trim( $config[' defaultAction']) == '')94 $config[' defaultAction'] = '_';93 if(trim( $config['startAction']) == '') 94 $config['startAction'] = '_'; 95 95 96 96 $config['_allBasePath'] = array(); … … 114 114 $config['urlengine']['jelixWWWPath'] = $path.$config['urlengine']['jelixWWWPath']; 115 115 116 /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config[' defaultLocale'],$m)){116 /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config['locale'],$m)){ 117 117 if(!isset($m[2])){ 118 118 $m[2] = $m[1]; … … 120 120 $config['defaultLang'] = strtolower($m[1]); 121 121 $config['defaultCountry'] = strtoupper($m[2]); 122 $config[' defaultLocale'] = $config['defaultLang'].'_'.$config['defaultCountry'];123 }else{ 124 die("Syntax error in the defaultLocale parameter in Jelix config file $configFile !");122 $config['locale'] = $config['defaultLang'].'_'.$config['defaultCountry']; 123 }else{ 124 die("Syntax error in the locale parameter in Jelix config file $configFile !"); 125 125 }*/ 126 126 #endif trunk/lib/jelix/core/jConfigCompiler.class.php
r516 r559 41 41 } 42 42 $config->isWindows = (substr(PHP_OS,0,3) == 'WIN'); 43 if(trim( $config-> defaultAction) == '')44 $config-> defaultAction = '_';43 if(trim( $config->startAction) == '') 44 $config->startAction = '_'; 45 45 46 46 $config->_allBasePath = array(); … … 66 66 67 67 68 /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config-> defaultLocale,$m)){68 /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config->locale,$m)){ 69 69 if(!isset($m[2])){ 70 70 $m[2] = $m[1]; … … 72 72 $config->defaultLang = strtolower($m[1]); 73 73 $config->defaultCountry = strtoupper($m[2]); 74 $config-> defaultLocale = $config->defaultLang.'_'.$config->defaultCountry;75 }else{ 76 die("Syntax error in the defaultLocale parameter in Jelix config file $configFile !");74 $config->locale = $config->defaultLang.'_'.$config->defaultCountry; 75 }else{ 76 die("Syntax error in the locale parameter in Jelix config file $configFile !"); 77 77 }*/ 78 78 #else … … 91 91 } 92 92 $config['isWindows'] = (substr(PHP_OS,0,3) == 'WIN'); 93 if(trim( $config[' defaultAction']) == '')94 $config[' defaultAction'] = '_';93 if(trim( $config['startAction']) == '') 94 $config['startAction'] = '_'; 95 95 96 96 $config['_allBasePath'] = array(); … … 114 114 $config['urlengine']['jelixWWWPath'] = $path.$config['urlengine']['jelixWWWPath']; 115 115 116 /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config[' defaultLocale'],$m)){116 /*if(preg_match("/^([a-zA-Z]{2})(?:_([a-zA-Z]{2}))?$/",$config['locale'],$m)){ 117 117 if(!isset($m[2])){ 118 118 $m[2] = $m[1]; … … 120 120 $config['defaultLang'] = strtolower($m[1]); 121 121 $config['defaultCountry'] = strtoupper($m[2]); 122 $config[' defaultLocale'] = $config['defaultLang'].'_'.$config['defaultCountry'];123 }else{ 124 die("Syntax error in the defaultLocale parameter in Jelix config file $configFile !");122 $config['locale'] = $config['defaultLang'].'_'.$config['defaultCountry']; 123 }else{ 124 die("Syntax error in the locale parameter in Jelix config file $configFile !"); 125 125 }*/ 126 126 #endif trunk/lib/jelix/core/jCoordinator.class.php
r489 r559 92 92 #if PHP50 93 93 if(function_exists('date_default_timezone_set')){ 94 date_default_timezone_set($gJConfig-> defaultTimeZone);94 date_default_timezone_set($gJConfig->timeZone); 95 95 } 96 96 #else 97 date_default_timezone_set($gJConfig-> defaultTimeZone);97 date_default_timezone_set($gJConfig->timeZone); 98 98 #endif 99 99 $this->_loadPlugins(); … … 159 159 160 160 if(empty($this->moduleName)){ 161 $this->moduleName = $gJConfig->defaultModule; 162 if(empty($this->actionName)) 163 $this->actionName = $gJConfig->defaultAction; 161 $this->moduleName = $gJConfig->startModule; 164 162 } 165 163 if(empty($this->actionName)){ 166 $this->actionName = 'default_index'; 164 if($this->moduleName == $gJConfig->startModule) 165 $this->actionName = $gJConfig->startAction; 166 else 167 $this->actionName = 'default_index'; 167 168 } 168 169 trunk/lib/jelix/core/jCoordinator.class.php
r489 r559 92 92 #if PHP50 93 93 if(function_exists('date_default_timezone_set')){ 94 date_default_timezone_set($gJConfig-> defaultTimeZone);94 date_default_timezone_set($gJConfig->timeZone); 95 95 } 96 96 #else 97 date_default_timezone_set($gJConfig-> defaultTimeZone);97 date_default_timezone_set($gJConfig->timeZone); 98 98 #endif 99 99 $this->_loadPlugins(); … … 159 159 160 160 if(empty($this->moduleName)){ 161 $this->moduleName = $gJConfig->defaultModule; 162 if(empty($this->actionName)) 163 $this->actionName = $gJConfig->defaultAction; 161 $this->moduleName = $gJConfig->startModule; 164 162 } 165 163 if(empty($this->actionName)){ 166 $this->actionName = 'default_index'; 164 if($this->moduleName == $gJConfig->startModule) 165 $this->actionName = $gJConfig->startAction; 166 else 167 $this->actionName = 'default_index'; 167 168 } 168 169 trunk/lib/jelix/core/jLocale.class.php
r378 r559 47 47 48 48 if($charset == null){ 49 $charset = $GLOBALS['gJConfig']-> defaultCharset;49 $charset = $GLOBALS['gJConfig']->charset; 50 50 } 51 51 if (!in_array ($charset, $this->_loadedCharset)){ … … 177 177 */ 178 178 static function getCurrentLang(){ 179 $s=$GLOBALS['gJConfig']-> defaultLocale;179 $s=$GLOBALS['gJConfig']->locale; 180 180 return substr($s,0, strpos($s,'_')); 181 181 } … … 185 185 */ 186 186 static function getCurrentCountry (){ 187 $s=$GLOBALS['gJConfig']-> defaultLocale;187 $s=$GLOBALS['gJConfig']->locale; 188 188 return substr($s,strpos($s,'_')+1); 189 189 } … … 206 206 }catch(jExceptionSelector $e){ 207 207 if($e->getCode() == 12) throw $e; 208 if ($locale === null) $locale = $gJConfig-> defaultLocale;209 if ($charset === null) $charset = $gJConfig-> defaultCharset;208 if ($locale === null) $locale = $gJConfig->locale; 209 if ($charset === null) $charset = $gJConfig->charset; 210 210 throw new Exception('(200)The given locale key "'.$key.'" is invalid (for charset '.$charset.', lang '.$locale.')'); 211 211 } … … 223 223 //if the message was not found, we're gonna 224 224 //use the default language and country. 225 if ($locale == $gJConfig-> defaultLocale){225 if ($locale == $gJConfig->locale){ 226 226 throw new Exception('(210)The given locale key "'.$file->toString().'" does not exists in the default lang for the '.$file->charset.' charset '); 227 227 } 228 return jLocale::get ($key, $args, $gJConfig-> defaultLocale);228 return jLocale::get ($key, $args, $gJConfig->locale); 229 229 }else{ 230 230 //here, we know the message trunk/lib/jelix/core/jLocale.class.php
r378 r559 47 47 48 48 if($charset == null){ 49 $charset = $GLOBALS['gJConfig']-> defaultCharset;49 $charset = $GLOBALS['gJConfig']->charset; 50 50 } 51 51 if (!in_array ($charset, $this->_loadedCharset)){ … … 177 177 */ 178 178 static function getCurrentLang(){ 179 $s=$GLOBALS['gJConfig']-> defaultLocale;179 $s=$GLOBALS['gJConfig']->locale; 180 180 return substr($s,0, strpos($s,'_')); 181 181 } … … 185 185 */ 186 186 static function getCurrentCountry (){ 187 $s=$GLOBALS['gJConfig']-> defaultLocale;187 $s=$GLOBALS['gJConfig']->locale; 188 188 return substr($s,strpos($s,'_')+1); 189 189 } … … 206 206 }catch(jExceptionSelector $e){ 207 207 if($e->getCode() == 12) throw $e; 208 if ($locale === null) $locale = $gJConfig-> defaultLocale;209 if ($charset === null) $charset = $gJConfig-> defaultCharset;208 if ($locale === null) $locale = $gJConfig->locale; 209 if ($charset === null) $charset = $gJConfig->charset; 210 210 throw new Exception('(200)The given locale key "'.$key.'" is invalid (for charset '.$charset.', lang '.$locale.')'); 211 211 } … … 223 223 //if the message was not found, we're gonna 224 224 //use the default language and country. 225 if ($locale == $gJConfig-> defaultLocale){225 if ($locale == $gJConfig->locale){ 226 226 throw new Exception('(210)The given locale key "'.$file->toString().'" does not exists in the default lang for the '.$file->charset.' charset '); 227 227 } 228 return jLocale::get ($key, $args, $gJConfig-> defaultLocale);228 return jLocale::get ($key, $args, $gJConfig->locale); 229 229 }else{ 230 230 //here, we know the message trunk/lib/jelix/core/jSelector.class.php
r510 r559 417 417 global $gJConfig; 418 418 if ($locale === null){ 419 $locale = $gJConfig-> defaultLocale;419 $locale = $gJConfig->locale; 420 420 } 421 421 if ($charset === null){ 422 $charset = $gJConfig-> defaultCharset;422 $charset = $gJConfig->charset; 423 423 } 424 424 if(strpos($locale,'_') === false){ … … 564 564 } 565 565 566 if($gJConfig-> defaultTheme != 'default'){566 if($gJConfig->theme != 'default'){ 567 567 // on regarde si il y a un template redéfinie pour le theme courant 568 $this->_where = 'themes/'.$gJConfig-> defaultTheme.'/'.$this->module.'/'.$gJConfig->defaultLocale.'/'.$this->resource;568 $this->_where = 'themes/'.$gJConfig->theme.'/'.$this->module.'/'.$gJConfig->locale.'/'.$this->resource; 569 569 $this->_path = JELIX_APP_VAR_PATH.$this->_where.'.tpl'; 570 570 if (is_readable ($this->_path)){ … … 572 572 } 573 573 // on regarde si il y a un template redéfinie pour le theme courant 574 $this->_where = 'themes/'.$gJConfig-> defaultTheme.'/'.$this->module.'/'.$this->resource;574 $this->_where = 'themes/'.$gJConfig->theme.'/'.$this->module.'/'.$this->resource; 575 575 $this->_path = JELIX_APP_VAR_PATH.$this->_where.'.tpl'; 576 576 if (is_readable ($this->_path)){ … … 580 580 581 581 // on regarde si il y a un template redéfinie dans le theme par defaut 582 $this->_where = 'themes/default/'.$this->module.'/'.$gJConfig-> defaultLocale.'/'.$this->resource;582 $this->_where = 'themes/default/'.$this->module.'/'.$gJConfig->locale.'/'.$this->resource; 583 583 $this->_path = JELIX_APP_VAR_PATH.$this->_where.'.tpl'; 584 584 if (is_readable ($this->_path)){ … … 593 593 594 594 // et sinon, on regarde si le template existe dans le module en question 595 $this->_path = $gJConfig->_modulesPathList[$this->module].$this->_dirname.$gJConfig-> defaultLocale.'/'.$this->resource.'.tpl';595 $this->_path = $gJConfig->_modulesPathList[$this->module].$this->_dirname.$gJConfig->locale.'/'.$this->resource.'.tpl'; 596 596 if (is_readable ($this->_path)){ 597 $this->_where = 'modules/'.$this->module.'/'.$gJConfig-> defaultLocale.'/'.$this->resource;597 $this->_where = 'modules/'.$this->module.'/'.$gJConfig->locale.'/'.$this->resource; 598 598 return; 599 599 } trunk/lib/jelix/core/jSelector.class.php
r510 r559 417 417 global $gJConfig; 418 418 if ($locale === null){ 419 $locale = $gJConfig-> defaultLocale;419 $locale = $gJConfig->locale; 420 420 } 421 421 if ($charset === null){ 422 $charset = $gJConfig-> defaultCharset;422 $charset = $gJConfig->charset; 423 423 } 424 424 if(strpos($locale,'_') === false){ … … 564 564 } 565 565 566 if($gJConfig-> defaultTheme != 'default'){566 if($gJConfig->theme != 'default'){ 567 567 // on regarde si il y a un template redéfinie pour le theme courant 568 $this->_where = 'themes/'.$gJConfig-> defaultTheme.'/'.$this->module.'/'.$gJConfig->defaultLocale.'/'.$this->resource;568 $this->_where = 'themes/'.$gJConfig->theme.'/'.$this->module.'/'.$gJConfig->locale.'/'.$this->resource; 569 569 $this->_path = JELIX_APP_VAR_PATH.$this->_where.'.tpl'; 570 570 if (is_readable ($this->_path)){ … … 572 572 } 573 573 // on regarde si il y a un template redéfinie pour le theme courant 574 $this->_where = 'themes/'.$gJConfig-> defaultTheme.'/'.$this->module.'/'.$this->resource;574 $this->_where = 'themes/'.$gJConfig->theme.'/'.$this->module.'/'.$this->resource; 575 575 $this->_path = JELIX_APP_VAR_PATH.$this->_where.'.tpl'; 576 576 if (is_readable ($this->_path)){ … … 580 580 581 581 // on regarde si il y a un template redéfinie dans le theme par defaut 582 $this->_where = 'themes/default/'.$this->module.'/'.$gJConfig-> defaultLocale.'/'.$this->resource;582 $this->_where = 'themes/default/'.$this->module.'/'.$gJConfig->locale.'/'.$this->resource; 583 583 $this->_path = JELIX_APP_VAR_PATH.$this->_where.'.tpl'; 584 584 if (is_readable ($this->_path)){ … … 593 593 594 594 // et sinon, on regarde si le template existe dans le module en question 595 $this->_path = $gJConfig->_modulesPathList[$this->module].$this->_dirname.$gJConfig-> defaultLocale.'/'.$this->resource.'.tpl';595 $this->_path = $gJConfig->_modulesPathList[$this->module].$this->_dirname.$gJConfig->locale.'/'.$this->resource.'.tpl'; 596 596 if (is_readable ($this->_path)){ 597 $this->_where = 'modules/'.$this->module.'/'.$gJConfig-> defaultLocale.'/'.$this->resource;597 $this->_where = 'modules/'.$this->module.'/'.$gJConfig->locale.'/'.$this->resource; 598 598 return; 599 599 } trunk/lib/jelix/core/request/jCmdLineRequest.class.php
r396 r559 35 35 36 36 if ($_SERVER['argc'] == 1) { 37 $argsel = $gJConfig-> defaultModule.'~'.$gJConfig->defaultAction;37 $argsel = $gJConfig->startModule.'~'.$gJConfig->startAction; 38 38 } else { 39 39 $argsel = array_shift($argv); // get the module~action selector … … 42 42 } 43 43 if (!preg_match('/(?:([\w\.]+)~)/', $argsel)) { 44 $argsel = $gJConfig-> defaultModule.'~'.$argsel;44 $argsel = $gJConfig->startModule.'~'.$argsel; 45 45 } 46 46 } trunk/lib/jelix/core/request/jCmdLineRequest.class.php
r396 r559 35 35 36 36 if ($_SERVER['argc'] == 1) { 37 $argsel = $gJConfig-> defaultModule.'~'.$gJConfig->defaultAction;37 $argsel = $gJConfig->startModule.'~'.$gJConfig->startAction; 38 38 } else { 39 39 $argsel = array_shift($argv); // get the module~action selector … … 42 42 } 43 43 if (!preg_match('/(?:([\w\.]+)~)/', $argsel)) { 44 $argsel = $gJConfig-> defaultModule.'~'.$argsel;44 $argsel = $gJConfig->startModule.'~'.$argsel; 45 45 } 46 46 } trunk/lib/jelix/core/response/jResponseCss.class.php
r454 r559 37 37 public function output(){ 38 38 global $gJConfig; 39 $this->_httpHeaders['Content-Type']='text/css;charset='.$gJConfig-> defaultCharset;39 $this->_httpHeaders['Content-Type']='text/css;charset='.$gJConfig->charset; 40 40 $this->_httpHeaders['Content-length']=strlen($this->content); 41 41 $this->sendHttpHeaders(); … … 47 47 global $gJConfig; 48 48 header("HTTP/1.0 500 Internal Server Error"); 49 header('Content-Type: text/css;charset='.$gJConfig-> defaultCharset);49 header('Content-Type: text/css;charset='.$gJConfig->chars
