]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
Fixes for installation mode
[mailer.git] / inc / mysql-manager.php
index 83c8f1cf38cba223d7013978453e8cb9605cc206..2774a3ba1c62fe7c7045701ff80e89703471acd7 100644 (file)
@@ -960,7 +960,10 @@ function GET_CATEGORY ($cid) {
        $ret = _CATEGORY_404;
 
        // Is the category id set?
-       if (!empty($cid)) {
+       if ($cid == "0") {
+               // No category
+               $ret = _CATEGORY_NONE;
+       } elseif ($cid > 0) {
                // Lookup the category in database
                $result = SQL_QUERY_ESC("SELECT cat FROM "._MYSQL_PREFIX."_cats WHERE id=%s LIMIT 1",
                        array(bigintval($cid)), __FILE__, __LINE__);
@@ -1192,8 +1195,14 @@ function ADD_POINTS_REFSYSTEM($uid, $points, $send_notify=false, $rid="0", $lock
                                // Direct payment shall be notified about
                                define('__POINTS_VALUE', $ref_points);
 
+                               // Prepare content
+                               $content = array(
+                                       'text'   => REASON_DIRECT_PAYMENT,
+                                       'points' => TRANSLATE_COMMA($ref_points)
+                               );
+
                                // Load message
-                               $msg = LOAD_EMAIL_TEMPLATE("add-points", REASON_DIRECT_PAYMENT, $uid);
+                               $msg = LOAD_EMAIL_TEMPLATE("add-points", $content, $uid);
 
                                // And sent it away
                                SEND_EMAIL($email, SUBJECT_DIRECT_PAYMENT, $msg);
@@ -1514,7 +1523,7 @@ WHERE p.userid=%s", array(bigintval($uid)), __FILE__, __LINE__);
        }
 
        // Now a mail to the user and that's all...
-       $msg = LOAD_EMAIL_TEMPLATE("del-user", $reason, $uid);
+       $msg = LOAD_EMAIL_TEMPLATE("del-user", array('text' => $reason), $uid);
        SEND_EMAIL($uid, ADMIN_DEL_ACCOUNT, $msg);
 
        // Ok, delete the account!