Pārlūkot izejas kodu

* Added the "global" stuff

Reason behind "global" stuff:
  Since we now can include("../dir/any_file.php") at any time, we need to
make sure that all global variables are truly registered as globals.  If I
didn't have them, and within a function, I included a file that was supposed
to set globals, it would not and errors would be generated and improper
execution of the program would result.
Tyler Akins 24 gadi atpakaļ
vecāks
revīzija
61987ae4dc
2 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 1 1
      config/conf.pl
  2. 1 0
      config/config_default.php

+ 1 - 1
config/conf.pl

@@ -1579,7 +1579,7 @@ sub save_data {
    print FILE "\t\$config_use_color = $config_use_color;\n"; 
    print FILE "\t\$config_use_color = $config_use_color;\n"; 
    print FILE "\n";
    print FILE "\n";
 
 
-   print FILE "\tglobal \$org_name, \$org_logo, \$org_title;\n";
+   print FILE "\tglobal \$org_name, \$org_logo, \$org_title, \$signout_page;\n";
    print FILE "\t\$org_name   = \"$org_name\";\n";
    print FILE "\t\$org_name   = \"$org_name\";\n";
    print FILE "\t\$org_logo   = \"$org_logo\";\n";
    print FILE "\t\$org_logo   = \"$org_logo\";\n";
    print FILE "\t\$org_title  = \"$org_title\";\n";
    print FILE "\t\$org_title  = \"$org_title\";\n";

+ 1 - 0
config/config_default.php

@@ -79,6 +79,7 @@
 // For instance, the following would return the user to your
 // For instance, the following would return the user to your
 // home page:    $signout_page = "/";
 // home page:    $signout_page = "/";
 // Set to the empty string to continue to use the default signout page.
 // Set to the empty string to continue to use the default signout page.
+    global $signout_page;
     $signout_page = "";
     $signout_page = "";
 
 
 //  Many servers store mail in your home directory.  With this, they
 //  Many servers store mail in your home directory.  With this, they