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 09bbe89..278ad21 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 184ac2a..d262671 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 8c6ef2b..34a4731 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>