mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +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();
|
$tp = e107::getParser();
|
||||||
$pref = e107::getPref();
|
$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();
|
$spref = $config->getPref();
|
||||||
|
|
||||||
@@ -1174,7 +1174,8 @@ class system_tools
|
|||||||
|
|
||||||
$text .= "<select class='tbox' name='type_select' onchange='urljump(this.options[selectedIndex].value)' >
|
$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=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
|
// 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/config' => array('caption'=> LAN_EURL_MENU_CONFIG, 'perm' => 'L'),
|
||||||
'main/alias' => array('caption'=> LAN_EURL_MENU_ALIASES, 'perm' => 'L'),
|
'main/alias' => array('caption'=> LAN_EURL_MENU_ALIASES, 'perm' => 'L'),
|
||||||
'main/settings' => array('caption'=> LAN_EURL_MENU_SETTINGS, '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'),
|
// '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;
|
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()
|
public function SettingsObserver()
|
||||||
{
|
{
|
||||||
// main module pref dropdown
|
// main module pref dropdown
|
||||||
|
@@ -157,10 +157,13 @@ class notify_config
|
|||||||
<li><a href='#mail' data-toggle='tab'>Mail</a></li>
|
<li><a href='#mail' data-toggle='tab'>Mail</a></li>
|
||||||
<li><a href='#files' data-toggle='tab'>Files</a></li>";
|
<li><a href='#files' data-toggle='tab'>Files</a></li>";
|
||||||
|
|
||||||
|
if(!empty($this->notify_prefs['plugins']))
|
||||||
|
{
|
||||||
foreach ($this -> notify_prefs['plugins'] as $id => $var)
|
foreach ($this -> notify_prefs['plugins'] as $id => $var)
|
||||||
{
|
{
|
||||||
$text .= "<li><a href='#notify-".$id."' data-toggle='tab'>".ucfirst($id)."</a></li>";
|
$text .= "<li><a href='#notify-".$id."' data-toggle='tab'>".ucfirst($id)."</a></li>";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$text .= "
|
$text .= "
|
||||||
</ul>
|
</ul>
|
||||||
@@ -245,6 +248,9 @@ class notify_config
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</div>";
|
</div>";
|
||||||
|
|
||||||
|
if(!empty($this->notify_prefs['plugins']))
|
||||||
|
{
|
||||||
|
|
||||||
foreach ($this->notify_prefs['plugins'] as $plugin_id => $plugin_settings)
|
foreach ($this->notify_prefs['plugins'] as $plugin_id => $plugin_settings)
|
||||||
{
|
{
|
||||||
if(is_readable(e_PLUGIN.$plugin_id.'/e_notify.php'))
|
if(is_readable(e_PLUGIN.$plugin_id.'/e_notify.php'))
|
||||||
@@ -273,6 +279,7 @@ class notify_config
|
|||||||
</div>";
|
</div>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$text .= "
|
$text .= "
|
||||||
|
|
||||||
|
@@ -90,7 +90,7 @@ class db_verify
|
|||||||
*/
|
*/
|
||||||
function verify()
|
function verify()
|
||||||
{
|
{
|
||||||
print_a($_POST);
|
|
||||||
if(vartrue($_POST['verify_table']))
|
if(vartrue($_POST['verify_table']))
|
||||||
{
|
{
|
||||||
$this->runComparison($_POST['verify_table']);
|
$this->runComparison($_POST['verify_table']);
|
||||||
|
@@ -1828,7 +1828,7 @@ class e107
|
|||||||
* @param string $methodName [optional] (if different from 'config')
|
* @param string $methodName [optional] (if different from 'config')
|
||||||
* @return none
|
* @return none
|
||||||
*/
|
*/
|
||||||
public function getAddonConfig($addonName, $className = '', $methodName='config', $param=null )
|
public static function getAddonConfig($addonName, $className = '', $methodName='config', $param=null )
|
||||||
{
|
{
|
||||||
$new_addon = array();
|
$new_addon = array();
|
||||||
$sql = e107::getDb(); // Might be used by older plugins.
|
$sql = e107::getDb(); // Might be used by older plugins.
|
||||||
|
Reference in New Issue
Block a user