X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fhelp.php;h=dce8635229be4e68375cca12ec13069415423297;hp=09fcb1ad67e342574fcd2eb9416b3c13b9a46e81;hb=895905c0f766ea03e85deab260b4bb1522dd0e3c;hpb=245a6892bf5c780904ef9677f24d624ea17e0749 diff --git a/src/help.php b/src/help.php index 09fcb1ad..dce86352 100644 --- a/src/help.php +++ b/src/help.php @@ -1,8 +1,9 @@ ") { + $ary[1] = ""; for ($n++;$n < count($doc) && (trim(strtolower($doc[$n])) != ""); $n++) { $ary[1] .= $doc[$n]; } } if (trim(strtolower($doc[$n])) == "") { + $ary[2] = ""; for ($n++;$n < count($doc) && (trim(strtolower($doc[$n])) != ""); $n++) { $ary[2] .= $doc[$n]; } } - } - if ($ary) { + } + if (isset($ary)) { $ary[3] = $n; return $ary; } else { @@ -75,14 +63,14 @@ $ary[1] = "ERROR: Help files are not in the right format!"; $ary[2] = "ERROR: Help files are not in the right format!"; return $ary; - } + } } } $ary[0] = "ERROR: Help files are not in the right format!"; $ary[1] = "ERROR: Help files are not in the right format!"; return $ary; } - + /**************[ END HELP FUNCTIONS ]******************/ ?> @@ -100,21 +88,21 @@ if ($HTTP_REFERER) { $ref = strtolower($HTTP_REFERER); if (strpos($ref, "src/compose")) - $context = "compose"; + $context = "compose"; else if (strpos($ref, "src/addr")) - $context = "address"; + $context = "address"; else if (strpos($ref, "src/folders")) - $context = "folders"; + $context = "folders"; else if (strpos($ref, "src/options")) - $context = "options"; + $context = "options"; else if (strpos($ref, "src/right_main")) - $context = "index"; + $context = "index"; else if (strpos($ref, "src/read_body")) - $context = "read"; + $context = "read"; else if (strpos($ref, "src/search")) - $context = "search"; + $context = "search"; } - + if (!$squirrelmail_language) $squirrelmail_language = "en"; @@ -135,8 +123,10 @@ echo ""; exit; } - + if ($help_exists) { + if (! isset($context)) + $context = ''; if ($context == "compose") $chapter = 4; else if ($context == "address") @@ -152,7 +142,7 @@ else if ($context == "search") $chapter = 8; - if (!$chapter) { + if (!isset($chapter)) { echo "
\n"; echo "
" . _("Table of Contents") . "

"; do_hook("help_chapter"); @@ -179,11 +169,12 @@ echo "
\n"; echo "$chapter - $help_info[0]

\n"; - if ($help_info[1]) + if (isset($help_info[1])) echo "$help_info[1]\n"; - else + else echo "

$help_info[2]

\n"; + $section = 0; for ($n = $help_info[3]; $n < count($doc); $n++) { $section++; $help_info = get_info($doc, $n); @@ -197,8 +188,8 @@ echo "
" . _("Top") . "
\n"; } } - do_hook("help_bottom"); + do_hook("help_bottom"); ?>
 
- + \ No newline at end of file