]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-repair_lang.php
Code style changed, ext-user continued:
[mailer.git] / inc / modules / admin / what-repair_lang.php
index ab99a5ea158f82906890c6d35916036ffcca624f..def55929647f347bdcc896d1d36a268a7ed7afa9 100644 (file)
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
- * Needs to be in all Files and every File needs "svn propset           *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -42,13 +41,13 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 } // END - if
 
 // Add description as navigation point
-addMenuDescription('admin', __FILE__);
+addYouAreHereLink('admin', __FILE__);
 
 // Get a list with current language files
-$langFiles = getArrayFromDirectory('inc/language/', '', false, false, array('_de.php'), '.php', '@(\.|\.\.)$@', true, getCurrentLanguage());
+$langFiles = getArrayFromDirectory('inc/language/', '', FALSE, FALSE, array('_de.php'), '.php', '@(\.|\.\.)$@', TRUE, getCurrentLanguage());
 
 // By default nothing is checked, which is isn't right...
-$SW = 2; $OUT = '';
+$OUT = '';
 
 // Get valid languages
 $validLanguages = getValidLanguages(getCurrentLanguage());
@@ -81,18 +80,17 @@ foreach ($validLanguages as $lang) {
                                $content = array(
                                        'source' => $langFile,
                                        'target' => basename($INC),
-                                       'sw'     => $SW,
                                );
 
                                // Compares, all fine
-                               $OUT .= loadTemplate('admin_repair_lang_row_compares', true, $content);
+                               $OUT .= loadTemplate('admin_repair_lang_row_compares', TRUE, $content);
                        } else {
                                // Generate difference output only if count is smaller/equals 100 entries
                                $diffContent = '<ul>';
                                if (count($GLOBALS['lang_diff'][$INC]) <= 100) {
                                        // Display them, it is not more than 100 entries difference
                                        foreach ($GLOBALS['lang_diff'][$INC] as $key => $value) {
-                                               $diffContent .= '<li>' . $key . '=' . htmlentities($value) . '</li>';
+                                               $diffContent .= '<li>' . $key . '=' . encodeEntities($value) . '</li>';
                                        } // END - foreach
                                } else {
                                        // To much to display!
@@ -102,43 +100,37 @@ foreach ($validLanguages as $lang) {
 
                                // Prepare content
                                $content = array(
+                                       'inc'          => $INC,
                                        'source'       => $langFile,
-                                       'target'       => basename($INC),
-                                       'diff_count'   => translateComma(getLanguageComparisonDifference($INC)),
                                        'diff_content' => $diffContent,
-                                       'sw'           => $SW,
                                );
 
                                // Compares, all fine
-                               $OUT .= loadTemplate('admin_repair_lang_row_diff', true, $content);
+                               $OUT .= loadTemplate('admin_repair_lang_row_diff', TRUE, $content);
                        }
                } else {
                        // Not readable, prepare content
                        $content = array(
-                               'file'    => basename($INC),
-                               'lang'    => $lang,
-                               'sw'      => $SW,
+                               'inc'  => $INC,
+                               'lang' => $lang,
                        );
 
                        // Load template
-                       $OUT .= loadTemplate('admin_repair_lang_row_404', true, $content);
+                       $OUT .= loadTemplate('admin_repair_lang_row_404', TRUE, $content);
                }
-
-               // Switch color
-               $SW = 3 - $SW;
        } // END - foreach
 } // END - foreach
 
 // Preapre content
 $content = array(
        'rows'       => $OUT,
-       'file_count' => translateComma(count($langFiles)),
-       'total_diff' => translateComma($GLOBALS['lang_diff_count']['total']),
-       'total_msgs' => translateComma($GLOBALS['msg_count'][getCurrentLanguage()]),
+       'file_count' => count($langFiles),
+       'total_diff' => $GLOBALS['lang_diff_count']['total'],
+       'total_msgs' => $GLOBALS['msg_count'][getCurrentLanguage()],
 );
 
 // Load main template
-loadTemplate('admin_repair_lang', false, $content);
+loadTemplate('admin_repair_lang', FALSE, $content);
 
 // [EOF]
 ?>