Code cosmetics applied
[mailer.git] / inc / libs / surfbar_functions.php
index d9585d024b8677874ec192ce614615a5a09dcf67..3eecd87c8eae46c76ba60ae70c8ae968ef92c4f1 100644 (file)
@@ -534,19 +534,19 @@ function SURFBAR_LOOKUP_BY_URL ($url, $uid) {
 }
 
 // Load URL data by given search term and column
-function SURFBAR_GET_URL_DATA ($searchTerm, $column="id", $order="id", $sort="ASC", $group="id", $add = '') {
+function SURFBAR_GET_URL_DATA ($searchTerm, $column='id', $order='id', $sort="ASC", $group='id', $add = '') {
        // By default nothing is found
        $GLOBALS['last_url_data'] = array();
 
        // Is the column an id number?
-       if (($column == "id") || ($column == 'userid')) {
+       if (($column == 'id') || ($column == 'userid')) {
                // Extra secure input
                $searchTerm = bigintval($searchTerm);
        } // END - if
 
-       // If the column is "id" there can be only one entry
+       // If the column is 'id' there can be only one entry
        $limit = '';
-       if ($column == "id") {
+       if ($column == 'id') {
                $limit = "LIMIT 1";
        } // END - if
 
@@ -563,7 +563,7 @@ ORDER BY %s %s
                // Then load all!
                while ($dataRow = SQL_FETCHARRAY($result)) {
                        // Shall we group these results?
-                       if ($group == "id") {
+                       if ($group == 'id') {
                                // Add the row by id as index
                                $GLOBALS['last_url_data'][$dataRow['id']] = $dataRow;
                        } else {
@@ -581,9 +581,11 @@ ORDER BY %s %s
 }
 
 // Registers an URL with the surfbar. You should have called SURFBAR_LOOKUP_BY_URL() first!
-function SURFBAR_REGISTER_URL ($url, $uid, $status="PENDING", $addMode="reg", $extraFields = array()) {
+function SURFBAR_REGISTER_URL ($url, $uid, $status = 'PENDING', $addMode = 'reg', $extraFields = array()) {
        // Make sure by the user registered URLs are always pending
-       if ($addMode == "reg") $status = "PENDING";
+       if ($addMode == 'reg') {
+               $status = 'PENDING';
+       } // END - if
 
        // Prepare content
        $content = merge_array($extraFields, array(
@@ -594,8 +596,12 @@ function SURFBAR_REGISTER_URL ($url, $uid, $status="PENDING", $addMode="reg", $e
        ));
 
        // Is limit/reload set?
-       if (!isset($config['limit']))  $content['limit']  = 0;
-       if (!isset($config['reload'])) $content['reload'] = 0;
+       if (!isset($config['limit'])) {
+               $content['limit']  = 0;
+       } // END - if
+       if (!isset($config['reload'])) {
+               $content['reload'] = 0;
+       } // END - if
 
        // Insert the URL into database
        $content['insert_id'] = SURFBAR_INSERT_URL_BY_ARRAY($content);
@@ -610,7 +616,7 @@ function SURFBAR_REGISTER_URL ($url, $uid, $status="PENDING", $addMode="reg", $e
        $content['limit'] = surfbarTranslateLimit($content['limit']);
 
        // If in reg-mode we notify admin
-       if (($addMode == "reg") || (getConfig('surfbar_notify_admin_unlock') == 'Y')) {
+       if (($addMode == 'reg') || (getConfig('surfbar_notify_admin_unlock') == 'Y')) {
                // Notify admin even when he as unlocked an email
                SURFBAR_NOTIFY_ADMIN("url_{$addMode}", $content);
        } // END - if
@@ -797,10 +803,10 @@ function SURFBAR_DETERMINE_TEMPLATE_NAME() {
        $templateName = "surfbar_frameset";
 
        // Any frame set? ;-)
-       if (REQUEST_ISSET_GET(('frame'))) {
+       if (REQUEST_ISSET_GET('frame')) {
                // Use the frame as a template name part... ;-)
                $templateName = sprintf("surfbar_frame_%s",
-               REQUEST_GET(('frame'))
+               REQUEST_GET('frame')
                );
        } // END - if