예제 #1
0
 public static function load()
 {
     $cache = new rCache();
     $rt = new recentTrackers();
     $cache->get($rt);
     return $rt;
 }
예제 #2
0
파일: rules.php 프로젝트: byte916/ruTorrent
 public static function load()
 {
     $cache = new rCache();
     $ar = new rRatioRulesList();
     $cache->get($ar);
     return $ar;
 }
예제 #3
0
 public static function load()
 {
     $cache = new rCache();
     $rts = new rTorrentSettings();
     $cache->get($rts);
     return $rts;
 }
예제 #4
0
파일: unpack.php 프로젝트: jcvfen/rutorrent
 public static function load()
 {
     $cache = new rCache();
     $up = new rUnpack();
     $cache->get($up);
     return $up;
 }
예제 #5
0
 public static function load()
 {
     $cache = new rCache();
     $rt = new rCookies();
     $cache->get($rt);
     return $rt;
 }
예제 #6
0
 public static function load()
 {
     $cache = new rCache();
     $at = new rXmpp();
     $cache->get($at);
     return $at;
 }
예제 #7
0
 public static function load()
 {
     $cache = new rCache();
     $rt = new rThrottle();
     if (!$cache->get($rt) || count($rt->thr) != MAX_THROTTLE) {
         $rt->fillArray();
     }
     return $rt;
 }
예제 #8
0
 public static function load()
 {
     $cache = new rCache();
     $rt = new rScheduler();
     if (!$cache->get($rt)) {
         $rt->fillWeek();
     }
     return $rt;
 }
예제 #9
0
 public static function load()
 {
     $cache = new rCache();
     $ar = new rHistory();
     if ($cache->get($ar) && !array_key_exists("autoclose", $ar->log)) {
         $ar->log["autoclose"] = 1;
         $ar->log["closeinterval"] = 5;
     }
     return $ar;
 }
예제 #10
0
 public static function load()
 {
     $cache = new rCache();
     $rt = new rRetrackers();
     $cache->get($rt);
     if (!isset($rt->todelete)) {
         $rt->todelete = array();
     }
     return $rt;
 }
예제 #11
0
 public static function load()
 {
     $cache = new rCache();
     $rt = new rRatio();
     if (!$cache->get($rt)) {
         $rt->fillArray();
     } else {
         $rt->pad();
     }
     return $rt;
 }
예제 #12
0
 public static function load()
 {
     global $defaultTheme;
     $cache = new rCache();
     $theme = new rTheme();
     $theme->current = $defaultTheme;
     if (!$cache->get($theme)) {
         $theme->current = $defaultTheme;
     }
     return $theme;
 }
예제 #13
0
파일: cpu.php 프로젝트: Snusel/ruTorrent
 public static function load()
 {
     global $processorsCount;
     $cpu = new rCPU();
     if (is_null($processorsCount)) {
         $cache = new rCache();
         if (!$cache->get($cpu)) {
             $cpu->obtain();
         }
     } else {
         $cpu->count = $processorsCount;
     }
     return $cpu;
 }
예제 #14
0
 public static function load()
 {
     $cache = new rCache();
     $rt = new rLook();
     if (!$cache->get($rt)) {
         $rt->list["YouTube"] = "http://www.youtube.com/results?search_query={title}";
         $rt->list["MetaCritic"] = "http://www.metacritic.com/search/all/{title}/results";
         $rt->list["IMDb"] = "http://www.imdb.com/find?q={title}&s=all";
         $rt->list["Google"] = "https://www.google.com/search?q={title}";
         $rt->list["TMDb"] = "http://www.themoviedb.org/search?query={title}";
         $rt->list["TheTVDb"] = "http://thetvdb.com/?string={title}&searchseriesid=&tab=listseries&function=Search";
     }
     return $rt;
 }
예제 #15
0
 public static function load()
 {
     $cache = new rCache();
     $rt = new ffmpegSettings();
     if ($cache->get($rt)) {
         if (!array_key_exists('exusewidth', $rt->data)) {
             $rt->data['exusewidth'] = 0;
         }
         if (!array_key_exists('exformat', $rt->data)) {
             $rt->data['exformat'] = 0;
         }
     }
     return $rt;
 }
