mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Bugtracker #4147 - admin help would sometimes display when it shouldn't - thanks marj
This commit is contained in:
@@ -1,30 +1,39 @@
|
|||||||
if (ADMIN) {
|
if (ADMIN)
|
||||||
global $ns, $pref;
|
{
|
||||||
if (!($handle=opendir(e_LANGUAGEDIR.e_LANGUAGE."/admin/help/"))) {
|
global $ns, $pref;
|
||||||
$handle=opendir(e_LANGUAGEDIR."English/admin/help/");
|
ob_start();
|
||||||
}
|
$help_text = "";
|
||||||
ob_start();
|
if(strpos(e_SELF, e_ADMIN_ABS) !== FALSE)
|
||||||
$text = "";
|
{
|
||||||
while(false !== ($file = readdir($handle))) {
|
if (!($handle=opendir(e_LANGUAGEDIR.e_LANGUAGE."/admin/help/")))
|
||||||
if ($file != "." && $file != ".." && $file != "CVS") {
|
|
||||||
if (strpos(e_SELF, $file) !== FALSE) {
|
|
||||||
if (is_readable(e_LANGUAGEDIR.e_LANGUAGE."/admin/help/".$file)) {
|
|
||||||
include_once(e_LANGUAGEDIR.e_LANGUAGE."/admin/help/".$file);
|
|
||||||
} else if (is_readable(e_LANGUAGEDIR."English/admin/help/".$file)) {
|
|
||||||
include_once(e_LANGUAGEDIR."English/admin/help/".$file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
closedir($handle);
|
|
||||||
$plugpath = getcwd()."/help.php";
|
|
||||||
if(file_exists($plugpath))
|
|
||||||
{
|
{
|
||||||
@require_once($plugpath);
|
$handle=opendir(e_LANGUAGEDIR."English/admin/help/");
|
||||||
|
}
|
||||||
|
while(false !== ($file = readdir($handle)))
|
||||||
|
{
|
||||||
|
if ($file != "." && $file != ".." && $file != "CVS")
|
||||||
|
{
|
||||||
|
if (strpos(e_SELF, $file) !== FALSE)
|
||||||
|
{
|
||||||
|
if (is_readable(e_LANGUAGEDIR.e_LANGUAGE."/admin/help/".$file))
|
||||||
|
{
|
||||||
|
include_once(e_LANGUAGEDIR.e_LANGUAGE."/admin/help/".$file);
|
||||||
|
}
|
||||||
|
elseif (is_readable(e_LANGUAGEDIR."English/admin/help/".$file))
|
||||||
|
{
|
||||||
|
include_once(e_LANGUAGEDIR."English/admin/help/".$file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$help_text = ob_get_contents();
|
closedir($handle);
|
||||||
ob_end_clean();
|
}
|
||||||
return $help_text;
|
$plugpath = getcwd()."/help.php";
|
||||||
|
if(file_exists($plugpath))
|
||||||
|
{
|
||||||
|
@require_once($plugpath);
|
||||||
|
}
|
||||||
|
$help_text = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
return $help_text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user