Browse Source

add PAGE_NAME constant to every page under src/.
These can/will be used in various tests, and for consistency every page
sets the constant to the appropriate setting.

Thijs Kinkhorst 18 years ago
parent
commit
ec69e0299d

+ 3 - 0
src/about.php

@@ -16,6 +16,9 @@
  * @package squirrelmail
  */
 
+/** This is the about page */
+define('PAGE_NAME', 'about');
+
 /**
  * Include the SquirrelMail initialization file.
  */

+ 3 - 0
src/addrbook_popup.php

@@ -12,6 +12,9 @@
  * @subpackage addressbook
  */
 
+/** This is the addrbook_popup page */
+define('PAGE_NAME', 'addrbook_popup');
+
 /**
  * Include the SquirrelMail initialization file.
  */

+ 3 - 0
src/addrbook_search.php

@@ -15,6 +15,9 @@
  * @subpackage addressbook
  */
 
+/** This is the addrbook_search page */
+define('PAGE_NAME', 'addrbook_search');
+
 /**
  * Include the SquirrelMail initialization file.
  */

+ 3 - 0
src/addrbook_search_html.php

@@ -20,6 +20,9 @@
  * init.php.
  */
 if (!isset($bInit)) {
+    /** This is the addrbook_search_html page */
+    define('PAGE_NAME', 'addrbook_search_html');
+
     include('../include/init.php');
 }
 

+ 3 - 1
src/addressbook.php

@@ -12,6 +12,9 @@
  * @subpackage addressbook
  */
 
+/** This is the addressbook page */
+define('PAGE_NAME', 'addressbook');
+
 /**
  * Include the SquirrelMail initialization file.
  */
@@ -279,4 +282,3 @@ echo "</form>\n";
 do_hook('addressbook_bottom', $null);
 
 $oTemplate->display('footer.tpl');
-?>

+ 3 - 0
src/compose.php

@@ -16,6 +16,9 @@
  * @package squirrelmail
  */
 
+/** This is the compose page */
+define('PAGE_NAME', 'compose');
+
 /**
  * Include the SquirrelMail initialization file.
  */

+ 3 - 1
src/configtest.php

@@ -15,6 +15,9 @@
  * If it throws errors you need to adjust your config.      *
  ************************************************************/
 
+/** This is the configtest page */
+define('PAGE_NAME', 'configtest');
+
 // This script could really use some restructuring as it has grown quite rapidly
 // but is not very 'clean'. Feel free to get some structure into this thing.
 
@@ -920,4 +923,3 @@ if ($warnings) {
 EOF;
     echo $footer;
 }
-?>

+ 2 - 1
src/delete_message.php

@@ -11,10 +11,11 @@
  * @package squirrelmail
  */
 
+define('PAGE_NAME', 'delete_message');
+
 /**
  * Include the SquirrelMail initialization file.
  */
 include('../include/init.php');
 error_box('delete_message.php script is obsolete since 1.5.1.');
 $oTemplate->display('footer.tpl');
-?>

+ 3 - 0
src/download.php

@@ -12,6 +12,9 @@
  * @package squirrelmail
  */
 
+/** This is the download page */
+define('PAGE_NAME', 'download');
+
 /**
  * Include the SquirrelMail initialization file.
  */

+ 3 - 1
src/empty_trash.php

@@ -12,6 +12,9 @@
  * @package squirrelmail
  */
 
+/** This is the empty_trash page */
+define('PAGE_NAME', 'empty_trash');
+
 /**
  * Include the SquirrelMail initialization file.
  */
@@ -71,4 +74,3 @@ session_write_close();
 $location = get_location();
 header ("Location: $location/left_main.php");
 
-?>

+ 3 - 1
src/folders.php

@@ -12,6 +12,9 @@
  * @package squirrelmail
  */
 
+/** This is the folders page */
+define('PAGE_NAME', 'folders');
+
 /**
  * Include the SquirrelMail initialization file.
  */
@@ -193,4 +196,3 @@ $oTemplate->assign('subbox_option_list', $subbox_option_list);
 $oTemplate->display('folder_manip.tpl');
 
 $oTemplate->display('footer.tpl');
-?>

+ 3 - 1
src/help.php

@@ -11,6 +11,9 @@
  * @package squirrelmail
  */
 
+/** This is the help page */
+define('PAGE_NAME', 'help');
+
 /**
  * Include the SquirrelMail initialization file.
  */
