public function getConfig()
 {
     global $topDirectory;
     $archive = Helper::$config['archive'];
     $archive_bins = array_merge($archive['types'], array('unzip'));
     // unzip should be the latest key index
     foreach ($archive_bins as $kid => $external) {
         if (findEXE($external) === false && isset($archive['types'][$kid])) {
             $archive['types'][$kid] = false;
             echo 'log("FILE MANAGER: ', $external, ' "+theUILang.fErrMsg[24]);', "\n";
             die;
         }
     }
     $settings['homedir'] = rtrim($topDirectory, '/');
     $settings['mkdefmask'] = Helper::$config['mkdperm'];
     $settings['archives'] = $archive;
     Helper::jsonOut($settings);
 }
Ejemplo n.º 2
0
<?php

require_once '../../php/util.php';
include 'conf.php';
// unzip should be the latest key index
foreach (array_merge($fm['archive']['types'], array('unzip')) as $kid => $external) {
    if (findEXE($external) === false && isset($fm['archive']['types'][$kid])) {
        unset($fm['archive']['types'][$kid]);
        echo 'log("FILE MANAGER: ', $external, ' "+theUILang.fErrMsg[24]);', "\n";
    }
}
echo 'theWebUI.fManager.homedir = "', rtrim($homeDirectory, '/'), '";', "\n";
echo 'theWebUI.fManager.mkdefmask = "', $fm['mkdperm'], '";', "\n";
echo 'theWebUI.fManager.archives = ' . json_encode($fm['archive']) . ';', "\n";
Ejemplo n.º 3
0
             $disabled[$file] = $info;
             continue;
         }
         if ($do_diagnostic && $info["rtorrent.remote"] == "warning") {
             $jResult .= "noty('" . $file . ": '+theUILang.warnMustBeInSomeHost,'error');";
         }
     }
 }
 if ($do_diagnostic) {
     if ($theSettings->linkExist) {
         foreach ($info['rtorrent.external.warning'] as $external) {
             findRemoteEXE($external, "noty('" . $file . ": '+theUILang.rTorrentExternalNotFoundWarning+' ('+'" . $external . "'+').','error');", $remoteRequests);
         }
     }
     foreach ($info['web.external.warning'] as $external) {
         if (findEXE($external) == false) {
             $jResult .= "noty('" . $file . ": '+theUILang.webExternalNotFoundWarning+' ('+'" . $external . "'+').','error');";
         }
     }
     foreach ($info['php.extensions.warning'] as $extension) {
         if (!in_array($extension, $loadedExtensions)) {
             $jResult .= "noty('" . $file . ": '+theUILang.phpExtensionNotFoundWarning+' ('+'" . $extension . "'+').','error');";
         }
     }
 }
 $js = "../plugins/" . $file . "/init.js";
 if (!is_readable($js)) {
     $js = NULL;
 }
 $php = "../plugins/" . $file . "/init.php";
 if (!is_readable($php)) {
Ejemplo n.º 4
0
<?php

eval(getPluginConf($plugin["name"]));
if ($useExternal !== false) {
    if ($do_diagnostic && empty($pathToCreatetorrent) && findEXE($useExternal) == false) {
        $jResult .= "plugin.disable(); plugin.showError('theUILang.createExternalNotFound+\\' (" . $useExternal . ").\\'');";
    } else {
        if ($useExternal === "transmissioncli" || $useExternal === "transmissioncreate") {
            $jResult .= "plugin.hidePieceSize = true;";
        }
        $theSettings->registerPlugin($plugin["name"], $pInfo["perms"]);
    }
} else {
    $theSettings->registerPlugin($plugin["name"], $pInfo["perms"]);
}