소스 검색

* 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 년 전
부모
커밋
61987ae4dc
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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 "\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_logo   = \"$org_logo\";\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
 // home page:    $signout_page = "/";
 // Set to the empty string to continue to use the default signout page.
+    global $signout_page;
     $signout_page = "";
 
 //  Many servers store mail in your home directory.  With this, they