Просмотр исходного кода

A terrible pile of things done to the code. Did a little bit of SM_PATH
stuff in plugins.

Then I moved some files:
src/validate.php -> include/validate.php
src/load_prefs.php -> include/load_prefs.php
src/options_personal.php -> include/options/personal.php
src/options_display.php -> include/options/display.php
src/options_folder.php -> include/options/folder.php

Basically, the concept here is that src/ should ONLY contain files that
actually get called from the web browser as a php script directly. All
of these files do not really contain functions or anything (so the
functions/ directory did not really make sense), but were more strictly
include files.

Of course, the name functions for a directory is bad organization, IMHO,
anyhow. I guess class would fall in the same category. Oh well, some of
that might get fixed someday.

So, new rule. Only put it in src/ if it gets called directly.

That was really sort of an unwritten rule before. However, since it was
never really enforced or officialized, things got sloppy.

I think I have everything fixed in the CORE with this traumatic moves. I
am sure all of the plugins will be broken. Oh well, the error messages
should be pretty loud and easy enough to fix.

thomppj 23 лет назад
Родитель
Сommit
de9848ded8
46 измененных файлов с 99 добавлено и 89 удалено
  1. 2 2
      functions/imap_mailbox.php
  2. 1 4
      include/load_prefs.php
  3. 0 0
      include/options/display.php
  4. 0 0
      include/options/folder.php
  5. 0 0
      include/options/personal.php
  6. 1 4
      include/validate.php
  7. 4 1
      plugins/abook_take/setup.php
  8. 22 18
      plugins/abook_take/take.php
  9. 0 1
      plugins/filters/filters.php
  10. 8 5
      plugins/filters/options.php
  11. 6 2
      plugins/filters/setup.php
  12. 9 6
      plugins/filters/spamoptions.php
  13. 1 1
      src/addrbook_popup.php
  14. 1 1
      src/addrbook_search.php
  15. 1 1
      src/addrbook_search_html.php
  16. 1 1
      src/addressbook.php
  17. 1 1
      src/compose.php
  18. 1 1
      src/delete_message.php
  19. 1 1
      src/download.php
  20. 1 1
      src/draft_actions.php
  21. 1 1
      src/empty_trash.php
  22. 1 1
      src/folders.php
  23. 1 1
      src/folders_create.php
  24. 1 1
      src/folders_delete.php
  25. 3 3
      src/folders_rename_do.php
  26. 1 1
      src/folders_rename_getname.php
  27. 1 1
      src/folders_subscribe.php
  28. 1 1
      src/help.php
  29. 2 2
      src/image.php
  30. 1 1
      src/left_main.php
  31. 1 1
      src/move_messages.php
  32. 6 6
      src/options.php
  33. 1 1
      src/options_highlight.php
  34. 1 1
      src/options_identities.php
  35. 1 1
      src/options_order.php
  36. 2 2
      src/printer_friendly_bottom.php
  37. 1 1
      src/printer_friendly_main.php
  38. 2 2
      src/printer_friendly_top.php
  39. 1 1
      src/read_body.php
  40. 2 2
      src/retrievalerror.php
  41. 1 1
      src/right_main.php
  42. 1 1
      src/search.php
  43. 1 1
      src/signout.php
  44. 2 2
      src/vcard.php
  45. 1 1
      src/view_header.php
  46. 1 1
      src/view_text.php

+ 2 - 2
functions/imap_mailbox.php

