case "unlaunch":
                    if (is_null($perms) || $perms & FLAG_CAN_CHANGE_LAUNCH) {
                        $userPermissions[$parts[1]] = false;
                        $jResult .= "thePlugins.get('" . $parts[1] . "').unlaunch();";
                    }
                case "done":
                    if (!is_null($perms) && !($perms & FLAG_CANT_SHUTDOWN)) {
                        $php = "../plugins/" . $parts[1] . "/done.php";
                        if (is_file($php) && is_readable($php)) {
                            require_once $php;
                        }
                        $theSettings->unregisterPlugin($parts[1]);
                        $jResult .= "thePlugins.get('" . $parts[1] . "').remove();";
                    }
                    break;
                case "launch":
                    if (is_null($perms) || $perms & FLAG_CAN_CHANGE_LAUNCH) {
                        $userPermissions[$parts[1]] = true;
                        $jResult .= "thePlugins.get('" . $parts[1] . "').launch();";
                    }
                    break;
            }
        }
    }
    if ($cmd == "done") {
        $theSettings->store();
    } else {
        $cache->set($userPermissions);
    }
}
cachedEcho($jResult, "application/javascript");
Exemple #2
0
 public function store()
 {
     $cache = new rCache();
     return $cache->set($this);
 }
Exemple #3
0
 public static function saveHistory($history)
 {
     if ($history->isChanged()) {
         if ($history->isOverflow()) {
             $history->pack();
         }
         $cache = new rCache();
         return $cache->set($history);
     }
     return true;
 }