Changeset 426

Show
Ignore:
Timestamp:
04/27/07 11:14:58 (2 years ago)
Author:
laurentj
Message:

little optimization on jUrlEngine.simple

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/jelix/core/jCoordinator.class.php

    r386 r426  
    1313 * the main class of the jelix core 
    1414 * 
    15  * this is the "chief orchestra" of the framework. It's goal is 
     15 * this is the "chief orchestra" of the framework. Its goal is 
    1616 * to load the configuration, to get the request parameters 
    1717 * used to instancie the correspondant controllers and to run the right method. 
     
    111111                if(file_exists(JELIX_APP_CONFIG_PATH.$conff)){ 
    112112                   if( false === ($conf = @parse_ini_file(JELIX_APP_CONFIG_PATH.$conff,true))) 
    113                         die("Erreur dans le fichier de configuration du plugin $name ($conff)!"); 
     113                        die("Jelix Error: Error in the configuration file of plugin $name ($conff)!"); 
    114114                }else{ 
    115115                    $conf = array(); 
    116116                } 
    117                 include( $gJConfig->_pluginsPathList[$name].$name.".plugin.php"); 
     117                include( $gJConfig->_pluginsPathList[$name].$name.'.plugin.php'); 
    118118                $class= $name.'Plugin'; 
    119119                $this->plugins[strtolower($name)] = new $class($conf); 
     
    289289    * @return jIPlugin 
    290290    */ 
    291     function getPlugin ($pluginName, $required = true){ 
     291    public function getPlugin ($pluginName, $required = true){ 
    292292        $pluginName = strtolower ($pluginName); 
    293293        if (isset ($this->plugins[$pluginName])){ 
  • trunk/lib/jelix/core/jRequest.class.php

    r365 r426  
    1515 * process depends on the type of request (ex: xmlrpc..) 
    1616 * 
    17  
    1817 * @package  jelix 
    1918 * @subpackage core 
     
    6968 
    7069    /** 
    71      * analyse the http request and set the params property 
     70     * analyse the http request and sets the params property 
    7271     */ 
    7372    abstract protected function _initParams(); 
  • trunk/lib/jelix/core/url/jUrlEngine.simple.class.php

    r386 r426  
    7575 
    7676        $usehttps= false; 
    77         if($action && $action !='' && isset($urlhttps[$module.'~'.$action.'@'.$requestType])){ 
     77        if($action && isset($urlhttps[$module.'~'.$action.'@'.$requestType])){ 
     78            $usehttps = true; 
     79        }elseif($module &&  isset($urlhttps[$module.'~*@'.$requestType])){ 
     80            $usehttps = true; 
     81        }elseif(isset($urlhttps['@'.$requestType])){ 
    7882            $usehttps = true; 
    7983        } 
    80         if($module && $module !='' && !$usehttps &&  isset($urlhttps[$module.'~*@'.$requestType])){ 
    81             $usehttps = true; 
    82         } 
    83         if(!$usehttps && isset($urlhttps['@'.$requestType])){ 
    84             $usehttps = true; 
    85         } 
    86  
    8784 
    8885        if(count($gJConfig->simple_urlengine_entrypoints)){ 
     
    9693               } 
    9794           } 
    98            $found = false; 
    99            if($action && $action !='' && isset($urlspe[$module.'~'.$action.'@'.$requestType])){ 
    100                 $script = $urlspe[$module.'~'.$action.'@'.$requestType]; 
    101                 $found = true; 
    102            } 
    103            if($module && $module !='' && !$found &&  isset($urlspe[$module.'~*@'.$requestType])){ 
    104                 $script = $urlspe[$module.'~*@'.$requestType]; 
    105                 $found = true; 
    106            } 
    107            if(!$found && isset($urlspe['@'.$requestType])){ 
    108                $script = $urlspe['@'.$requestType]; 
     95           if($action && isset($urlspe[$s1 = $module.'~'.$action.'@'.$requestType])){ 
     96                $script = $urlspe[$s1]; 
     97           }elseif($module &&  isset($urlspe[$s2 = $module.'~*@'.$requestType])){ 
     98                $script = $urlspe[$s2]; 
     99           }elseif( isset($urlspe[$s3 = '@'.$requestType])){ 
     100               $script = $urlspe[$s3]; 
    109101           } 
    110102        } 
Download in other formats: Unified Diff Zip Archive