removed remote update functionality from admin panel
This commit is contained in:
parent
954e4f2754
commit
20fe67f378
3 changed files with 0 additions and 419 deletions
|
@ -3,7 +3,6 @@
|
|||
/**
|
||||
* Friendica admin
|
||||
*/
|
||||
require_once("include/remoteupdate.php");
|
||||
require_once("include/enotify.php");
|
||||
require_once("include/text.php");
|
||||
|
||||
|
@ -1867,61 +1866,3 @@ function admin_page_viewlogs(&$a){
|
|||
'$logname' => get_config('system','logfile')
|
||||
));
|
||||
}
|
||||
/**
|
||||
* @param App $a
|
||||
*/
|
||||
function admin_page_remoteupdate_post(&$a) {
|
||||
// this function should be called via ajax post
|
||||
if(!is_site_admin()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (x($_POST,'remotefile') && $_POST['remotefile']!=""){
|
||||
$remotefile = $_POST['remotefile'];
|
||||
$ftpdata = (x($_POST['ftphost'])?$_POST:false);
|
||||
doUpdate($remotefile, $ftpdata);
|
||||
} else {
|
||||
echo "No remote file to download. Abort!";
|
||||
}
|
||||
|
||||
killme();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param App $a
|
||||
* @return string
|
||||
*/
|
||||
function admin_page_remoteupdate(&$a) {
|
||||
if(!is_site_admin()) {
|
||||
return login(false);
|
||||
}
|
||||
|
||||
$canwrite = canWeWrite();
|
||||
$canftp = function_exists('ftp_connect');
|
||||
|
||||
$needupdate = true;
|
||||
$u = checkUpdate();
|
||||
if (!is_array($u)){
|
||||
$needupdate = false;
|
||||
$u = array('','','');
|
||||
}
|
||||
|
||||
$tpl = get_markup_template("admin_remoteupdate.tpl");
|
||||
return replace_macros($tpl, array(
|
||||
'$baseurl' => $a->get_baseurl(true),
|
||||
'$submit' => t("Update now"),
|
||||
'$close' => t("Close"),
|
||||
'$localversion' => FRIENDICA_VERSION,
|
||||
'$remoteversion' => $u[1],
|
||||
'$needupdate' => $needupdate,
|
||||
'$canwrite' => $canwrite,
|
||||
'$canftp' => $canftp,
|
||||
'$ftphost' => array('ftphost', t("FTP Host"), '',''),
|
||||
'$ftppath' => array('ftppath', t("FTP Path"), '/',''),
|
||||
'$ftpuser' => array('ftpuser', t("FTP User"), '',''),
|
||||
'$ftppwd' => array('ftppwd', t("FTP Password"), '',''),
|
||||
'$remotefile'=>array('remotefile','', $u['2'],''),
|
||||
));
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue