test
[squirrelmail.git] / src / options.php
index 6ef511f044ae210a4079363f56637a55e6574600..f07752e25a2efcbbe8e46e682d3fc4c67873db80 100644 (file)
@@ -139,7 +139,7 @@ switch ($optpage) {
         $optpage_loader = 'load_optpage_data_order';
         $optpage_loadhook = 'optpage_loadhook_order';
         break;
-    default: do_hook('optpage_set_loadinfo');
+    default: do_hook('optpage_set_loadinfo', $null);
 }
 
 /**********************************************************/
@@ -156,7 +156,7 @@ if ( !@is_file( $optpage_file ) ) {
     /* Assemble the data for this option page. */
     $optpage_data = array();
     $optpage_data = $optpage_loader();
-    do_hook($optpage_loadhook);
+    do_hook($optpage_loadhook, $null);
     $optpage_data['options'] = create_option_groups($optpage_data['grps'], $optpage_data['vals']);
 }
 
@@ -208,7 +208,7 @@ if ($optmode == SMOPT_MODE_SUBMIT) {
     }
 
     /* Run the options save hook. */
-    do_hook($save_hook_name);
+    do_hook($save_hook_name, $null);
 }
 
 /***************************************************************/
@@ -321,7 +321,7 @@ if ($optpage == SMOPT_PAGE_MAIN) {
     );
 
     /* Build a section for plugins wanting to register an optionpage. */
-    do_hook('optpage_register_block');
+    do_hook('optpage_register_block', $null);
 
     /*****************************************************/
     /* Let's sort Javascript Option Pages to the bottom. */
@@ -331,7 +331,7 @@ if ($optpage == SMOPT_PAGE_MAIN) {
     foreach ($optpage_blocks as $cur_optpage) {
         if (!isset($cur_optpage['js']) || !$cur_optpage['js']) {
             $reg_optpage_blocks[] = $cur_optpage;
-        } else if ($javascript_on == SMPREF_JS_ON) {
+        } else if (checkForJavascript()) {
             $js_optpage_blocks[] = $cur_optpage;
         }
     }
@@ -345,7 +345,7 @@ if ($optpage == SMOPT_PAGE_MAIN) {
 
     $oTemplate->display('option_groups.tpl');
     
-    do_hook('options_link_and_description');
+    do_hook('options_link_and_description', $null);
 
 
 /*************************************************************************/
@@ -406,7 +406,7 @@ if ($optpage == SMOPT_PAGE_MAIN) {
     /**
      * The variables below should not be needed by the template since all plugin
      * hooks are called here, not in the template.  If we find otherwise, these
-     * variables can be passed to the template.  Commenting out for not.
+     * variables can be passed to the template.  Commenting out for now.
      */
 /*
     $oTemplate->assign('max_refresh', isset($max_refresh) ? $max_refresh : NULL);
@@ -420,27 +420,28 @@ if ($optpage == SMOPT_PAGE_MAIN) {
      * END comment block
      */    
      
+    $oTemplate->assign('submit_name', $submit_name);
     $oTemplate->display('options.tpl');
 
+//FIXME: need to remove HTML from here!
     echo "  </td>\n" .
          " </tr>\n";
 
     /* If it is not empty, trigger the inside hook. */
     if ($inside_hook_name != '') {
-        do_hook($inside_hook_name);
+        do_hook($inside_hook_name, $null);
     }
 
-    /* Spit out a submit button. */
-    OptionSubmit($submit_name);
+//FIXME: need to remove HTML from here!
     echo "</table>\n" .
          "</form>\n";
 
     /* If it is not empty, trigger the bottom hook. */
     if ($bottom_hook_name != '') {
-        do_hook($bottom_hook_name);
+        do_hook($bottom_hook_name, $null);
     }
     
 }
 
 $oTemplate->display('footer.tpl');
-?>
\ No newline at end of file
+?>