Changeset 4598


Ignore:
Timestamp:
08/22/10 22:49:05 (18 months ago)
Author:
vain
Message:
  • fix for method detection in dispatchable()
Location:
trunk/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/bootstrap/clansuite.application.php

    r4578 r4598  
    3131    * @copyright  Copyleft: All rights reserved. Jens-André Koch (2005 - onwards) 
    3232    * @link       http://www.clansuite.com 
    33     *  
     33    * 
    3434    * @version    SVN: $Id$ 
    3535    */ 
     
    4242 
    4343# Security Handler 
    44 if (defined('IN_CS') == false) 
     44if (defined('IN_CS') === false) 
    4545{ 
    4646    die('Clansuite not loaded. Direct Access forbidden.'); 
     
    541541        $response = self::$injector->instantiate('Clansuite_HttpResponse'); 
    542542 
    543  
    544543        /** 
    545544         * Setup Frontcontroller and pass Request and Response 
  • trunk/core/router.core.php

    r4597 r4598  
    10541054            if(class_exists($classname, false)) 
    10551055            { 
    1056                 # WATCH IT! method_exists works on objects, is_callable on classes! ,) 
    1057                 if(is_callable($classname, $method)) 
     1056                # WATCH IT! 
     1057                # method_exists works on objects? i just have a classname 
     1058                # is_callable on classes ?! 
     1059                # @todo how to get the object back for a classname? 
     1060                if(true === in_array($method, get_class_methods($classname))) 
    10581061                { 
    1059                       Clansuite_Debug::firebug('(OK) Route is dispatchable: '. $filename .' '. $classname .'->'. $method); 
     1062                      #Clansuite_Debug::firebug('(OK) Route is dispatchable: '. $filename .' '. $classname .'->'. $method); 
    10601063                      return true; 
    10611064                } 
    1062                 else 
    1063                 { 
    1064                     return false; 
    1065                 } 
    10661065            } 
    1067             else 
    1068             { 
    1069                 return false; 
    1070             } 
    1071         } 
    1072         else 
    1073         { 
    1074             Clansuite_Debug::firebug('(ERROR) Route not dispatchable: '. $filename .' '. $classname .'->'. $method); 
    1075             return false; 
    1076         } 
     1066        } 
     1067 
     1068        #Clansuite_Debug::firebug('(ERROR) Route not dispatchable: '. $filename .' '. $classname .'->'. $method); 
     1069        return false; 
    10771070    } 
    10781071 
Note: See TracChangeset for help on using the changeset viewer.