Browse Source

Don't presume output format

pdontthink 17 years ago
parent
commit
42c9cad709
2 changed files with 8 additions and 6 deletions
  1. 6 4
      functions/options.php
  2. 2 2
      templates/default/options.tpl

+ 6 - 4
functions/options.php

@@ -276,10 +276,12 @@ class SquirrelOption {
     /**
      * Creates fields on option pages according to option type
      *
-     * Function that calls other createWidget* functions.
-     * @return string html formated option field
+     * This is the function that calls all other createWidget* functions.
+     *
+     * @return string The formated option field
+     *
      */
-    function createHTMLWidget() {
+    function createWidget() {
         global $color;
 
         // Use new value if available
@@ -335,7 +337,7 @@ class SquirrelOption {
         }
 
         /* Now, return the created widget. */
-        return ($result);
+        return $result;
     }
 
     /**

+ 2 - 2
templates/default/options.tpl

@@ -48,11 +48,11 @@ foreach ($options as $option) {
                    "  ".$opt->caption."\n" .
                    " </td>\n" .
                    " <td class=\"optionValue\">\n" .
-                   "  ".$opt->createHTMLWidget()."\n" .
+                   "  ".$opt->createWidget()."\n" .
                    " </td>\n" .
                    "</tr>\n";
         } else {
-            echo $opt->createHTMLWidget();
+            echo $opt->createWidget();
         }
     }