mirror of
https://github.com/e107inc/e107.git
synced 2025-08-16 03:24:20 +02:00
Code cleanup. Incompatible plugin alert now links directly to uninstall page for each plugin found.
This commit is contained in:
@@ -93,7 +93,7 @@ if (!isset($pref['adminstyle'])) $pref['adminstyle'] = 'infopanel'; // Shouldn'
|
||||
|
||||
class admin_start
|
||||
{
|
||||
|
||||
|
||||
private $incompat = array(
|
||||
array('banhelper', 1.5),
|
||||
array('banhelper', 1.7),
|
||||
@@ -536,14 +536,14 @@ TMPO;
|
||||
|
||||
if(!empty($installedPlugs[$folder]) && ($version == $installedPlugs[$folder] || $version === '*'))
|
||||
{
|
||||
$inCompatText .= "<li>".$folder." v".$installedPlugs[$folder]."</li>";
|
||||
$inCompatText .= "<li><a title='".LAN_UNINSTALL."' href='".e_ADMIN."plugin.php?mode=installed&action=uninstall&path=".$folder."'>".$folder." v".$installedPlugs[$folder]."</a></li>";
|
||||
}
|
||||
}
|
||||
|
||||
if($inCompatText)
|
||||
{
|
||||
$text = "<ul>".$inCompatText."</ul>";
|
||||
$mes->addWarning(ADLAN_189." ".$text."<a class='btn btn-default' href='".e_ADMIN."plugin.php'>".LAN_UNINSTALL."</a>");
|
||||
$mes->addWarning(ADLAN_189." <br /><br />".$text);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -596,7 +596,7 @@ class page_admin_ui extends e_admin_ui
|
||||
'page_sef' => array('title'=> LAN_SEFURL, 'tab' => 1, 'type' => 'text', 'batch'=>true, 'data'=>'str', 'inline'=>true, 'width' => 'auto', 'writeParms'=>'size=xxlarge&sef=page_title'),
|
||||
'page_metakeys' => array('title'=> LAN_KEYWORDS, 'tab' => 1, 'type' => 'tags', 'data'=>'str', 'width' => 'auto'),
|
||||
'page_metadscr' => array('title'=> CUSLAN_11, 'tab' => 1, 'type' => 'text', 'data'=>'str', 'width' => 'auto', 'writeParms'=>'size=xxlarge'),
|
||||
'page_metarobots' => array('title' => LAN_ROBOTS, 'tab'=>1, 'type' => 'dropdown', 'data'=>'safestr', 'batch'=>true, 'inline'=>true, 'readParms'=>array('type'=>'checkboxes'), 'width' => 'auto', 'thclass' => 'left', 'class' => 'left', 'nosort' => false, 'batch'=>true, 'filter'=>true),
|
||||
'page_metarobots' => array('title' => LAN_ROBOTS, 'tab'=>1, 'type' => 'dropdown', 'data'=>'safestr', 'batch'=>true, 'inline'=>true, 'readParms'=>array('type'=>'checkboxes'), 'width' => 'auto', 'thclass' => 'left', 'class' => 'left', 'nosort' => false, 'filter'=>true),
|
||||
|
||||
'page_order' => array('title'=> LAN_ORDER, 'tab' => 1, 'type' => 'number', 'width' => 'auto', 'inline'=>true),
|
||||
'page_fields' => array('title'=>'Custom Fields', 'tab'=>4, 'type'=>'hidden', 'data'=>'json', 'width'=>'auto'),
|
||||
|
@@ -93,9 +93,9 @@ class cron_admin_ui extends e_admin_ui
|
||||
}
|
||||
|
||||
|
||||
if (!vartrue(e107::getPref('e_cron_pwd')) || varset($_POST['generate_pwd']))
|
||||
if (empty(e107::getPref('e_cron_pwd')) || !empty($_POST['generate_pwd']))
|
||||
{
|
||||
$pwd = $this->setCronPwd();
|
||||
$this->setCronPwd();
|
||||
}
|
||||
|
||||
$sql->gen("SELECT cron_function,cron_active FROM #cron ");
|
||||
@@ -1299,4 +1299,4 @@ function cron_adminmenu()
|
||||
*/
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
@@ -102,6 +102,7 @@ class adminstyle_flexpanel extends adminstyle_infopanel
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
/** @var admin_shortcodes $admin_sc */
|
||||
$admin_sc = e107::getScBatch('admin');
|
||||
$tp = e107::getParser();
|
||||
$ns = e107::getRender();
|
||||
|
@@ -895,7 +895,7 @@ class links_admin_form_ui extends e_admin_form_ui
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getList($ajax = false)
|
||||
public function getList($ajax = false, $view='default')
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
$controller = $this->getController();
|
||||
|
@@ -562,25 +562,25 @@ if ($action == "dl")
|
||||
{
|
||||
$id = str_replace("%20", " ", $id);
|
||||
|
||||
if (preg_match("/Binary\s(.*?)\/.*/", $id, $result))
|
||||
{
|
||||
$bid = $result[1];
|
||||
$result = @mysql_query("SELECT * FROM ".MPREFIX."rbinary WHERE binary_id='$bid' ");
|
||||
$binary_data = @mysql_result($result, 0, "binary_data");
|
||||
$binary_filetype = @mysql_result($result, 0, "binary_filetype");
|
||||
$binary_name = @mysql_result($result, 0, "binary_name");
|
||||
header("Content-type: ".$binary_filetype);
|
||||
header("Content-length: ".$download_filesize);
|
||||
header("Content-Disposition: attachment; filename=".$binary_name);
|
||||
header("Content-Description: PHP Generated Data");
|
||||
echo $binary_data;
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header("location:".e_UPLOAD.str_replace("dl.", "", e_QUERY));
|
||||
exit;
|
||||
}
|
||||
// if (preg_match("/Binary\s(.*?)\/.*/", $id, $result))
|
||||
// {
|
||||
// $bid = $result[1];
|
||||
// $result = @mysql_query("SELECT * FROM ".MPREFIX."rbinary WHERE binary_id='$bid' ");
|
||||
// $binary_data = @mysql_result($result, 0, "binary_data");
|
||||
// $binary_filetype = @mysql_result($result, 0, "binary_filetype");
|
||||
// $binary_name = @mysql_result($result, 0, "binary_name");
|
||||
// header("Content-type: ".$binary_filetype);
|
||||
// header("Content-length: ".$download_filesize);
|
||||
// header("Content-Disposition: attachment; filename=".$binary_name);
|
||||
// header("Content-Description: PHP Generated Data");
|
||||
// echo $binary_data;
|
||||
// exit;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// header("location:".e_UPLOAD.str_replace("dl.", "", e_QUERY));
|
||||
// exit;
|
||||
// }
|
||||
}
|
||||
|
||||
require_once(e_HANDLER.'upload_handler.php');
|
||||
@@ -979,4 +979,4 @@ function upload_adminmenu()
|
||||
|
||||
|
||||
require_once("footer.php");
|
||||
?>
|
||||
|
||||
|
@@ -551,12 +551,12 @@ e107::js('footer-inline', js());
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
public function afterDelete($data,$id)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
// ------- Customize Update --------
|
||||
|
Reference in New Issue
Block a user