Bugs solucionados

This commit is contained in:
Juan Ferrer Toribio 2015-02-08 16:39:22 +01:00
parent 1fca98aea3
commit fbeeb0cd33
3 changed files with 14 additions and 15 deletions

View File

@ -1,5 +1,5 @@
Package: php-vn-lib Package: php-vn-lib
Version: 1.0-5 Version: 1.0-7
Architecture: all Architecture: all
Maintainer: Juan Ferrer Toribio <juan@verdnatura.es> Maintainer: Juan Ferrer Toribio <juan@verdnatura.es>
Depends: php5-mysql Depends: php5-mysql

View File

@ -20,7 +20,7 @@ namespace Vn\Lib
class Locale class Locale
{ {
static $localeSet = FALSE; static $localeSet = FALSE;
static $locale = 'en'; static $locale = 'es';
static $strings = []; static $strings = [];
static $paths = []; static $paths = [];
@ -38,8 +38,8 @@ namespace Vn\Lib
self::$locale = $locale; self::$locale = $locale;
setlocale (LC_ALL, $locale); setlocale (LC_ALL, $locale);
self::$localeSet = TRUE; self::$localeSet = TRUE;
foreach (self::$paths as $path) foreach (self::$paths as $path => $kk)
self::loadFile ($path); self::loadFile ($path);
} }
@ -76,7 +76,7 @@ namespace Vn\Lib
static function addPath ($path) static function addPath ($path)
{ {
self::$paths[$path] = TRUE; self::$paths[$path] = TRUE;
if (self::$localeSet) if (self::$localeSet)
self::loadFile ($path); self::loadFile ($path);
} }

View File

@ -1,15 +1,14 @@
<?php <?php
$n = -1; const TYPE_NULL = 1;
define ('TYPE_NULL' , ++$n); const TYPE_BOOLEAN = 2;
define ('TYPE_INTEGER' , ++$n); const TYPE_INTEGER = 3;
define ('TYPE_TIME' , ++$n); const TYPE_DOUBLE = 4;
define ('TYPE_DATE' , ++$n); const TYPE_STRING = 5;
define ('TYPE_DATE_TIME', ++$n); const TYPE_OBJECT = 6;
define ('TYPE_STRING' , ++$n); const TYPE_TIME = 7;
define ('TYPE_DOUBLE' , ++$n); const TYPE_DATE = 8;
define ('TYPE_BOOLEAN' , ++$n); const TYPE_DATE_TIME = 9;
define ('TYPE_OBJECT' , ++$n);
class Time extends DateTime {} class Time extends DateTime {}