本文整理汇总了PHP中rTorrentSettings类的典型用法代码示例。如果您正苦于以下问题:PHP rTorrentSettings类的具体用法?PHP rTorrentSettings怎么用?PHP rTorrentSettings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了rTorrentSettings类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: sendTorrent
public static function sendTorrent($fname, $isStart, $directory = null)
{
$hash = false;
$torrent = is_object($fname) ? $fname : new \model\simple\Torrent($fname);
if (!$torrent->errors()) {
$raw_value = base64_encode($torrent->__toString());
$filename = is_object($fname) ? $torrent->getFileName() : $fname;
if (strlen($raw_value) < self::RTORRENT_PACKET_LIMIT || is_null($filename)) {
$cmd = new rXMLRPCCommand(\config\Conf::$userscgi, $isStart ? 'load.raw_start' : 'load.raw');
$cmd->addParameter("");
$cmd->addParameter($raw_value, "base64");
if (!is_null($filename) && !true) {
@unlink($filename);
}
} else {
$cmd = new rXMLRPCCommand(\config\Conf::$userscgi, $isStart ? 'load.start' : 'load.normal');
$cmd->addParameter("");
$cmd->addParameter($filename);
}
if (!is_null($filename) && rTorrentSettings::get(\config\Conf::$userscgi)->iVersion >= 0x805) {
$cmd->addParameter(rTorrentSettings::getCmd(\config\Conf::$userscgi, "d.custom.set") . "=x-filename," . rawurlencode(basename($filename)));
}
$req = new rXMLRPCRequest(\config\Conf::$userscgi);
$req->addCommand($cmd);
if (!is_null($directory)) {
$cmd->addParameter(rTorrentSettings::getCmd(\config\Conf::$userscgi, "d.directory.set=") . "\"" . $directory . "\"");
}
if ($req->run() && !$req->fault) {
$hash = $req->val;
}
}
return $hash;
}
开发者ID:CamTosh,项目名称:Mediastorrent,代码行数:33,代码来源:rTorrent.php
示例2: correct
public function correct($deltaUp, $deltaDown)
{
$tm = getdate();
$ndx = $tm["hours"];
$was = getdate($this->hourHitTimes[$ndx]);
if ($tm[0] - $this->hourHitTimes[$ndx] > 3600 + 3600 || $ndx != $was["hours"]) {
$this->hourHitTimes[$ndx] = $tm[0];
$this->hourUp[$ndx] = 0;
$this->hourDown[$ndx] = 0;
}
$this->hourUp[$ndx] += $deltaUp;
$this->hourDown[$ndx] += $deltaDown;
$ndx = $tm["mday"] - 1;
$was = getdate($this->monthHitTimes[$ndx]);
if ($tm[0] - $this->monthHitTimes[$ndx] > 3600 * 24 + 3600 || $ndx != $was["mday"] - 1) {
$this->monthHitTimes[$ndx] = $tm[0];
$this->monthUp[$ndx] = 0;
$this->monthDown[$ndx] = 0;
}
$this->monthUp[$ndx] += $deltaUp;
$this->monthDown[$ndx] += $deltaDown;
$ndx = $tm["mon"] - 1;
$was = getdate($this->yearHitTimes[$ndx]);
if ($tm[0] - $this->yearHitTimes[$ndx] > 3600 * 24 * 31 + 3600 || $ndx != $was["mon"] - 1) {
$this->yearHitTimes[$ndx] = $tm[0];
$this->yearUp[$ndx] = 0;
$this->yearDown[$ndx] = 0;
}
$this->yearUp[$ndx] += $deltaUp;
$this->yearDown[$ndx] += $deltaDown;
rTorrentSettings::get()->pushEvent("TraficUpdated", array("stat" => &$this));
}
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:32,代码来源:stat.php
示例3: __construct
public function __construct($user, $cmd, $args = null)
{
//\trigger_error("ddd");
//throw new \Exception("ddd");
$this->user = $user;
$this->command = rTorrentSettings::getCmd($this->user, $cmd);
$this->params = array();
if ($args !== null) {
if (is_array($args)) {
foreach ($args as $prm) {
$this->addParameter($prm);
}
} else {
$this->addParameter($args);
}
}
}
开发者ID:CamTosh,项目名称:Mediastorrent,代码行数:17,代码来源:rXMLRPCCommand.php
示例4: init
public function init()
{
$req = new rXMLRPCRequest();
for ($i = 0; $i < MAX_THROTTLE; $i++) {
if ($this->isCorrect($i)) {
$up = $this->thr[$i]["up"];
$down = $this->thr[$i]["down"];
} else {
$up = 0;
$down = 0;
}
$req->addCommand(new rXMLRPCCommand("throttle_up", array("thr_" . $i, $up . "")));
$req->addCommand(new rXMLRPCCommand("throttle_down", array("thr_" . $i, $down . "")));
}
if ($this->isCorrect($this->default - 1)) {
$req->addCommand(rTorrentSettings::get()->getOnInsertCommand(array('_throttle' . getUser(), getCmd('branch') . '=$' . getCmd('not') . '=$' . getCmd("d.get_throttle_name") . '=,' . getCmd('d.set_throttle_name') . '=thr_' . ($this->default - 1))));
} else {
$req->addCommand(rTorrentSettings::get()->getOnInsertCommand(array('_throttle' . getUser(), getCmd('cat='))));
}
return $req->run() && !$req->fault;
}
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:21,代码来源:throttle.php
示例5: load
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;
}
开发者ID:chaitanya11,项目名称:rtorrent,代码行数:23,代码来源:rules.php
示例6: Debug
Debug("enabled : " . $at->enable_watch);
Debug("autostart : " . $at->watch_start);
if ($at->enable_watch) {
$auto_start = $at->watch_start;
$path_to_watch = rtAddTailSlash(trim($at->path_to_watch));
Debug("path_to_watch : " . $path_to_watch);
if ($path_to_watch == '' || $path_to_watch == '/') {
$is_ok = false;
}
} else {
$is_ok = false;
}
}
// Ask info from rTorrent
if ($is_ok) {
$directory = rtAddTailSlash(rTorrentSettings::get()->directory);
Debug("get_directory : " . $directory);
if ($directory == '' || $directory == '/') {
$is_ok = false;
}
}
// Scan for *.torrent files at $path_to_watch
if ($is_ok) {
$files = rtScanFiles($path_to_watch, "/.*\\.torrent\$/i");
// ignore case
foreach ($files as $file) {
$torrent_file = $path_to_watch . $file;
// don't use realpath() here !!!
$dest_path = rtAddTailSlash(dirname($directory . $file));
Debug("torrent file : " . $torrent_file);
Debug("save data to : " . $dest_path);
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:31,代码来源:watch.php
示例7: run
public static function run($hash, $state = null, $time = null, $successful_time = null)
{
if (is_null($state)) {
self::getState($hash, $state, $time, $successful_time);
}
if ($state == self::STE_INPROGRESS && time() - $time > self::MAX_LOCK_TIME) {
$state = 0;
}
if ($state !== self::STE_INPROGRESS) {
$state = self::STE_INPROGRESS;
if (!self::setState($hash, $state)) {
return false;
}
$fname = rTorrentSettings::get()->session . $hash . ".torrent";
if (is_readable($fname)) {
$state = self::run_ex($hash, $fname);
}
if ($state == self::STE_INPROGRESS) {
$state = self::STE_ERROR;
}
if (!is_null($state)) {
self::setState($hash, $state);
}
}
return $state != self::STE_CANT_REACH_TRACKER;
}
开发者ID:limerainne,项目名称:ruTorrent,代码行数:26,代码来源:check.php
示例8: rXMLRPCRequest
}
break;
case "add_peer":
$req = new rXMLRPCRequest(new rXMLRPCCommand("add_peer", array($hash[0], $vs[0])));
if ($req->success()) {
$result = $req->val;
}
break;
case "getchunks":
$req = new rXMLRPCRequest(array(new rXMLRPCCommand("d.get_bitfield", $hash[0]), new rXMLRPCCommand("d.get_chunk_size", $hash[0]), new rXMLRPCCommand("d.get_size_chunks", $hash[0])));
if (rTorrentSettings::get()->apiVersion >= 4) {
$req->addCommand(new rXMLRPCCommand("d.chunks_seen", $hash[0]));
}
if ($req->success()) {
$result = array("chunks" => $req->val[0], "size" => $req->val[1], "tsize" => $req->val[2]);
if (rTorrentSettings::get()->apiVersion >= 4) {
$result["seen"] = $req->val[3];
}
}
break;
default:
if (isset($HTTP_RAW_POST_DATA)) {
$result = rXMLRPCRequest::send($HTTP_RAW_POST_DATA);
if (!empty($result)) {
$pos = strpos($result, "\r\n\r\n");
if ($pos !== false) {
$result = substr($result, $pos + 4);
}
cachedEcho($result, "text/xml");
}
}
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:31,代码来源:action.php
示例9: rXMLRPCRequest
<?php
$req = new rXMLRPCRequest(rTorrentSettings::get()->getRemoveScheduleCommand('rutracker_check'));
$req->run();
开发者ID:chaitanya11,项目名称:rtorrent,代码行数:4,代码来源:done.php
示例10: trim
if (isset($request['comment'])) {
$comment = trim($request['comment']);
if (strlen($comment)) {
$torrent->comment($comment);
}
}
if ($request['private']) {
$torrent->is_private(true);
}
$fname = rTask::formatPath($taskNo) . '/result.torrent';
$torrent->save($fname);
if ($request['start_seeding']) {
$fname = getUniqueUploadedFilename($torrent->info['name'] . '.torrent');
$path_edit = trim($request['path_edit']);
if (is_dir($path_edit)) {
$path_edit = addslash($path_edit);
}
if (rTorrentSettings::get()->correctDirectory($path_edit)) {
$path_edit = dirname($path_edit);
if ($resumed = rTorrent::fastResume($torrent, $path_edit)) {
$torrent = $resumed;
}
$torrent->save($fname);
rTorrent::sendTorrent($torrent, true, true, $path_edit, null, true, isLocalMode());
@chmod($fname, $profileMask & 0666);
}
}
exit(0);
}
exit(1);
}
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:31,代码来源:createtorrent.php
示例11: rtRemoveTailSlash
require_once "./util_rt.php";
require_once "./autotools.php";
$base_path = $argv[1];
$base_name = $argv[2];
$is_multy = $argv[3];
$base_path = rtRemoveTailSlash($base_path);
$base_path = rtRemoveLastToken($base_path, '/');
// filename or dirname
$base_path = rtAddTailSlash($base_path);
$dest_path = $base_path;
$at = rAutoTools::load();
if ($at->enable_move) {
$path_to_finished = trim($at->path_to_finished);
if ($path_to_finished != '') {
$path_to_finished = rtAddTailSlash($path_to_finished);
$directory = rTorrentSettings::get()->directory;
if (!empty($directory)) {
$directory = rtAddTailSlash($directory);
$rel_path = rtGetRelativePath($directory, $base_path);
//------------------------------------------------------------------------------
// !! this is a feature !!
// ($rel_path == '') means, that $base_path is NOT a SUBDIR of $directory at all
// so, we have to skip all automove actions
// for example, if we don't want torrent to be automoved - we save it out of $directory subtree
//------------------------------------------------------------------------------
if ($rel_path != '') {
if ($rel_path == './') {
$rel_path = '';
}
$dest_path = rtAddTailSlash($path_to_finished . $rel_path);
}
开发者ID:chaitanya11,项目名称:rtorrent,代码行数:31,代码来源:check.php
示例12: setHandlers
public function setHandlers()
{
global $rootPath;
if ($this->enabled) {
$cmd = rTorrentSettings::get()->getOnFinishedCommand(array('unpack' . getUser(), getCmd('execute') . '={' . getPHP() . ',' . $rootPath . '/plugins/unpack/update.php,$' . getCmd('d.get_directory') . '=,$' . getCmd('d.get_base_filename') . '=,$' . getCmd('d.is_multi_file') . '=,$' . getCmd('d.get_custom1') . '=,$' . getCmd('d.get_name') . '=,' . getCmd('d.get_hash') . '=,' . getUser() . '}'));
} else {
$cmd = rTorrentSettings::get()->getOnFinishedCommand(array('unpack' . getUser(), getCmd('cat=')));
}
$req = new rXMLRPCRequest($cmd);
return $req->success();
}
开发者ID:jcvfen,项目名称:rutorrent,代码行数:11,代码来源:unpack.php
示例13: makeCall
protected function makeCall()
{
rTorrentSettings::get()->patchDeprecatedRequest($this->commands);
$this->fault = false;
$this->content = "";
$cnt = count($this->commands);
if ($cnt > 0) {
$this->content = '<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>';
if ($cnt == 1) {
$cmd = $this->commands[0];
$this->content .= "{$cmd->command}</methodName><params>\r\n";
foreach ($cmd->params as &$prm) {
$this->content .= "<param><value><{$prm->type}>{$prm->value}</{$prm->type}></value></param>\r\n";
}
} else {
$this->content .= "system.multicall</methodName><params><param><value><array><data>";
foreach ($this->commands as &$cmd) {
$this->content .= "\r\n<value><struct><member><name>methodName</name><value><string>" . "{$cmd->command}</string></value></member><member><name>params</name><value><array><data>";
foreach ($cmd->params as &$prm) {
$this->content .= "\r\n<value><{$prm->type}>{$prm->value}</{$prm->type}></value>";
}
$this->content .= "\r\n</data></array></value></member></struct></value>";
}
$this->content .= "\r\n</data></array></value></param>";
}
$this->content .= "</params></methodCall>";
}
return $cnt > 0;
}
开发者ID:jcvfen,项目名称:rutorrent,代码行数:29,代码来源:xmlrpc.php
示例14: setHandlers
public function setHandlers()
{
global $rootPath;
$throttleRulesExist = false;
$ratioRulesExist = false;
foreach ($this->lst as $item) {
if ($item->ratio != '') {
$ratioRulesExist = true;
}
if ($item->channel != '') {
$throttleRulesExist = true;
}
}
if ($ratioRulesExist) {
eval(getPluginConf('ratio'));
$insCmd = '';
for ($i = 0; $i < MAX_RATIO; $i++) {
$insCmd .= getCmd('d.views.has=') . 'rat_' . $i . ',,';
}
$ratCmd = getCmd('d.set_custom') . '=x-extratio1,"$' . getCmd('execute_capture') . '={' . getPHP() . ',' . $rootPath . '/plugins/extratio/update.php,\\"$' . getCmd('t.multicall') . '=$' . getCmd('d.get_hash') . '=,' . getCmd('t.get_url') . '=,' . getCmd('cat') . '=#\\",$' . getCmd('d.get_custom1') . '=,ratio,' . getUser() . '}" ; ' . getCmd('branch') . '=$' . getCmd('not') . '=$' . getCmd('d.get_custom') . '=x-extratio1,,' . $insCmd . getCmd('view.set_visible') . '=$' . getCmd('d.get_custom') . '=x-extratio1';
} else {
$ratCmd = getCmd('cat=');
}
if ($throttleRulesExist) {
$thrCmd = getCmd('d.set_custom') . '=x-extratio2,"$' . getCmd('execute_capture') . '={' . getPHP() . ',' . $rootPath . '/plugins/extratio/update.php,\\"$' . getCmd('t.multicall') . '=$' . getCmd('d.get_hash') . '=,' . getCmd('t.get_url') . '=,' . getCmd('cat') . '=#\\",$' . getCmd('d.get_custom1') . '=,channel,' . getUser() . '}" ; ' . getCmd('branch') . '=$' . getCmd('not') . '=$' . getCmd('d.get_custom') . '=x-extratio2,,' . getCmd('d.set_throttle_name') . '=$' . getCmd('d.get_custom') . '=x-extratio2';
} else {
$thrCmd = getCmd('cat=');
}
$req = new rXMLRPCRequest(array(rTorrentSettings::get()->getOnInsertCommand(array('_exratio1' . getUser(), $ratCmd)), rTorrentSettings::get()->getOnInsertCommand(array('_exratio2' . getUser(), $thrCmd))));
return $req->success();
}
开发者ID:byte916,项目名称:ruTorrent,代码行数:31,代码来源:rules.php
示例15: get
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;
}
开发者ID:chaitanya11,项目名称:rtorrent,代码行数:13,代码来源:settings.php
示例16: foreach
foreach ($settingsFlags as $flagName => $flagVal) {
if (array_key_exists($flagName, $permissions) && $permissions[$flagName]) {
$perms |= $flagVal;
}
}
$jResult .= "theWebUI.showFlags = " . $perms . ";\n";
$jResult .= "theURLs.XMLRPCMountPoint = '" . $XMLRPCMountPoint . "';\n";
$jResult .= "theWebUI.systemInfo = {};\ntheWebUI.systemInfo.php = { canHandleBigFiles : " . (PHP_INT_SIZE <= 4 ? "false" : "true") . " };\n";
if ($handle = opendir('../plugins')) {
ignore_user_abort(true);
set_time_limit(0);
@chmod('/tmp', 0777);
if (!function_exists('preg_match_all')) {
$jResult .= "log(theUILang.PCRENotFound);";
} else {
$theSettings = new rTorrentSettings();
$theSettings->obtain();
if (!$theSettings->linkExist) {
$jResult .= "log(theUILang.badLinkTorTorrent);";
$jResult .= "theWebUI.systemInfo.rTorrent = { started: false, version : '?', libVersion : '?' };\n";
} else {
$jResult .= "theWebUI.systemInfo.rTorrent = { started: true, version : '" . $theSettings->version . "', libVersion : '" . $theSettings->libVersion . "' };\n";
if ($do_diagnostic) {
$up = getUploadsPath();
$st = getSettingsPath();
@chmod($up, 0777);
@chmod($st, 0777);
@chmod('./test.sh', 0755);
if (!isUserHavePermission($theSettings->myuid, $theSettings->mygid, $up, 0x7)) {
$jResult .= "log(theUILang.badUploadsPath+' (" . $up . ")');";
}
开发者ID:johnymarek,项目名称:eboda-hd-for-all-500,代码行数:31,代码来源:getplugins.php
示例17: foreach
}
}
}
}
}
}
}
}
if (count($trackers) > 0) {
$announce_list[] = $trackers;
}
if ($setComment || $setTrackers || $setPrivate) {
foreach ($hashes as $hash) {
$req = new rXMLRPCRequest(array(new rXMLRPCCommand("get_session"), new rXMLRPCCommand("d.is_open", $hash), new rXMLRPCCommand("d.is_active", $hash), new rXMLRPCCommand("d.get_state", $hash), new rXMLRPCCommand("d.get_tied_to_file", $hash), new rXMLRPCCommand("d.get_custom1", $hash), new rXMLRPCCommand("d.get_directory_base", $hash), new rXMLRPCCommand("d.get_connection_seed", $hash), new rXMLRPCCommand("d.get_complete", $hash)));
$throttle = null;
if (rTorrentSettings::get()->isPluginRegistered("throttle")) {
$req->addCommand(new rXMLRPCCommand("d.get_throttle_name", $hash));
}
if ($req->run() && !$req->fault) {
$isStart = $req->val[1] != 0 && $req->val[2] != 0 && $req->val[3] != 0;
$fname = $req->val[0] . $hash . ".torrent";
if (empty($req->val[0]) || !is_readable($fname)) {
if (strlen($req->val[4]) && is_readable($req->val[4])) {
$fname = $req->val[4];
} else {
$fname = null;
}
}
if ($fname) {
$torrent = new Torrent($fname);
if (!$torrent->errors()) {
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:31,代码来源:action.php
示例18: setHandlers
public function setHandlers()
{
global $rootPath;
if ($this->log["addition"] || $this->log["pushbullet_enabled"] && $this->log["pushbullet_addition"]) {
$addCmd = getCmd('execute') . '={' . getPHP() . ',' . $rootPath . '/plugins/history/update.php' . ',1,$' . getCmd('d.get_name') . '=,$' . getCmd('d.get_size_bytes') . '=,$' . getCmd('d.get_bytes_done') . '=,$' . getCmd('d.get_up_total') . '=,$' . getCmd('d.get_ratio') . '=,$' . getCmd('d.get_creation_date') . '=,$' . getCmd('d.get_custom') . '=addtime,$' . getCmd('d.get_custom') . '=seedingtime' . ',"$' . getCmd('t.multicall') . '=$' . getCmd('d.get_hash') . '=,' . getCmd('t.get_url') . '=,' . getCmd('cat') . '=#",$' . getCmd('d.get_custom1') . "=,\$" . getCmd('d.get_custom') . "=x-pushbullet," . getUser() . '}';
} else {
$addCmd = getCmd('cat=');
}
if ($this->log["finish"] || $this->log["pushbullet_enabled"] && $this->log["pushbullet_finish"]) {
$finCmd = getCmd('execute') . '={' . getPHP() . ',' . $rootPath . '/plugins/history/update.php' . ',2,$' . getCmd('d.get_name') . '=,$' . getCmd('d.get_size_bytes') . '=,$' . getCmd('d.get_bytes_done') . '=,$' . getCmd('d.get_up_total') . '=,$' . getCmd('d.get_ratio') . '=,$' . getCmd('d.get_creation_date') . '=,$' . getCmd('d.get_custom') . '=addtime,$' . getCmd('d.get_custom') . '=seedingtime' . ',"$' . getCmd('t.multicall') . '=$' . getCmd('d.get_hash') . '=,' . getCmd('t.get_url') . '=,' . getCmd('cat') . '=#",$' . getCmd('d.get_custom1') . "=,\$" . getCmd('d.get_custom') . "=x-pushbullet," . getUser() . '}';
} else {
$finCmd = getCmd('cat=');
}
if ($this->log["deletion"] || $this->log["pushbullet_enabled"] && $this->log["pushbullet_deletion"]) {
$delCmd = getCmd('execute') . '={' . getPHP() . ',' . $rootPath . '/plugins/history/update.php' . ',3,$' . getCmd('d.get_name') . '=,$' . getCmd('d.get_size_bytes') . '=,$' . getCmd('d.get_bytes_done') . '=,$' . getCmd('d.get_up_total') . '=,$' . getCmd('d.get_ratio') . '=,$' . getCmd('d.get_creation_date') . '=,$' . getCmd('d.get_custom') . '=addtime,$' . getCmd('d.get_custom') . '=seedingtime' . ',"$' . getCmd('t.multicall') . '=$' . getCmd('d.get_hash') . '=,' . getCmd('t.get_url') . '=,' . getCmd('cat') . '=#",$' . getCmd('d.get_custom1') . "=,\$" . getCmd('d.get_custom') . "=x-pushbullet," . getUser() . '}';
} else {
$delCmd = getCmd('cat=');
}
$req = new rXMLRPCRequest(array(rTorrentSettings::get()->getOnInsertCommand(array('thistory' . getUser(), $addCmd)), rTorrentSettings::get()->getOnFinishedCommand(array('thistory' . getUser(), $finCmd)), rTorrentSettings::get()->getOnEraseCommand(array('thistory' . getUser(), $delCmd))));
return $req->success();
}
开发者ID:NetOverflow,项目名称:ruTorrent,代码行数:21,代码来源:history.php
示例19: setHandlers
public function setHandlers()
{
$theSettings = rTorrentSettings::get();
$pathToXmpp = dirname(__FILE__);
$req = new rXMLRPCRequest();
if ($this->message !== '' && isset($this->jabberServer) && isset($this->jabberLogin) && isset($this->jabberPasswd) && isset($this->jabberFor)) {
$cmd = $theSettings->getOnFinishedCommand(array('xmpp' . getUser(), getCmd('execute.nothrow.bg') . '={' . getPHP() . ',' . $pathToXmpp . '/notify.php,"$' . getCmd('d.name') . '=","' . getUser() . '"}'));
} else {
$cmd = $theSettings->getOnFinishedCommand(array('xmpp' . getUser(), getCmd('cat=')));
}
$req->addCommand($cmd);
return $req->success();
}
开发者ID:nilimahona,项目名称:quick-box,代码行数:13,代码来源:xmpp.php
示例20: ignore_user_abort
if ($handle = opendir('../plugins')) {
ignore_user_abort(true);
set_time_limit(0);
$tmp = getTempDirectory();
if ($tmp != '/tmp/') {
makeDirectory($tmp);
}
if (!@file_exists($tempDirectory . '/.') || !is_readable($tempDirectory) || !is_writable($tempDirectory)) {
$jResult .= "noty(theUILang.badTempPath+' (" . $tempDirectory . ")','error');";
}
if (!function_exists('preg_match_all')) {
$jResult .= "noty(theUILang.PCRENotFound,'error');";
$jResult .= "theWebUI.systemInfo.rTorrent = { started: false, iVersion : 0, version : '?', libVersion : '?' };\n";
} else {
$remoteRequests = array();
$theSettings = rTorrentSettings::get(true);
if (!$theSettings->linkExist) {
$jResult .= "noty(theUILang.badLinkTorTorrent,'error');";
$jResult .= "theWebUI.systemInfo.rTorrent = { started: false, iVersion : 0, version : '?', libVersion : '?', apiVersion : 0 };\n";
} else {
if ($theSettings->idNotFound) {
$jResult .= "noty(theUILang.idNotFound,'error');";
}
$jResult .= "theWebUI.systemInfo.rTorrent = { started: true, iVersion : " . $theSettings->iVersion . ", version : '" . $theSettings->version . "', libVersion : '" . $theSettings->libVersion . "', apiVersion : " . $theSettings->apiVersion . " };\n";
if ($do_diagnostic) {
$up = getUploadsPath();
$st = getSettingsPath();
@chmod($up, $profileMask);
@chmod($st, $profileMask);
@chmod('./test.sh', $profileMask & 0755);
if (PHP_USE_GZIP && findEXE('gzip') === false) {
开发者ID:PreK,项目名称:ruTorrent,代码行数:31,代码来源:getplugins.php
注:本文中的rTorrentSettings类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论