Exemple #1
0
 if (!$plg) {
     $plg = "../conf/plugins.ini";
 }
 $permissions = parse_ini_file($plg, true);
 $init = array();
 $names = array();
 $disabled = array();
 $phpVersion = phpversion();
 if (($pos = strpos($phpVersion, '-')) !== false) {
     $phpVersion = substr($phpVersion, 0, $pos);
 }
 $phpIVersion = explode('.', $phpVersion);
 $phpIVersion = (intval($phpIVersion[0]) << 16) + (intval($phpIVersion[1]) << 8) + intval($phpIVersion[2]);
 $phpRequired = false;
 $userPermissions = array("__hash__" => "plugins.dat");
 $cache = new rCache();
 $cache->get($userPermissions);
 $cantBeShutdowned = 0x80;
 $canBeLaunched = 0x100;
 $disabledByUser = 0x8000;
 $loadedExtensions = array_map("strtolower", get_loaded_extensions());
 while (false !== ($file = readdir($handle))) {
     if ($file != "." && $file != ".." && is_dir('../plugins/' . $file)) {
         if (!array_key_exists($file, $userPermissions)) {
             $userPermissions[$file] = true;
         }
         $info = getPluginInfo($file, $permissions);
         if ($info) {
             if ($info["plugin.may_be_launched"] && getFlag($permissions, $file, "enabled") == "user-defined") {
                 $info["perms"] |= $canBeLaunched;
                 if (!$userPermissions[$file]) {
Exemple #2
0
 public function store()
 {
     $cache = new rCache();
     return $cache->set($this);
 }
Exemple #3
0
 public static function get($create = false)
 {
     if (is_null(self::$theSettings)) {
         self::$theSettings = new rTorrentSettings();
         if ($create) {
             self::$theSettings->obtain();
         } else {
             $cache = new rCache();
             $cache->get(self::$theSettings);
         }
     }
     return self::$theSettings;
 }
Exemple #4
0
 public static function load()
 {
     $cache = new rCache();
     $rt = new mediainfoSettings();
     return $cache->get($rt) ? $rt : null;
 }
Exemple #5
0
 public static function saveHistory($history)
 {
     if ($history->isChanged()) {
         if ($history->isOverflow()) {
             $history->pack();
         }
         $cache = new rCache();
         return $cache->set($history);
     }
     return true;
 }