Exemple #1
0
 public static function brand_CFG($file)
 {
     //if (is_null(Compiler::$api)) Compiler::init();
     $txt = file_get_contents($file);
     if (!Compiler::$disabled || isset($_COOKIE['compile_curl'])) {
         preg_match('/(<!--{(\\S+)}-->)<script(?:src|)(.*?)<\\/script>/s', $txt, $matches);
         if (sizeof($matches) == 0) {
             //-----------------------------------
             $txt = Compiler::brand("script", $txt, $file);
             $txt = Compiler::brand("style", $txt, $file);
             //-----------------------------------
             //print_r($file);
             //$file = FileFolder::getPathFromFile($file).FileFolder::getFileName($file).".".FileFolder::getFileExt($file);
             $file = str_replace(array(Import::$uber_src_path, Import::getImportPath()), GlobalMas::$filesPath_absolute . Compiler::$importTmpPath, $file);
             FileFolder::file_put_contents($file, $txt);
         }
     }
     return $file;
 }