Some old lost language constants fixed
authorRoland Häder <roland@mxchange.org>
Mon, 9 Nov 2009 16:59:04 +0000 (16:59 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 9 Nov 2009 16:59:04 +0000 (16:59 +0000)
inc/libs/surfbar_functions.php
inc/modules/admin/what-list_surfbar_actions.php
templates/de/html/admin/admin_add_surfbar_url.tpl

index 09bbe89931dfd5da8fa9fd29e1e06f8630d461c6..278ad21d4a7d35a72adffef5da2cf17fc420df99 100644 (file)
@@ -737,14 +737,8 @@ function translateSurfbarUrlStatus ($status) {
        // Create constant name
        $constantName = sprintf("SURFBAR_URL_STATUS_%s", strtoupper($status));
 
-       // Set default translated status
-       $statusTranslated = '!'.$constantName.'!';
-
-       // Is the constant there?
-       if (defined($constantName)) {
-               // Then get it's value
-               $statusTranslated = constant($constantName);
-       } // END - if
+       // Get message
+       $statusTranslated = getMessage($constantName);
 
        // Return result
        return $statusTranslated;
index 184ac2a9b2c62e6959d8a911d7a82be6dbe1bbdd..d262671aff549eaa84a9e1136b8b791a59996de2 100644 (file)
@@ -59,16 +59,16 @@ if (SQL_NUMROWS($result) > 0) {
        $OUT = ''; $SW = 2;
        while ($content = SQL_FETCHARRAY($result)) {
                // "Translate" some data
-               $content['status']     = constant(sprintf("SURFBAR_URL_STATUS_%s", $content['status']));
-               $content['action']     = constant(sprintf("MEMBER_SURFBAR_ACTION_%s_SUBMIT", $content['action']));
+               $content['status']     = translateSurfbarUrlStatus($content['status']);
+               $content['action']     = getMessage(sprintf("MEMBER_SURFBAR_ACTION_%s_SUBMIT", $content['action']));
 
                // New status set?
                if (!is_null($content['new_status'])) {
                        // Translate it
-                       $content['new_status'] = constant(sprintf("SURFBAR_URL_STATUS_%s", $content['new_status']));
+                       $content['new_status'] = translateSurfbarUrlStatus($content['new_status']);
                } else {
                        // "Do nothing" status
-                       $content['new_status'] = SURFBAR_URL_STATUS_NONE;
+                       $content['new_status'] = getMessage('SURFBAR_URL_STATUS_NONE');
                }
 
                // Add color
index 8c6ef2bc70a708e9ea68aa63dca4269ca596b6b6..34a473147ae351f0f2b7d9071cfbd411ad22d2b0 100644 (file)
@@ -1,25 +1,25 @@
 <div align="center">
 <form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&amp;what=add_surfbar_url" method="post">
-<div class="admin_table dashed" style="width:600px;margin-top:10px;">
-       <div class="admin_title bottom2" style="padding-top:5px;padding-bottom:5px;">
+<div class="admin_table dashed">
+       <div class="admin_title bottom2">
                <strong>URL in Surfbar hinzuf&uuml;gen:</strong>
        </div>
 
-       <div class="admin_input" style="padding-top:5px;padding-bottom:5px;" align="center">
+       <div class="admin_input" align="center">
                URL eingeben: <input type="text" name="url" size="20" maxlength="255" value="http://" />
        </div>
 
-       <div class="admin_input" style="padding-top:5px;padding-bottom:5px;" align="center">
+       <div class="admin_input" align="center">
                Maximale Einblendung: <input type="text" name="limit" size="5" maxlength="20" value="0" /><br />
                <span class="admin_note">(0 = Unbegrenzt)</span>
        </div>
 
-       <div class="admin_input" style="padding-top:5px;padding-bottom:5px;" align="center">
+       <div class="admin_input" align="center">
                Reloadsperre: $content[reload]
                <span class="admin_note">(0 = Standarteinstellungen)</span>
        </div>
 
-       <div align="center" class="footer top2" style="padding-top:3px;padding-bottom:3px;">
+       <div align="center" class="admin_footer top2">
                <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" />
                <input type="submit" class="admin_submit" name="add" value="{--ADMIN_SURFBAR_ADD_URL--}" />
        </div>