$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__);
// 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);
}
// 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!