예제 #16
0
 public static function load()
 {
     $cache = new rCache();
     $at = new rAutoTools();
     $cache->get($at);
     if (!property_exists($at, "automove_filter") || @preg_match($at->automove_filter, null) === false) {
         $at->automove_filter = "/.*/";
     }
     if (!property_exists($at, "addName")) {
         $at->addName = 0;
     }
     if (!property_exists($at, "addLabel")) {
         $at->addLabel = 0;
     }
     return $at;
 }
예제 #17
0
 public static function load()
 {
     global $defaultPopup, $defaultPMsEnabled, $defaultActiveInterval, $defaultInactiveInterval, $defaultUseSmileys, $defaultSmileySet, $defaultDtFormat;
     $cache = new rCache();
     $chat = new rChat();
     if (!$cache->get($chat)) {
         $chat->popup = $defaultPopup;
         $chat->pm = $defaultPMsEnabled;
         $chat->aInterval = $defaultActiveInterval;
         $chat->iInterval = $defaultInactiveInterval;
         $chat->smileys = $defaultUseSmileys;
         $chat->smileySet = $defaultSmileySet;
         $chat->format = $defaultDtFormat;
         $chat->lastLine = array();
     }
     return $chat;
 }
예제 #18
0
 public static function load()
 {
     $cache = new rCache();
     $ar = new rHistory();
     if ($cache->get($ar)) {
         if (!array_key_exists("autoclose", $ar->log)) {
             $ar->log["autoclose"] = 1;
             $ar->log["closeinterval"] = 5;
         }
         if (!array_key_exists("pushbullet_enabled", $ar->log)) {
             $ar->log["pushbullet_enabled"] = 0;
             $ar->log["pushbullet_addition"] = 0;
             $ar->log["pushbullet_finish"] = 0;
             $ar->log["pushbullet_deletion"] = 0;
             $ar->log["pushbullet_key"] = '';
         }
     }
     return $ar;
 }
예제 #19
0
 public static function load($mngr = null)
 {
     $cache = new rCache();
     $ar = new rURLRewriteRulesList();
     $cache->get($ar);
     if (rTorrentSettings::get()->isPluginRegistered("rss")) {
         $changed = false;
         if (is_null($mngr)) {
             require_once dirname(__FILE__) . '/../rss/rss.php';
             $mngr = new rRSSManager();
         }
         foreach ($ar->lst as $rule) {
             if (!empty($rule->rssHash) && !$mngr->rssList->isExist($rule->rssHash) && !$mngr->groups->get($rule->rssHash)) {
                 $rule->rssHash = '';
                 $changed = true;
             }
         }
         if ($changed) {
             $ar->store();
         }
     }
     return $ar;
 }
예제 #20
0
     $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]) {
                     $info["perms"] |= $disabledByUser;
예제 #21
0
 public static function load()
 {
     $cache = new rCache();
     $ar = new accountManager();
     return $cache->get($ar) ? $ar : false;
 }
예제 #22
0
 public static function loadHistory($withRSS = false)
 {
     $cache = new rCache();
     $history = new rSearchHistory();
     $cache->get($history);
     if ($withRSS) {
         if (rTorrentSettings::get()->isPluginRegistered("rss")) {
             global $rootPath;
             require_once $rootPath . '/plugins/rss/rss.php';
             $cache = new rCache('/rss/cache');
             $rssHistory = new rRSSHistory();
             if ($cache->get($rssHistory)) {
                 foreach ($rssHistory->lst as $url => $info) {
                     if (strlen($info["hash"]) == 40) {
                         $history->add($url, $info["hash"]);
                     }
                 }
             }
         }
     }
     return $history;
 }
예제 #23
0
파일: action.php 프로젝트: Snusel/ruTorrent
 public static function load()
 {
     $cache = new rCache();
     $rt = new mediainfoSettings();
     return $cache->get($rt) ? $rt : null;
 }
예제 #24
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;
 }