mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 12:20:44 +02:00
Removed PHP warnings. Added Simple e_url.php redirect list to admin area. Removed debug info from db-verify.
This commit is contained in:
@@ -1161,7 +1161,7 @@ class system_tools
|
||||
$tp = e107::getParser();
|
||||
$pref = e107::getPref();
|
||||
|
||||
$config = ($type == 'core' || $type == 'search' ) ? e107::getConfig($type) : e107::getPlugConfig($type);
|
||||
$config = ($type == 'core' || $type == 'search' || $type == 'notify') ? e107::getConfig($type) : e107::getPlugConfig($type);
|
||||
|
||||
$spref = $config->getPref();
|
||||
|
||||
@@ -1174,7 +1174,8 @@ class system_tools
|
||||
|
||||
$text .= "<select class='tbox' name='type_select' onchange='urljump(this.options[selectedIndex].value)' >
|
||||
<option value='".e_ADMIN."db.php?mode=".$_GET['mode']."&type=core'>Core</option>\n
|
||||
<option value='".e_ADMIN."db.php?mode=".$_GET['mode']."&type=search'>Search</option>\n";
|
||||
<option value='".e_ADMIN."db.php?mode=".$_GET['mode']."&type=search'>Search</option>
|
||||
<option value='".e_ADMIN."db.php?mode=".$_GET['mode']."&type=notify'>Notify</option>\n";
|
||||
|
||||
// e107::getConfig($type)->aliases
|
||||
|
||||
|
@@ -39,6 +39,7 @@ class eurl_admin extends e_admin_dispatcher
|
||||
'main/config' => array('caption'=> LAN_EURL_MENU_CONFIG, 'perm' => 'L'),
|
||||
'main/alias' => array('caption'=> LAN_EURL_MENU_ALIASES, 'perm' => 'L'),
|
||||
'main/settings' => array('caption'=> LAN_EURL_MENU_SETTINGS, 'perm' => 'L'),
|
||||
'main/simple' => array('caption'=> 'Redirects', 'perm' => 'L'), //TODO LAN
|
||||
// 'main/help' => array('caption'=> LAN_EURL_MENU_HELP, 'perm' => 'L'),
|
||||
);
|
||||
|
||||
@@ -147,6 +148,39 @@ class eurl_admin_ui extends e_admin_controller_ui
|
||||
return LAN_EURL_UC;
|
||||
}
|
||||
|
||||
public function simplePage()
|
||||
{
|
||||
// $this->addTitle("Simple Redirects");
|
||||
$eUrl =e107::getAddonConfig('e_url');
|
||||
|
||||
if(empty($eUrl))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$text = "";
|
||||
|
||||
foreach($eUrl as $plug=>$val)
|
||||
{
|
||||
$text .= "<h5>".$plug."</h5>";
|
||||
$text .= "<table class='table table-striped table-bordered'>";
|
||||
$text .= "<tr><th>Regular Expression</th>
|
||||
<th>".LAN_URL."</th>
|
||||
</tr>";
|
||||
|
||||
foreach($val as $k=>$v)
|
||||
{
|
||||
$text .= "<tr><td style='width:50%'>".$v['regex']."</td><td>".$v['redirect']."</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
$text .= "</table>";
|
||||
}
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
public function SettingsObserver()
|
||||
{
|
||||
// main module pref dropdown
|
||||
|
@@ -157,9 +157,12 @@ class notify_config
|
||||
<li><a href='#mail' data-toggle='tab'>Mail</a></li>
|
||||
<li><a href='#files' data-toggle='tab'>Files</a></li>";
|
||||
|
||||
foreach ($this -> notify_prefs['plugins'] as $id => $var)
|
||||
if(!empty($this->notify_prefs['plugins']))
|
||||
{
|
||||
$text .= "<li><a href='#notify-".$id."' data-toggle='tab'>".ucfirst($id)."</a></li>";
|
||||
foreach ($this -> notify_prefs['plugins'] as $id => $var)
|
||||
{
|
||||
$text .= "<li><a href='#notify-".$id."' data-toggle='tab'>".ucfirst($id)."</a></li>";
|
||||
}
|
||||
}
|
||||
|
||||
$text .= "
|
||||
@@ -245,32 +248,36 @@ class notify_config
|
||||
</fieldset>
|
||||
</div>";
|
||||
|
||||
foreach ($this->notify_prefs['plugins'] as $plugin_id => $plugin_settings)
|
||||
if(!empty($this->notify_prefs['plugins']))
|
||||
{
|
||||
if(is_readable(e_PLUGIN.$plugin_id.'/e_notify.php'))
|
||||
|
||||
foreach ($this->notify_prefs['plugins'] as $plugin_id => $plugin_settings)
|
||||
{
|
||||
$config_category = $this->pluginConfig[$plugin_id]['category'];
|
||||
$legacy = $this->pluginConfig[$plugin_id]['legacy'];
|
||||
|
||||
// require(e_PLUGIN.$plugin_id.'/e_notify.php');
|
||||
|
||||
$text .= "<div class='tab-pane' id='notify-".$plugin_id."'>
|
||||
<fieldset id='core-notify-".str_replace(" ","_",$config_category)."'>
|
||||
<legend>".$config_category."</legend>
|
||||
<table class='table adminform'>
|
||||
<colgroup>
|
||||
<col class='col-label' />
|
||||
<col class='col-control' />
|
||||
</colgroup>";
|
||||
;
|
||||
|
||||
foreach ($this->pluginConfig[$plugin_id]['events'] as $event_id => $event_text)
|
||||
if(is_readable(e_PLUGIN.$plugin_id.'/e_notify.php'))
|
||||
{
|
||||
$text .= $this->render_event($event_id, $event_text, $plugin_id, $legacy);
|
||||
$config_category = $this->pluginConfig[$plugin_id]['category'];
|
||||
$legacy = $this->pluginConfig[$plugin_id]['legacy'];
|
||||
|
||||
// require(e_PLUGIN.$plugin_id.'/e_notify.php');
|
||||
|
||||
$text .= "<div class='tab-pane' id='notify-".$plugin_id."'>
|
||||
<fieldset id='core-notify-".str_replace(" ","_",$config_category)."'>
|
||||
<legend>".$config_category."</legend>
|
||||
<table class='table adminform'>
|
||||
<colgroup>
|
||||
<col class='col-label' />
|
||||
<col class='col-control' />
|
||||
</colgroup>";
|
||||
;
|
||||
|
||||
foreach ($this->pluginConfig[$plugin_id]['events'] as $event_id => $event_text)
|
||||
{
|
||||
$text .= $this->render_event($event_id, $event_text, $plugin_id, $legacy);
|
||||
}
|
||||
|
||||
$text .= "</table>
|
||||
</div>";
|
||||
}
|
||||
|
||||
$text .= "</table>
|
||||
</div>";
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -90,7 +90,7 @@ class db_verify
|
||||
*/
|
||||
function verify()
|
||||
{
|
||||
print_a($_POST);
|
||||
|
||||
if(vartrue($_POST['verify_table']))
|
||||
{
|
||||
$this->runComparison($_POST['verify_table']);
|
||||
|
@@ -1828,7 +1828,7 @@ class e107
|
||||
* @param string $methodName [optional] (if different from 'config')
|
||||
* @return none
|
||||
*/
|
||||
public function getAddonConfig($addonName, $className = '', $methodName='config', $param=null )
|
||||
public static function getAddonConfig($addonName, $className = '', $methodName='config', $param=null )
|
||||
{
|
||||
$new_addon = array();
|
||||
$sql = e107::getDb(); // Might be used by older plugins.
|
||||
|
Reference in New Issue
Block a user