Exemplo n.º 1
0
 /**
  * 
  * check_method_dependencies_static()
  *
  * Allows additional method dependency checks beyond the standard in a static context
  *
  * @return		bool	True if additional dependency checks passed
  *
  */
 public static function check_method_dependencies_static()
 {
     $result = true;
     // Need to check if function escapeshellarg os available - if not then exec cannot
     // be used for comment handling. This isn't a show stopper so we'll return true
     // but set an internal flag to disable commenting capability.
     $functions = array('escapeshellarg');
     $disabled_functions = array_map("trim", explode(',', ini_get('disable_functions')));
     // Check each function dependency and bail out on first failure
     foreach ($functions as $function) {
         $function = trim($function);
         if (!(function_exists($function) && !in_array($function, $disabled_functions))) {
             $result = false;
             break;
         }
     }
     if (false === $result) {
         // Found that escapeshellarg not available so exec cannot be used for comment handling
         self::$_allow_is_commenter = false;
     }
     return true;
 }