@@ -461,7 +461,7 @@ function sqimap_mailbox_list($imap_stream) {
         $inbox_in_list = false;
         $inbox_subscribed = false;
 
-        require_once(SM_PATH . 'src/load_prefs.php');
+        require_once(SM_PATH . 'include/load_prefs.php');
         require_once(SM_PATH . 'functions/array.php');
 
     if ($noselect_fix_enable) {
@@ -711,7 +711,7 @@ function sqimap_mailbox_tree($imap_stream) {
         $inbox_in_list = false;
         $inbox_subscribed = false;
 
-        require_once(SM_PATH . 'src/load_prefs.php');
+        require_once(SM_PATH . 'include/load_prefs.php');
         require_once(SM_PATH . 'functions/array.php');
 
         /* LSUB array */

+ 1 - 4
src/load_prefs.php → include/load_prefs.php

@@ -12,11 +12,8 @@
  * $Id$
  */
 
-/* Path for SquirrelMail required files. */
-define('SM_PATH','../');
-
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/prefs.php');
 require_once(SM_PATH . 'functions/plugin.php');
 require_once(SM_PATH . 'functions/constants.php');

+ 0 - 0
src/options_display.php → include/options/display.php


+ 0 - 0
src/options_folder.php → include/options/folder.php


+ 0 - 0
src/options_personal.php → include/options/personal.php


+ 1 - 4
src/validate.php → include/validate.php

@@ -13,9 +13,6 @@
  * messages with a session_register.
  */
  
-/* Path for SquirrelMail required files. */
-define('SM_PATH','../');
-
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'class/mime.class.php');
 
@@ -82,7 +79,7 @@ unset($theme);
 $theme=array();
 
 require_once(SM_PATH . 'config/config.php');
-require_once(SM_PATH . 'src/load_prefs.php');
+require_once(SM_PATH . 'include/load_prefs.php');
 require_once(SM_PATH . 'functions/page_header.php');
 require_once(SM_PATH . 'functions/prefs.php');
 

+ 4 - 1
plugins/abook_take/setup.php

@@ -1,7 +1,10 @@
 <?php
 
-   require_once('../functions/url_parser.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../../');
 
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'functions/url_parser.php');
 
 /* Address Take -- steals addresses from incoming email messages.  Searches
    the To, Cc, From and Reply-To headers, also searches the body of the

+ 22 - 18
plugins/abook_take/take.php

@@ -1,25 +1,29 @@
 <?php
+
   /**
-   **  take.php
-   **	
-   **	Adds a "taken" address to the address book.  Takes addresses from
-   **   incoming mail -- the body, To, From, Cc, or Reply-To.
-   **/
-   
-   chdir('..');
-   require_once('../src/validate.php');
-   require_once("../functions/strings.php");
-   require_once("../config/config.php");
-   require_once("../functions/i18n.php");
-   require_once("../functions/page_header.php");
-   require_once("../functions/addressbook.php");
-   require_once("../src/load_prefs.php");
-   require_once('../functions/html.php');
+   * take.php
+   *
+   * Adds a "taken" address to the address book.  Takes addresses from
+   * incoming mail -- the body, To, From, Cc, or Reply-To.
+   */
    
-   displayPageHeader($color, "None");
-   
-   $abook_take_verify = getPref($data_dir, $username, 'abook_take_verify');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../../');
 
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'config/config.php');
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/strings.php');
+require_once(SM_PATH . 'config/config.php');
+require_once(SM_PATH . 'functions/i18n.php');
+require_once(SM_PATH . 'functions/page_header.php');
+require_once(SM_PATH . 'functions/addressbook.php');
+require_once(SM_PATH . 'src/load_prefs.php');
+require_once(SM_PATH . 'functions/html.php');
+   
+displayPageHeader($color, 'None');
+  
+$abook_take_verify = getPref($data_dir, $username, 'abook_take_verify');
 
 $abook = addressbook_init(false, true);
 $name = 'addaddr';

+ 0 - 1
plugins/filters/filters.php

@@ -25,7 +25,6 @@
  * $Id$
  */
 
