Ejemplo n.º 1
0
 public static function complete()
 {
     //if (isset($_COOKIE["compile"]) && $_COOKIE["compile"] == 1) : $bypass = true; $_GET["compile"] = 1; else : GenFun::setCookie("compile", false); GenFun::setCookie("compile_root", false); endif;
     //---------------------------------------------------------
     if (isset($_GET["compile"]) && $_GET["compile"] == 1 || $_COOKIE["compile"] == 1) {
         //$root = urldecode($_COOKIE["compile_root"]);
         //-----------------------------------------------------
         FileFolder::dupIncluded("server/", $dir = Compile::$minifiedPath);
         FileFolder::dupIncluded("", $dir, NULL, true);
         FileFolder::dupIncluded("", $dir = Compile::$unminifiedPath);
         if (isset($_COOKIE['compile_curl']) && $_COOKIE['compile_curl'] == 1) {
             GenFun::setCookie("compile_curl", false);
         }
     }
 }
Ejemplo n.º 2
0
 function __construct($obj)
 {
     $this->compilers = array();
     //------------------------------------------------------------
     SetPublicProp::go($this, $obj);
     //------------------------------------------------------------
     $this->compilerGlobal = new Compiler_Global();
     //------------------------------------------------------------
     //$this->compilePath = array();
     //------------------------------------------------------------
     $this->compile_id = Compiler::getCompile_id();
     //------------------------------------------------------------
     //if (is_null($this->compilePath)) $this->compilePath = dirname(Import::getImportPath())."/".$this->compile_id."/";
     if (is_null($this->compilePath)) {
         $this->compilePath = GlobalMas::$filesPath_absolute . "compiler/" . FileFolder::getLastDir($_SERVER["SCRIPT_FILENAME"]) . $this->compile_id . "/";
     }
     //-----------------------------------------------------
     if (isset($_GET['pageID']) && isset($_COOKIE['compile_curl'])) {
         GenFun::setCookie("compile_curl", false);
     }
     //-----------------------------------------------------
     $this->compilerGlobal->compilePath = $this->compilePath;
     //-----------------------------------------------------
     $this->refresh();
     if (is_null($this->url)) {
         $this->url = GenFun::get_full_url($_SERVER["SCRIPT_NAME"]);
     }
     //-----------------------------------------------------
     $this->compilerGlobal->url = $this->url;
     //-----------------------------------------------------
     if (isset($_GET['compile']) && $_GET['compile'] == "1" && !isset($_COOKIE['compile_curl'])) {
         Compiler::$disabled = false;
         GenFun::setCookie("compile", true, 1);
         $this->start();
         //die();
     } else {
         if (!isset($_GET['refresh'])) {
             register_shutdown_function("Compiler::callRegisteredShutdown");
         }
     }
 }