]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/rallye_functions.php
More HTML swapped and admin contact link rewritten. Resolves #91
[mailer.git] / inc / libs / rallye_functions.php
index 25146a04db8888ff1d71beaadb4afb2eb446c15f..3304a5f7242b5bef5973438f4ef55d949f633c77 100644 (file)
@@ -517,7 +517,7 @@ function RALLYE_LOAD_USERS_ARRAY ($rallye) {
        global $_CONFIG;
 
        // Fix zero points to 0.00000
-       if (getConfig('ref_payout') == "0") $_CONFIG['ref_payout'] = "0.00000";
+       if (getConfig('ref_payout') == "0") setConfigEntry('ref_payout', "0.00000");
 
        // Init multi array
        $users = array(
@@ -714,23 +714,20 @@ function RALLYE_TEMPLATE_SELECTION($name="template", $default="")
        closedir($dir);
 
        // Do we have found templates which we can link with the new rallye?
-       if (!empty($ral[0]))
-       {
+       if (!empty($ral[0])) {
                // Generate selection box for all found templates
+               // @TODO Rewrite this to our API function
                $OUT  = "<select name=\"".$name."\" size=\"1\" class=\"admin_select\">
-  <option value=\"\">".SELECT_NONE."</option>\n";
-               foreach ($ral as $rallye)
-               {
+  <option value=\"\">{--SELECT_NONE--}</option>\n";
+               foreach ($ral as $rallye) {
                     $OUT .= "  <option value=\"".$rallye."\"";
-                       if ($default == $rallye) $OUT .= " selected default";
+                       if ($default == $rallye) $OUT .= " selected=\"selected\"";
                        $OUT .= ">".$rallye."</option>\n";
                }
                $OUT .= "</select>\n";
-       }
-        else
-       {
+       } else {
                // No rallye templates found
-               $OUT = RALLYE_NO_TEMPLATES_FOUND;
+               $OUT = getMessage('RALLYE_NO_TEMPLATES_FOUND');
        }
 
        // Return selection