mirror of
https://github.com/e107inc/e107.git
synced 2025-08-10 08:34:09 +02:00
Code cleanup
This commit is contained in:
@@ -792,6 +792,17 @@ class pluginManager{
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Deprecated - plugin uses plugin.php
|
{ // Deprecated - plugin uses plugin.php
|
||||||
|
$eplug_table_names = null;
|
||||||
|
$eplug_prefs = null;
|
||||||
|
$eplug_comment_ids= null;
|
||||||
|
$eplug_array_pref= null;
|
||||||
|
$eplug_menu_name = null;
|
||||||
|
$eplug_link = null;
|
||||||
|
$eplug_link_url = null;
|
||||||
|
$eplug_link_name = null;
|
||||||
|
$eplug_userclass = null;
|
||||||
|
$eplug_version = null;
|
||||||
|
|
||||||
include(e_PLUGIN.$plug['plugin_path'].'/plugin.php');
|
include(e_PLUGIN.$plug['plugin_path'].'/plugin.php');
|
||||||
|
|
||||||
$func = $eplug_folder.'_uninstall';
|
$func = $eplug_folder.'_uninstall';
|
||||||
@@ -807,7 +818,7 @@ class pluginManager{
|
|||||||
$result = $plugin->manage_tables('remove', $eplug_table_names);
|
$result = $plugin->manage_tables('remove', $eplug_table_names);
|
||||||
if ($result !== TRUE)
|
if ($result !== TRUE)
|
||||||
{
|
{
|
||||||
$text .= EPL_ADLAN_27.' <b>'.$mySQLprefix.$result.'</b> - '.EPL_ADLAN_30.'<br />';
|
$text .= EPL_ADLAN_27.' <b>'.MPREFIX.$result.'</b> - '.EPL_ADLAN_30.'<br />';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -841,7 +852,7 @@ class pluginManager{
|
|||||||
|
|
||||||
if ($eplug_menu_name)
|
if ($eplug_menu_name)
|
||||||
{
|
{
|
||||||
$sql->db_Delete('menus', "menu_name='{$eplug_menu_name}' ");
|
$sql->delete('menus', "menu_name='{$eplug_menu_name}' ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($eplug_link)
|
if ($eplug_link)
|
||||||
@@ -890,7 +901,7 @@ class pluginManager{
|
|||||||
|
|
||||||
$this->show_message($text, E_MESSAGE_SUCCESS);
|
$this->show_message($text, E_MESSAGE_SUCCESS);
|
||||||
// $ns->tablerender(EPL_ADLAN_1.' '.$tp->toHtml($plug['plugin_name'], "", "defs,emotes_off,no_make_clickable"), $text);
|
// $ns->tablerender(EPL_ADLAN_1.' '.$tp->toHtml($plug['plugin_name'], "", "defs,emotes_off,no_make_clickable"), $text);
|
||||||
$text = '';
|
|
||||||
$this->action = 'installed';
|
$this->action = 'installed';
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -924,12 +935,12 @@ class pluginManager{
|
|||||||
|
|
||||||
echo $mes->render();
|
echo $mes->render();
|
||||||
|
|
||||||
return;
|
return true;
|
||||||
|
|
||||||
// ----------------- Everything below is unused.
|
// ----------------- Everything below is unused.
|
||||||
|
/*
|
||||||
extract($_FILES);
|
extract($_FILES);
|
||||||
/* check if e_PLUGIN dir is writable ... */
|
|
||||||
if(!is_writable(e_PLUGIN))
|
if(!is_writable(e_PLUGIN))
|
||||||
{
|
{
|
||||||
// still not writable - spawn error message
|
// still not writable - spawn error message
|
||||||
@@ -993,7 +1004,7 @@ class pluginManager{
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ok it looks like the unarc succeeded - continue */
|
// ok it looks like the unarc succeeded - continue
|
||||||
|
|
||||||
// get folder name ...
|
// get folder name ...
|
||||||
|
|
||||||
@@ -1001,24 +1012,24 @@ class pluginManager{
|
|||||||
|
|
||||||
if(file_exists(e_PLUGIN.$folderName."/plugin.php") || file_exists(e_PLUGIN.$folderName."/plugin.xml"))
|
if(file_exists(e_PLUGIN.$folderName."/plugin.php") || file_exists(e_PLUGIN.$folderName."/plugin.xml"))
|
||||||
{
|
{
|
||||||
/* upload is a plugin */
|
|
||||||
e107::getRender()->tablerender(EPL_ADLAN_40, EPL_ADLAN_43);
|
e107::getRender()->tablerender(EPL_ADLAN_40, EPL_ADLAN_43);
|
||||||
}
|
}
|
||||||
elseif(file_exists(e_PLUGIN.$folderName."/theme.php") || file_exists(e_PLUGIN.$folderName."/theme.xml"))
|
elseif(file_exists(e_PLUGIN.$folderName."/theme.php") || file_exists(e_PLUGIN.$folderName."/theme.xml"))
|
||||||
{
|
{
|
||||||
/* upload is a menu */
|
|
||||||
e107::getRender()->tablerender(EPL_ADLAN_40, EPL_ADLAN_45);
|
e107::getRender()->tablerender(EPL_ADLAN_40, EPL_ADLAN_45);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* upload is unlocatable */
|
// upload is unlocatable
|
||||||
e107::getRender()->tablerender(EPL_ADLAN_40, EPL_ADLAN_98.' '.$fileList[0]['stored_filename']);
|
e107::getRender()->tablerender(EPL_ADLAN_40, EPL_ADLAN_98.' '.$fileList[0]['stored_filename']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* attempt to delete uploaded archive */
|
// attempt to delete uploaded archive
|
||||||
@unlink(e_PLUGIN.$archiveName);
|
@unlink(e_PLUGIN.$archiveName);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1027,7 +1038,7 @@ class pluginManager{
|
|||||||
|
|
||||||
function pluginInstall()
|
function pluginInstall()
|
||||||
{
|
{
|
||||||
global $plugin,$admin_log,$eplug_folder;
|
global $plugin;
|
||||||
$text = $plugin->install_plugin($this->id);
|
$text = $plugin->install_plugin($this->id);
|
||||||
|
|
||||||
$log = e107::getAdminLog();
|
$log = e107::getAdminLog();
|
||||||
@@ -1065,6 +1076,8 @@ class pluginManager{
|
|||||||
$mes = e107::getMessage();
|
$mes = e107::getMessage();
|
||||||
$plug = $plugin->getinfo($this->id);
|
$plug = $plugin->getinfo($this->id);
|
||||||
|
|
||||||
|
$text = '';
|
||||||
|
|
||||||
$_path = e_PLUGIN.$plug['plugin_path'].'/';
|
$_path = e_PLUGIN.$plug['plugin_path'].'/';
|
||||||
if(file_exists($_path.'plugin.xml'))
|
if(file_exists($_path.'plugin.xml'))
|
||||||
{
|
{
|
||||||
@@ -1218,7 +1231,7 @@ class pluginManager{
|
|||||||
|
|
||||||
if(!is_writable(e_PLUGIN))
|
if(!is_writable(e_PLUGIN))
|
||||||
{
|
{
|
||||||
e107::getRender()->tablerender(EPL_ADLAN_40, EPL_ADLAN_44);
|
$text = EPL_ADLAN_44;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1265,7 +1278,6 @@ class pluginManager{
|
|||||||
|
|
||||||
global $plugin;
|
global $plugin;
|
||||||
$frm = e107::getForm();
|
$frm = e107::getForm();
|
||||||
$e107 = e107::getInstance();
|
|
||||||
$mes = e107::getMessage();
|
$mes = e107::getMessage();
|
||||||
|
|
||||||
if($this->action == "" || $this->action == "installed")
|
if($this->action == "" || $this->action == "installed")
|
||||||
@@ -1748,7 +1760,7 @@ class pluginLanguage
|
|||||||
|
|
||||||
if(!empty($_GET['newplugin']) && $_GET['step']==2)
|
if(!empty($_GET['newplugin']) && $_GET['step']==2)
|
||||||
{
|
{
|
||||||
$plugin = e107::getParser()->filter($_GET['newplugin'],'w');
|
$plugin = e107::getParser()->filter($_GET['newplugin'],'file');
|
||||||
$this->step2($plugin);
|
$this->step2($plugin);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -2204,7 +2216,7 @@ class pluginBuilder
|
|||||||
|
|
||||||
if(!empty($_GET['newplugin']))
|
if(!empty($_GET['newplugin']))
|
||||||
{
|
{
|
||||||
$this->pluginName = e107::getParser()->filter($_GET['newplugin'],'w');
|
$this->pluginName = e107::getParser()->filter($_GET['newplugin'],'file');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty($_GET['createFiles']))
|
if(!empty($_GET['createFiles']))
|
||||||
@@ -2366,7 +2378,7 @@ class pluginBuilder
|
|||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
|
||||||
|
|
||||||
$newplug = $tp->filter($_GET['newplugin'],'w');
|
$newplug = $tp->filter($_GET['newplugin'],'file');
|
||||||
$this->pluginName = $newplug;
|
$this->pluginName = $newplug;
|
||||||
|
|
||||||
$sqlFile = e_PLUGIN.$newplug."/".$newplug."_sql.php";
|
$sqlFile = e_PLUGIN.$newplug."/".$newplug."_sql.php";
|
||||||
@@ -3579,7 +3591,7 @@ TEMPLATE;
|
|||||||
|
|
||||||
|
|
||||||
unset($_POST['step'],$_POST['xml'], $_POST['addons']);
|
unset($_POST['step'],$_POST['xml'], $_POST['addons']);
|
||||||
$thePlugin = $tp->filter($_POST['newplugin']);
|
$thePlugin = $tp->filter($_POST['newplugin'],'file');
|
||||||
|
|
||||||
$text = "\n
|
$text = "\n
|
||||||
// Generated e107 Plugin Admin Area
|
// Generated e107 Plugin Admin Area
|
||||||
|
@@ -903,7 +903,7 @@ class e107plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function manage_userclass($action, $class_name, $class_description)
|
function manage_userclass($action, $class_name, $class_description='')
|
||||||
{
|
{
|
||||||
global $e107;
|
global $e107;
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
Reference in New Issue
Block a user