1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 12:20:44 +02:00

Code cleanup. Incompatible plugin alert now links directly to uninstall page for each plugin found.

This commit is contained in:
Cameron
2020-06-26 13:58:59 -07:00
parent 30db97cbac
commit a6a98a82ad
11 changed files with 40 additions and 38 deletions

View File

@@ -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."&nbsp;".$text."<a class='btn btn-default' href='".e_ADMIN."plugin.php'>".LAN_UNINSTALL."</a>");
$mes->addWarning(ADLAN_189."&nbsp;<br /><br />".$text);
}
}

View File

@@ -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'),

View File

@@ -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()
*/
?>

View File

@@ -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();

View File

@@ -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();

View File

@@ -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");
?>

View File

@@ -551,12 +551,12 @@ e107::js('footer-inline', js());
}
/*
public function afterDelete($data,$id)
{
}
}*/
// ------- Customize Update --------

View File

@@ -1101,7 +1101,7 @@ class e_file
$data_len = filesize($filename);
if ($seek > ($data_len - 1)) { $seek = 0; }
// if ($filename == null) { $filename = basename($this->data); }
$res =& fopen($filename, 'rb');
$res = fopen($filename, 'rb');
if ($seek)
{
fseek($res , $seek);

View File

@@ -3792,7 +3792,7 @@ class PclZip
}
// ----- Write gz file format header
$v_binary_data = pack('va1a1Va1a1', 0x8b1f, Chr($p_entry['compression']), Chr(0x00), time(), Chr(0x00), Chr(3));
$v_binary_data = pack('va1a1Va1a1', 0x8b1f, chr($p_entry['compression']), chr(0x00), time(), chr(0x00), chr(3));
@fwrite($v_dest_file, $v_binary_data, 10);
// ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks
@@ -5084,11 +5084,11 @@ class PclZip
}
// ----- Get and memorize the magic_quote value
$this->magic_quotes_status = @get_magic_quotes_runtime();
$this->magic_quotes_status = ini_get('magic_quotes_runtime'); // @get_magic_quotes_runtime();
// ----- Disable magic_quotes
if ($this->magic_quotes_status == 1) {
@set_magic_quotes_runtime(0);
@ini_set('magic_quotes_runtime', 0);
}
// ----- Return
@@ -5118,7 +5118,7 @@ class PclZip
// ----- Swap back magic_quotes
if ($this->magic_quotes_status == 1) {
@set_magic_quotes_runtime($this->magic_quotes_status);
@ini_set('magic_quotes_runtime', 0); // set_magic_quotes_runtime($this->magic_quotes_status);
}
// ----- Return

View File

@@ -50,8 +50,8 @@ class e_search
$this->bullet = ''; // Use CSS instead.
preg_match_all('/(\W?".*?")|(.*?)(\s|$)/', $this->query, $boolean_keys);
sort($this -> keywords['split'] = array_unique(array_filter(str_replace('"', '', array_merge($boolean_keys[1], $boolean_keys[2])))));
$this->keywords['split'] = array_unique(array_filter(str_replace('"', '', array_merge($boolean_keys[1], $boolean_keys[2]))));
sort($this->keywords['split']);
foreach ($this -> keywords['split'] as $k_key => $key)
{

View File

@@ -811,7 +811,8 @@ class e_user_model extends e_admin_model
{
if($this->get('user_xup'))
{
return array_shift(explode('_', $this->get('user_xup')));
$provider = explode('_', $this->get('user_xup'));
return array_shift($provider);
}
return null;
}