]> git.mxchange.org Git - mailer.git/commitdiff
Some more code-cleanups:
authorRoland Häder <roland@mxchange.org>
Tue, 28 Jun 2011 07:16:31 +0000 (07:16 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 28 Jun 2011 07:16:31 +0000 (07:16 +0000)
- More usage of EL
- Deprecated code removed
- Some text improved
- TODO.txt updated

DOCS/TODOs.txt
inc/language/de.php
inc/modules/admin/admin-inc.php
inc/modules/admin/what-extensions.php
inc/modules/admin/what-guestedit.php
inc/modules/admin/what-memedit.php
inc/modules/guest/what-active.php
inc/modules/guest/what-top10.php
templates/de/html/admin/admin_extensions_delete_row.tpl
templates/de/html/guest/guest_active_row.tpl
templates/de/html/guest/guest_top10_row_refs.tpl

index f80182d46a83acb8aef6bb4424d02116438a66fd..ffcbdd43c3e0b2921747c7845a4fb8544c70fa6e 100644 (file)
 ./inc/modules/admin/what-del_email.php:61:             // @TODO Unused: cat_id, payment_id
 ./inc/modules/admin/what-edit_user.php:18: * @TODO Add support for ext-country                                    *
 ./inc/modules/admin/what-email_stats.php:46:// @TODO Unused at the moment
-./inc/modules/admin/what-extensions.php:363:                                           // @TODO Rewrite this to a filter
+./inc/modules/admin/what-extensions.php:364:                                           // @TODO Rewrite this to a filter
 ./inc/modules/admin/what-guest_add.php:129:                            // @TODO This can be somehow rewritten to a function
 ./inc/modules/admin/what-guest_add.php:67:             // @TODO Cant this be rewritten?
 ./inc/modules/admin/what-guest_add.php:80:             // @TODO This can be somehow rewritten to a function
index 929ab164f0333d06f9d65635727d300eb2ceb041..a0a0c3fe772c9e63af2075378e70a5767af3fa65 100644 (file)
@@ -1037,7 +1037,7 @@ addMessages(array(
        'ADMIN_CONFIG_SESSION_SAVE_PATH' => "Speicherpfad f. Sitzungsdateien",
        'ADMIN_BASE_PATH' => "Absoluter Server-Pfad",
        'ADMIN_SESSION_SAVE_PATH_NOTE' => "Sie sollten f&uuml;r Sitzungsdateien einen Pfad w&auml;hlen der ausserhalb des Server-Pfades liegt, da sonst eventuell die Sitzungsdateien vom Web erreichbar sind, was ein hohes Sicherheitsrisiko darstellt.",
-       'MEMBER_NO_MAILS_IN_STATS' => "Keine versandten Buchungen gefunden.",
+       'MEMBER_NO_MAILS_IN_STATS' => "Sie haben noch keine Mailbuchungen aufgegeben. Es kann Ihnen somit auch keine Statistik angezeigt werden.",
        'ADMIN_RESET_PASSWORD' => "Passwort vergessen?",
        'EMAIL_DETAILS' => "Email-Details",
        'EMAIL_DETAILS_LINK' => "Details anzeigen",
index 96aaca29d942cd4bf1ce99aeb13b2d5a4596b0fd..c3eaf82143d1eeee9b2e8debd444d25e234ca9fe 100644 (file)
@@ -638,7 +638,9 @@ function generateUserProfileLink ($userid, $title = '', $what = 'list_user') {
                $nick = getNickname($userid);
 
                // Is it not empty, use it as title else the userid
-               if (!empty($nick)) $title = $nick . '(' . $userid . ')'; else $title = $userid;
+               if (!empty($nick)) {
+                       $title = $nick . '(' . $userid . ')'; else $title = $userid;
+               } // END - if
        }
 
        // Return link
index 5c6be90d0205275180f65f37b999c4fa37a68a3d..45cd7d59ca5920429be60096244a12c2f9819abc 100644 (file)
@@ -198,7 +198,6 @@ if (isGetRequestParameterSet('reg_ext')) {
                        $content = array(
                                'id'       => $ext_id,
                                'ext_name' => $ext_name,
-                               'ext_ver'  => getExtensionVersion($ext_name),
                                'verbose'  => $VERBOSE_OUT
                        );
 
@@ -303,7 +302,9 @@ ORDER BY
                        while ($content = SQL_FETCHARRAY($result)) {
                                // Prepare CSS selection output
                                $cssSelection = '---';
-                               if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) $cssSelection = translateYesNo($content['ext_css']);
+                               if (isExtensionInstalledAndNewer('sql_patches', '0.0.6')) {
+                                       $cssSelection = translateYesNo($content['ext_css']);
+                               } // END - if
 
                                // Prepare data for the row template
                                $content['ext_css'] = $cssSelection;
index 6f44c2aa58c4162cb3726b12a7b5c4fc8be8e6cb..d7543eaa8ae5c95fc4b371dd07074bdef2194c0a 100644 (file)
@@ -214,10 +214,6 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
                                $NAVI = '<a href="{%url=modules.php?module=admin&amp;what=guestedit&amp;sub=' . $content['sub'] . '&amp;act=' . $data['action'] . '&amp;w=' . $data['what'] . '&amp;tid=' . ($data['sort']-1) . '&amp;fid=' . $data['sort'] . '%}">{--HIGHER--}</a>|<a href=\"{%url=modules.php?module=admin&amp;what=guestedit&amp;sub=' . $content['sub'] . '&amp;act=' . $data['action'] . '&amp;w=' . $data['what'] . '&amp;tid=' . ($data['sort']+1) . '&amp;fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
                        }
 
-                       if (empty($data['action'])) $data['action'] = '---';
-                       if (empty($data['what']))   $data['what']   = '---';
-                       if (empty($data['title']))  $data['title']  = '---';
-
                        // Prepapre content
                        $row = array(
                                'id'     => $data['id'],
index 68867ee6a69c0cacaafcbfedb17954bdf0b9de3b..d0d08009fad79f3a317511293b9ed0e724d4fc55 100644 (file)
@@ -208,11 +208,6 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive()
                                $data['navi'] = '<a href="{%url=modules.php?module=admin&amp;what=memedit&amp;sub=' . $content['sub'] . '&amp;act=' . $data['action'] . '&amp;w=' . $data['what'] . '&amp;tid=' . ($data['sort']-1) . '&amp;fid=' . $data['sort'] . '%}">{--HIGHER--}</a>|<a href="{%url=modules.php?module=admin&amp;what=memedit&amp;sub=' . $content['sub'] . '&amp;act=' . $data['action'] . '&amp;w=' . $data['what'] . '&amp;tid=' . ($data['sort']+1) . '&amp;fid=' . $data['sort'] . '%}">{--LOWER--}</a>';
                        }
 
-                       // Fix empty values for Firefox
-                       if (empty($data['action'])) $data['action'] = '---';
-                       if (empty($data['what']))   $data['what']   = '---';
-                       if (empty($data['title']))  $data['title']  = '---';
-
                        // Add more entries
                        $data['mode'] = 'mem';
 
index 945f6ef8a17af88517c7fda756eb44535c23dfd4..36dd9e4443c3749550b1238d785853462363b0e7 100644 (file)
@@ -49,14 +49,16 @@ if ((!isExtensionActive('active')) && (!isAdmin())) {
 } // END - if
 
 // Extra field to include is by default userid
-$add = 'userid';
+$add = '';
 
 // If nickname is installed the extra field is the nickname of the user
-if (isExtensionActive('nickname')) $add = 'nickname';
+if (isExtensionActive('nickname')) {
+       $add = ', `nickname`';
+} // END - if
 
 // Check for members who were active only this day
 $result = SQL_QUERY("SELECT
-       `userid`, `".$add."`, `last_online`
+       `userid``, `last_online`".$add."
 FROM
        `{?_MYSQL_PREFIX?}_user_data`
 WHERE
@@ -70,17 +72,14 @@ LIMIT {?active_limit?}", __FILE__, __LINE__);
 if (!SQL_HASZERONUMS($result)) {
        // At least one member was online so let's load them all
        $OUT = '';
-       while (list($userid, $nick, $last) = SQL_FETCHROW($result)) {
-               $nick2 = '---';
-               if (($nick != $userid) && (!empty($nick))) $nick2 = $nick;
+       while ($content = SQL_FETCHARRAY($result)) {
+               // If ext-nickname is not installed, set 'nickname' to empty
+               if (!isExtensionActive('nickname')) {
+                       $content['nickname'] = '';
+               } // END - if
 
-               // Transfer data to array
-               $content = array(
-                       'userid'      => $userid,
-                       'nickname'    => $nick2,
-                       'points'      => getTotalPoints($userid),
-                       'last_online' => generateDateTime($last, 2),
-               );
+               // Translate comma
+               $content['last_online'] = generateDateTime($last, 2);
 
                // Load template
                $OUT .= loadTemplate('guest_active_row', true, $content);
index a5ad5e61faac792850edddcf981b50a5fe52f9e2..a4dc1f524a2ee0542fd48666cd73d8060540ab2a 100644 (file)
@@ -198,7 +198,9 @@ while ($content = SQL_FETCHARRAY($result)) {
        $content['nickname'] = '';
 
        // Get nickname
-       if (isExtensionActive('nickname')) $content['nickname'] = getNickname($content['userid']);
+       if (isExtensionActive('nickname')) {
+               $content['nickname'] = getNickname($content['userid']);
+       } // END - if
 
        // Prepare data for template
        $content = array(
@@ -206,7 +208,6 @@ while ($content = SQL_FETCHARRAY($result)) {
                'userid'      => $content['userid'],
                'refs'        => $content['refs'],
                'nickname'    => $content['nickname'],
-               'points'      => getTotalPoints($content['userid']),
                'last_online' => generateDateTime($content['last_online'], 3)
        );
 
index b14a076c6ebc7ffe885798788c976878958fbf95..a2ba0af380ff76de23b7f1f3f3ee9c55c1599c69 100644 (file)
@@ -7,7 +7,7 @@
                $content[ext_name]
        </td>
        <td class="{%template,ColorSwitch%} bottom">
-               v$content[ext_ver]
+               v{%pipe,getExtensionVersion=$content[ext_name]%}
        </td>
 </tr>
 <tr>
index bf7602f4ec120667ca3e38f1777ab8fe4611551c..0616c12211d84bd5c92f4fd60e6a31ef1395a686 100644 (file)
@@ -1,5 +1,5 @@
 <tr>
-       <td class="{%template,ColorSwitch%} bottom right">$content[userid] ($content[nickname])</td>
-       <td class="{%template,ColorSwitch%} bottom right">{%pipe,translateComma=$content[points]%}</td>
+       <td class="{%template,ColorSwitch%} bottom right">$content[userid] ({%pipe,fixEmptyContentToDashes=$content[nickname]%})</td>
+       <td class="{%template,ColorSwitch%} bottom right">{%pipe,getTotalPoints,translateComma=$content[userid]%}</td>
        <td class="{%template,ColorSwitch%} bottom">$content[last_online]</td>
 </tr>
index 1cb2e7f810d910d88eb989adb8821b2a59ed8629..22c3a7784c97155b7a9e430e5707372258a359b5 100644 (file)
@@ -2,6 +2,6 @@
        <td class="top10_row1 {%template,ColorSwitch%} bottom right" align="center">$content[cnt]</td>
        <td class="top10_row2 {%template,ColorSwitch%} bottom right">$content[userid] ({%pipe,fixEmptyContentToDashes=$content[nickname]%})</td>
        <td class="top10_row3 {%template,ColorSwitch%} bottom right">{%pipe,translateComma=$content[refs]%}</td>
-       <td class="top10_row4 {%template,ColorSwitch%} bottom right">{%pipe,translateComma=$content[points]%}</td>
+       <td class="top10_row4 {%template,ColorSwitch%} bottom right">{%pipe,getTotalPoints,translateComma=$content[userid]%}</td>
        <td class="top10_row5 {%template,ColorSwitch%} bottom">$content[last_online]</td>
 </tr>