@@ -237,4 +240,3 @@ if ( $chapter == 0 || !isset( $helpdir[$chapter-1] ) ) {
 do_hook('help_bottom', $null);
 
 $oTemplate->display('footer.tpl');
-?>

+ 3 - 0
src/image.php

@@ -11,6 +11,9 @@
  * @package squirrelmail
  */
 
+/** This is the image page */
+define('PAGE_NAME', 'image');
+
 /**
  * Include the SquirrelMail initialization file.
  */

+ 3 - 0
src/left_main.php

@@ -12,6 +12,9 @@
  * @package squirrelmail
  */
 
+/** This is the left_main page */
+define('PAGE_NAME', 'left_main');
+
 /**
  * Include the SquirrelMail initialization file.
  */

+ 3 - 0
src/login.php

@@ -12,6 +12,9 @@
  * @package squirrelmail
  */
 
+/** This is the login page */
+define('PAGE_NAME', 'login');
+
 // reduces the files included in init.php
 $sInitLocation = 'login';
 

+ 3 - 1
src/mailto.php

@@ -17,6 +17,9 @@
  * @package squirrelmail
  */
 
+/** This is the mailto page */
+define('PAGE_NAME', 'mailto');
+
 // reduce the included files in int.php
 $bLogin = true;
 
@@ -78,4 +81,3 @@ if($force_login == false && sqsession_is_registered('user_is_logged_in')) {
 session_write_close();
 header('Location: ' . get_location() . '/' . $redirect);
 
-?>

+ 3 - 0
src/options.php

@@ -13,6 +13,9 @@
  * @subpackage prefs
  */
 
+/** This is the options page */
+define('PAGE_NAME', 'options');
+
 /**
  * Include the SquirrelMail initialization file.
  */

+ 3 - 1
src/options_highlight.php

@@ -12,6 +12,9 @@
  * @subpackage prefs
  */
 
+/** This is the options_highlight page */
+define('PAGE_NAME', 'options_highlight');
+
 /**
  * Include the SquirrelMail initialization file.
  */
@@ -346,4 +349,3 @@ if ($action == 'edit' || $action == 'add') {
 do_hook('options_highlight_bottom', $null);
 
 $oTemplate->display('footer.tpl');
-?>

+ 3 - 1
src/options_identities.php

@@ -13,6 +13,9 @@
  * @since 1.1.3
  */
 
+/** This is the options_identities page */
+define('PAGE_NAME', 'options_identities');
+
 /**
  * Include the SquirrelMail initialization file.
  */
@@ -226,4 +229,3 @@ function sti_textarea( $title, $name, $data, $bgcolor ) {
 
 }
 
-?>

+ 3 - 1
src/options_order.php

@@ -11,6 +11,9 @@
  * @subpackage prefs
  */
 
+/** This is the options_order page */
+define('PAGE_NAME', 'options_order');
+
 /**
  * Include the SquirrelMail initialization file.
  */
@@ -161,4 +164,3 @@ $oTemplate->assign('addField_action', $PHP_SELF);
 $oTemplate->display('options_order.tpl');
 
 $oTemplate->display('footer.tpl');
-?>

+ 3 - 0
src/printer_friendly_bottom.php

@@ -14,6 +14,9 @@
  * @package squirrelmail
  */
 
+/** This is the printer_friendly_bottom page */
+define('PAGE_NAME', 'printer_friendly_bottom');
+
 /**
  * Include the SquirrelMail initialization file.
  */

+ 3 - 0
src/printer_friendly_main.php

@@ -9,6 +9,9 @@
  * @package squirrelmail
  */
 
+/** This is the printer_friendly_main page */
+define('PAGE_NAME', 'printer_friendly_main');
+
 /**
  * Include the SquirrelMail initialization file.
  */

+ 3 - 1
src/printer_friendly_top.php

@@ -12,6 +12,9 @@
  * @package squirrelmail
  */
 
+/** This is the printer_friendly_top page */
+define('PAGE_NAME', 'printer_friendly_top');
+
 /**
  * Include the SquirrelMail initialization file.
  */
@@ -23,4 +26,3 @@ $oErrorHandler->setDelayedErrors(true);
 $oTemplate->display('printer_friendly_top.tpl');
 
 $oTemplate->display('footer.tpl');
-?>

+ 3 - 1
src/read_body.php

@@ -12,6 +12,9 @@
  * @package squirrelmail
  */
 
+/** This is the read_body page */
+define('PAGE_NAME', 'read_body');
+
 /**
  * Include the SquirrelMail initialization file.
  */
@@ -978,4 +981,3 @@ formatMenuBar($aMailbox, $passed_id, $passed_ent_id, $message, false, FALSE);
 do_hook('read_body_bottom', $null);
 sqimap_logout($imapConnection);
 $oTemplate->display('footer.tpl');
-?>

+ 3 - 0
src/redirect.php

@@ -12,6 +12,9 @@
  */
 $sInitLocation = 'redirect';
 
+/** This is the redirect page */
+define('PAGE_NAME', 'redirect');
+
 /**
  * Include the SquirrelMail initialization file.
  */

+ 3 - 0
src/right_main.php

@@ -12,6 +12,9 @@
  * @package squirrelmail
  */
 
+/** This is the right_main page */
+define('PAGE_NAME', 'right_main');
+
 //xdebug_start_profiling("/var/spool/xdebug/right_main.txt");
 
 

+ 3 - 1
src/search.php

@@ -17,6 +17,9 @@
  * @todo explain why references are used in function calls
  */
 
+/** This is the search page */
+define('PAGE_NAME', 'search');
+
 /**
  * Include the SquirrelMail initialization file.
  */
@@ -1634,4 +1637,3 @@ sqimap_logout($imapConnection);
 
 $oTemplate->display('footer.tpl');
 sqsession_register($mailbox_cache,'mailbox_cache');
-?>

+ 4 - 0
src/squirrelmail_rpc.php

@@ -13,6 +13,10 @@
   * @since 1.5.2
   *
   */
+
+/** This is the squirrelmail_rpc page */
+define('PAGE_NAME', 'squirrelmail_rpc');
+
 //FIXME: If we decide to route ALL requests, even normal page
 //       requests through this file, need to change page requests
 //       to something like this

+ 3 - 0
src/style.php

@@ -20,6 +20,9 @@
  * @package squirrelmail
  */
 
+/** This is the style page */
+define('PAGE_NAME', 'style');
+
 /**
  * Set the location in order to skip unneeded validation and other includes
  * in the SquirrelMail initialisation file.

+ 3 - 1
src/vcard.php

@@ -11,6 +11,9 @@
  * @package squirrelmail
  */
 
+/** This is the vcard page */
+define('PAGE_NAME', 'vcard');
+
 /**
  * Include the SquirrelMail initialization file.
  */
@@ -185,4 +188,3 @@ $oTemplate->assign('info', $opts);
 $oTemplate->display('vcard.tpl');
 
 $oTemplate->display('footer.tpl');
-?>

+ 3 - 1
src/view_header.php

@@ -11,6 +11,9 @@
  * @package squirrelmail
  */
 
+/** This is the view_header page */
+define('PAGE_NAME', 'view_header');
+
 /**
  * Include the SquirrelMail initialization file.
  */
@@ -115,4 +118,3 @@ $oTemplate->assign('headers', $aTemplateHeaders);
 $oTemplate->display('view_header.tpl');
 
 $oTemplate->display('footer.tpl');
-?>

+ 4 - 2
src/view_html.php

@@ -1,7 +1,7 @@
 <?php
 
 /**
- * $Source$
+ * view_html
  * Displays html message parts
  *
  * File is used to display html message parts. Usually inside iframe.
@@ -16,6 +16,9 @@
  * @package squirrelmail
  */
 
+/** This is the view_html page */
+define('PAGE_NAME', 'view_html');
+
 /**
  * Include the SquirrelMail initialization file.
  */
@@ -74,4 +77,3 @@ $body = MagicHTML( $body, $passed_id, $message, $mailbox);
 /** TODO: charset might be part of html code. */
 header('Content-Type: text/html; charset=' . $charset);
 echo $body;
-?>

+ 3 - 1
src/view_text.php

@@ -11,6 +11,9 @@
  * @package squirrelmail
  */
 
+/** This is the view_text page */
+define('PAGE_NAME', 'view_text');
+
 /** SquirrelMail required files. */
 include('../include/init.php');
 include(SM_PATH . 'functions/imap_general.php');
@@ -85,4 +88,3 @@ $oTemplate->assign('body', $body);
 $oTemplate->display('view_text.tpl');
 
 $oTemplate->display('footer.tpl');
-?>

+ 3 - 0
src/webmail.php

@@ -12,6 +12,9 @@
  * @package squirrelmail
  */
 
+/** This is the webmail page */
+define('PAGE_NAME', 'webmail');
+
 /**
  * Include the SquirrelMail initialization file.
  */