]> git.mxchange.org Git - mailer.git/blobdiff - inc/filters.php
Ref link fixed, nickname fixed, several rewrites, TODOs.txt updated:
[mailer.git] / inc / filters.php
index b282543425c85333cd4794093c7ad4d4c2385bc4..b1784834747acc3e5cd82a9be03b740917f589c8 100644 (file)
@@ -307,7 +307,7 @@ function FILTER_FLUSH_FILTERS () {
                                // Add this filter (all filters are active by default)
                                $insertSQL .= sprintf("('%s','%s','Y'),", $filterName, $filterFunction);
                                $inserted++;
-                       } elseif ($active == "R") {
+                       } elseif ($active == 'R') {
                                // Remove this filter
                                $removeSQL .= sprintf(" (`filter_name`='%s' AND `filter_function`='%s') OR", $filterName, $filterFunction);
                                $removed++;
@@ -327,7 +327,7 @@ function FILTER_FLUSH_FILTERS () {
        // Something has been removed?
        if ($removed > 0) {
                // Finish SQL command
-               $removeSQL = substr($removeSQL, 0, -2) . "LIMIT ".$removed;
+               $removeSQL = substr($removeSQL, 0, -2) . 'LIMIT '.$removed;
 
                // And run it
                ADD_SQL($removeSQL);
@@ -591,8 +591,10 @@ function FILTER_DETERMINE_USERNAME () {
                        array(getUserId()), __FILE__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Load surname and family's name and build the username
-                       list($s, $f) = SQL_FETCHROW($result);
-                       $username = $s . ' ' . $f;
+                       $content = SQL_FETCHARRAY($result);
+
+                       // Prepare username
+                       $username = $content['surname'] . ' ' . $content['family'];
 
                        // Additionally admin?
                        if (IS_ADMIN()) {