mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Backward compatibility code for old plugins.
This commit is contained in:
@@ -700,7 +700,9 @@ class admin_shortcodes
|
|||||||
|
|
||||||
// FIXME @TODO $plugPath is using the URL to detect the path. It should use $_SERVER['SCRIPT_FILENAME']
|
// FIXME @TODO $plugPath is using the URL to detect the path. It should use $_SERVER['SCRIPT_FILENAME']
|
||||||
$plugpath = e_PLUGIN.str_replace(basename(e_SELF),'',str_replace('/'.$plugindir,'','/'.strstr(e_SELF,$plugindir))).'admin_menu.php';
|
$plugpath = e_PLUGIN.str_replace(basename(e_SELF),'',str_replace('/'.$plugindir,'','/'.strstr(e_SELF,$plugindir))).'admin_menu.php';
|
||||||
|
|
||||||
|
$action = e_QUERY; // required.
|
||||||
|
|
||||||
if(file_exists($plugpath))
|
if(file_exists($plugpath))
|
||||||
{
|
{
|
||||||
if (!$parm)
|
if (!$parm)
|
||||||
|
@@ -4378,6 +4378,7 @@ class e107
|
|||||||
|| (preg_match('/^\/(.*?)\/user(settings\.php|\/edit)(\?|\/)(\d+)$/i', $_SERVER['REQUEST_URI']) && ADMIN)
|
|| (preg_match('/^\/(.*?)\/user(settings\.php|\/edit)(\?|\/)(\d+)$/i', $_SERVER['REQUEST_URI']) && ADMIN)
|
||||||
|| ($isPluginDir && $curPage === 'prefs.php') //BC Fix for old plugins
|
|| ($isPluginDir && $curPage === 'prefs.php') //BC Fix for old plugins
|
||||||
|| ($isPluginDir && $curPage === 'config.php') // BC Fix for old plugins
|
|| ($isPluginDir && $curPage === 'config.php') // BC Fix for old plugins
|
||||||
|
|| ($isPluginDir && strpos($curPage,'_config.php')!==false) // BC Fix for old plugins eg. dtree_menu
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$inAdminDir = TRUE;
|
$inAdminDir = TRUE;
|
||||||
|
@@ -5301,3 +5301,64 @@ class e_profanityFilter
|
|||||||
return preg_replace("#a|e|i|o|u#i", "*" , $matches[0]);
|
return preg_replace("#a|e|i|o|u#i", "*" , $matches[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Backwards Compatibility Class textparse
|
||||||
|
*/
|
||||||
|
class textparse {
|
||||||
|
|
||||||
|
function editparse($text, $mode = "off")
|
||||||
|
{
|
||||||
|
if(E107_DBG_DEPRECATED)
|
||||||
|
{
|
||||||
|
e107::getDebug()->logDeprecated();
|
||||||
|
}
|
||||||
|
|
||||||
|
return e107::getParser()->toForm($text);
|
||||||
|
}
|
||||||
|
|
||||||
|
function tpa($text, $mode = '', $referrer = '', $highlight_search = false, $poster_id = '')
|
||||||
|
{
|
||||||
|
if(E107_DBG_DEPRECATED)
|
||||||
|
{
|
||||||
|
e107::getDebug()->logDeprecated();
|
||||||
|
}
|
||||||
|
|
||||||
|
return e107::getParser()->toHTML($text, true, $mode, $poster_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
function tpj($text)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(E107_DBG_DEPRECATED)
|
||||||
|
{
|
||||||
|
e107::getDebug()->logDeprecated();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
|
||||||
|
function formtpa($text, $mode = '')
|
||||||
|
{
|
||||||
|
|
||||||
|
if(E107_DBG_DEPRECATED)
|
||||||
|
{
|
||||||
|
e107::getDebug()->logDeprecated();
|
||||||
|
}
|
||||||
|
|
||||||
|
return e107::getParser()->toDB($text);
|
||||||
|
}
|
||||||
|
|
||||||
|
function formtparev($text)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(E107_DBG_DEPRECATED)
|
||||||
|
{
|
||||||
|
e107::getDebug()->logDeprecated();
|
||||||
|
}
|
||||||
|
|
||||||
|
return e107::getParser()->toForm($text);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user