-
 function filters_SaveCache () {
     global $data_dir, $SpamFilters_DNScache;
 

+ 8 - 5
plugins/filters/options.php

@@ -25,11 +25,14 @@
  * $Id$
  */
 
-   chdir ('..');
-   require_once('../src/validate.php');
-   require_once('../functions/page_header.php');
-   require_once('../functions/imap.php');
-   require_once('../src/load_prefs.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/page_header.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'src/load_prefs.php');
 
    global $AllowSpamFilters;
 

+ 6 - 2
plugins/filters/setup.php

@@ -24,6 +24,12 @@
  * $Id$
  */
 
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'plugins/filters/filters.php');
+
 /*
  * Set this to true if you have problems -- check the README file
  * Note:  This doesn't work all of the time (No idea why)
@@ -97,8 +103,6 @@ $SpamFilters_SharedCache = true;
 global $SpamFilters_CacheTTL;
 $SpamFilters_CacheTTL = 7200;
 
-require_once ('../plugins/filters/filters.php');
-
 function squirrelmail_plugin_init_filters() {
     global $squirrelmail_plugin_hooks;
     global $mailbox, $imap_stream, $imapConnection;

+ 9 - 6
plugins/filters/spamoptions.php

@@ -24,12 +24,15 @@
  * $Id$
  */
 
-chdir ('..');
-require_once('../src/validate.php');
-require_once('../functions/page_header.php');
-require_once('../functions/imap.php');
-require_once('../src/load_prefs.php');
-require_once('../functions/html.php');
+/* Path for SquirrelMail required files. */
+define('SM_PATH','../../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'functions/page_header.php');
+require_once(SM_PATH . 'functions/imap.php');
+require_once(SM_PATH . 'src/load_prefs.php');
+require_once(SM_PATH . 'functions/html.php');
 
 global $AllowSpamFilters;
 

+ 1 - 1
src/addrbook_popup.php

@@ -15,7 +15,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/addressbook.php');
    
 ?>

+ 1 - 1
src/addrbook_search.php

@@ -19,7 +19,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/strings.php');
 require_once(SM_PATH . 'functions/html.php');
 

+ 1 - 1
src/addrbook_search_html.php

@@ -21,7 +21,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/date.php');
 require_once(SM_PATH . 'functions/smtp.php');
 require_once(SM_PATH . 'functions/display_messages.php');

+ 1 - 1
src/addressbook.php

@@ -15,7 +15,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/array.php');
 require_once(SM_PATH . 'functions/display_messages.php');
 require_once(SM_PATH . 'functions/addressbook.php');

+ 1 - 1
src/compose.php

@@ -21,7 +21,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/date.php');
 require_once(SM_PATH . 'functions/mime.php');

+ 1 - 1
src/delete_message.php

@@ -15,7 +15,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/display_messages.php');
 require_once(SM_PATH . 'functions/imap.php');
 

+ 1 - 1
src/download.php

@@ -16,7 +16,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/mime.php');
 

+ 1 - 1
src/draft_actions.php

@@ -13,7 +13,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 
 /* Print all the needed RFC822 headers */
 function write822HeaderForDraft ($fp, $t, $c, $b, $subject, $more_headers, $session) {

+ 1 - 1
src/empty_trash.php

@@ -16,7 +16,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/display_messages.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/array.php');

+ 1 - 1
src/folders.php

@@ -17,7 +17,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/imap_utf7_decode_local.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/array.php');

+ 1 - 1
src/folders_create.php

@@ -16,7 +16,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/display_messages.php');
 

+ 1 - 1
src/folders_delete.php

@@ -16,7 +16,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/array.php');
 require_once(SM_PATH . 'functions/tree.php');

+ 3 - 3
src/folders_rename_do.php

@@ -12,15 +12,15 @@
  * $Id$
  */
 
-global $delimiter, $base_uri;
-
 /* Path for SquirrelMail required files. */
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/imap.php');
 
+global $delimiter, $base_uri;
+
 $new_name = trim($new_name);
 
 if ($old_name <> $new_name) {

+ 1 - 1
src/folders_rename_getname.php

@@ -18,7 +18,7 @@ global $delimiter;
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/html.php');
 

+ 1 - 1
src/folders_subscribe.php

@@ -16,7 +16,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/display_messages.php');
 

+ 1 - 1
src/help.php

@@ -15,7 +15,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/display_messages.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/array.php');

+ 2 - 2
src/image.php

@@ -15,11 +15,11 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/date.php');
 require_once(SM_PATH . 'functions/page_header.php');
 require_once(SM_PATH . 'functions/html.php');
-require_once(SM_PATH . 'src/load_prefs.php');
+require_once(SM_PATH . 'include/load_prefs.php');
 
 displayPageHeader($color, 'None');
 

+ 1 - 1
src/left_main.php

@@ -16,7 +16,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/array.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/plugin.php');

+ 1 - 1
src/move_messages.php

@@ -15,7 +15,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/display_messages.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/html.php');

+ 6 - 6
src/options.php

@@ -16,7 +16,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/display_messages.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/array.php');
@@ -139,31 +139,31 @@ switch ($optpage) {
     case SMOPT_PAGE_MAIN: break;
     case SMOPT_PAGE_PERSONAL:
         $optpage_name     = _("Personal Information");
-        $optpage_file     = '../src/options_personal.php';
+        $optpage_file     = SM_PATH . 'include/options/personal.php';
         $optpage_loader   = 'load_optpage_data_personal';
         $optpage_loadhook = 'optpage_loadhook_personal';
         break;
     case SMOPT_PAGE_DISPLAY:
         $optpage_name   = _("Display Preferences");
-        $optpage_file   = '../src/options_display.php';
+        $optpage_file   = SM_PATH . 'include/options/display.php';
         $optpage_loader = 'load_optpage_data_display';
         $optpage_loadhook = 'optpage_loadhook_display';
         break;
     case SMOPT_PAGE_HIGHLIGHT:
         $optpage_name   = _("Message Highlighting");
-        $optpage_file   = '../src/options_highlight.php';
+        $optpage_file   = SM_PATH . 'include/options/highlight.php';
         $optpage_loader = 'load_optpage_data_highlight';
         $optpage_loadhook = 'optpage_loadhook_highlight';
         break;
     case SMOPT_PAGE_FOLDER:
         $optpage_name   = _("Folder Preferences");
-        $optpage_file   = '../src/options_folder.php';
+        $optpage_file   = SM_PATH . 'include/options/folder.php';
         $optpage_loader = 'load_optpage_data_folder';
         $optpage_loadhook = 'optpage_loadhook_folder';
         break;
     case SMOPT_PAGE_ORDER:
         $optpage_name = _("Index Order");
-        $optpage_file = '../src/options_order.php';
+        $optpage_file = SM_PATH . 'include/options/order.php';
         $optpage_loader = 'load_optpage_data_order';
         $optpage_loadhook = 'optpage_loadhook_order';
         break;

+ 1 - 1
src/options_highlight.php

@@ -15,7 +15,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/display_messages.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/array.php');

+ 1 - 1
src/options_identities.php

@@ -15,7 +15,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/display_messages.php');
 require_once(SM_PATH . 'functions/html.php');
 

+ 1 - 1
src/options_order.php

@@ -15,7 +15,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/display_messages.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/array.php');

+ 2 - 2
src/printer_friendly_bottom.php

@@ -18,10 +18,10 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/strings.php');
 require_once(SM_PATH . 'config/config.php');
-require_once(SM_PATH . 'src/load_prefs.php');
+require_once(SM_PATH . 'include/load_prefs.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/page_header.php');
 require_once(SM_PATH . 'functions/html.php');

+ 1 - 1
src/printer_friendly_main.php

@@ -13,7 +13,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/page_header.php');
 
 displayHtmlHeader( _("Printer Friendly"), '', FALSE );

+ 2 - 2
src/printer_friendly_top.php

@@ -16,10 +16,10 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/strings.php');
 require_once(SM_PATH . 'config/config.php');
-require_once(SM_PATH . 'src/load_prefs.php');
+require_once(SM_PATH . 'include/load_prefs.php');
 require_once(SM_PATH . 'functions/page_header.php');
 require_once(SM_PATH . 'functions/html.php');
 

+ 1 - 1
src/read_body.php

@@ -16,7 +16,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/mime.php');
 require_once(SM_PATH . 'functions/date.php');

+ 2 - 2
src/retrievalerror.php

@@ -18,11 +18,11 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/smtp.php');
 require_once(SM_PATH . 'functions/page_header.php');
-require_once(SM_PATH . 'src/load_prefs.php');
+require_once(SM_PATH . 'include/load_prefs.php');
 
 $destination = 'retrievalerror@squirrelmail.org';
 $attachments = array();

+ 1 - 1
src/right_main.php

@@ -16,7 +16,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/date.php');
 require_once(SM_PATH . 'functions/array.php');

+ 1 - 1
src/search.php

@@ -13,7 +13,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/imap_search.php');
 require_once(SM_PATH . 'functions/imap_mailbox.php');

+ 1 - 1
src/signout.php

@@ -15,7 +15,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/prefs.php');
 require_once(SM_PATH . 'functions/plugin.php');
 require_once(SM_PATH . 'functions/strings.php');

+ 2 - 2
src/vcard.php

@@ -15,11 +15,11 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/date.php');
 require_once(SM_PATH . 'functions/page_header.php');
 require_once(SM_PATH . 'functions/mime.php');
-require_once(SM_PATH . 'src/load_prefs.php');
+require_once(SM_PATH . 'include/load_prefs.php');
 
 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 sqimap_mailbox_select($imapConnection, $mailbox);

+ 1 - 1
src/view_header.php

@@ -15,7 +15,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/html.php');
 require_once(SM_PATH . 'functions/url_parser.php');

+ 1 - 1
src/view_text.php

@@ -17,7 +17,7 @@
 define('SM_PATH','../');
 
 /* SquirrelMail required files. */
-require_once(SM_PATH . 'src/validate.php');
+require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/imap.php');
 require_once(SM_PATH . 'functions/mime.php');
 require_once(SM_PATH . 'functions/html.php');