Happy 2014
[squirrelmail.git] / include / timezones / check.php
index 78002f6e708f1eccff5070a8e195cac0a4158b1d..052cb4c13d6ce0fcc0b3361137e4422bd3b00616 100644 (file)
@@ -1,24 +1,10 @@
 <?php
+
 /**
  * SquirrelMail time zone library - time zone validation script.
  *
- * Copyright (c) 2005 The SquirrelMail Project Team
- * This file is part of SquirrelMail webmail interface.
- *
- * SquirrelMail is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * SquirrelMail is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with SquirrelMail; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
+ * @copyright 2005-2014 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
  * @subpackage timezones
@@ -173,6 +159,23 @@ if (! $error) {
 
 echo "\n";
 
+/** Test NAME subkeys */
+$error = false;
+echo "  Time zones with empty NAME subkeys:\n";
+foreach ($aTimeZones as $TzKey => $TzData) {
+    if (isset($TzData['NAME']) && empty($TzData['NAME'])) {
+        echo '    '.$TzKey."\n";
+        $error = true;
+    }
+}
+if (! $error) {
+    echo "    none. Looking good\n";
+} else {
+    // error is fatal. NAME should not be empty string.
+}
+
+echo "\n";
+
 /** Test TZ subkeys with UCT/UTC/GMT offsets */
 $error = false;
 echo "Testing TZ subkeys with UCT/UTC/GMT offsets:\n"
@@ -212,4 +215,3 @@ if (! $error) {
 echo "\n";
 
 echo "Done!\n";
-?>
\ No newline at end of file