removing code that could be used with plugin in SM 1.4.x. After init
[squirrelmail.git] / src / search.php
index aa7ff0b367f70d0ca978f17c09f2384c9c117a6e..866039efa7979ec4b8ffe499e99c35054d9cb45d 100644 (file)
  */
 
 /**
- * Path for SquirrelMail required files.
- * @ignore
+ * Include the SquirrelMail initialization file.
  */
-define('SM_PATH','../');
+require('../include/init.php');
 
 /** SquirrelMail required files.
  */
-include_once(SM_PATH . 'include/validate.php');
-include_once(SM_PATH . 'functions/strings.php');
-include_once(SM_PATH . 'functions/imap_asearch.php');
-include_once(SM_PATH . 'functions/imap_mailbox.php');
-include_once(SM_PATH . 'functions/imap_messages.php');
-include_once(SM_PATH . 'functions/mime.php');
-include_once(SM_PATH . 'functions/mailbox_display.php'); //getButton()...
-include_once(SM_PATH . 'class/template/template.class.php');
+require_once(SM_PATH . 'functions/imap_asearch.php');
+require_once(SM_PATH . 'functions/imap_messages.php');
+require_once(SM_PATH . 'functions/imap_general.php');
+require_once(SM_PATH . 'functions/mime.php');
+require_once(SM_PATH . 'functions/mailbox_display.php'); //getButton()
+require_once(SM_PATH . 'functions/forms.php');
+require_once(SM_PATH . 'functions/date.php');
 
 /** Prefs array ordinals. Must match $recent_prefkeys and $saved_prefkeys
  */
@@ -1013,8 +1011,8 @@ $aMailboxGlobalPref = array(
  * system wide admin settings and incoming vars.
  */
 $aConfig = array(
-                'allow_thread_sort' => $allow_thread_sort,
-                'allow_server_sort' => $allow_server_sort,
+//                'allow_thread_sort' => $allow_thread_sort,
+//                'allow_server_sort' => $allow_server_sort,
                 'user'              => $username,
                 'setindex'          => 1
                 );
@@ -1602,13 +1600,13 @@ if ($submit == $search_button_text) {
                         foreach ($aTemplate as $k => $v) {
                             $oTemplate->assign($k, $v);
                         }
+
                         $oTemplate->assign('page_selector',  $page_selector);
                         $oTemplate->assign('page_selector_max', $page_selector_max);
                         $oTemplate->assign('compact_paginator', $compact_paginator);
                         $oTemplate->assign('javascript_on', $javascript_on);
                         $oTemplate->assign('enablesort', (isset($aProps['config']['enablesort'])) ? $aProps['config']['enablesort'] : false);
-                        // Aaaaaahhhhhhh FIX ME DO NOT USE the string "none" for a var when you mean the boolean false or null
-                        $oTemplate->assign('icon_theme', (isset($icon_theme) && $icon_theme !== 'none') ? $icon_theme : false);
+                        $oTemplate->assign('icon_theme_path', $icon_theme_path);
                         $oTemplate->assign('use_icons', (isset($use_icons)) ? $use_icons : false);
                         $oTemplate->assign('aOrder', array_keys($aColumns));
                         $oTemplate->assign('alt_index_colors', isset($alt_index_colors) ? $alt_index_colors: false);