email regex check update, remove warning surpress in pgsql wrapper, l10n

- l10n class has better mo file load check
- fix email regex for last part is now only on minimum 2 char check
- remove all @ warning surpress in the pgsql wrapper
This commit is contained in:
Clemens Schwaighofer
2017-11-24 13:06:14 +09:00
parent 2e85bf5ee8
commit f0ba8c3c50
5 changed files with 25 additions and 21 deletions
+9 -7
View File
@@ -35,7 +35,7 @@
private $input;
private $l10n;
public function __construct($lang = '', $path = '')
public function __construct($lang = '', $path = DEFAULT_TEMPLATE)
{
foreach (array('streams.php', 'gettext.php') as $include_file)
_spl_autoload($include_file);
@@ -45,12 +45,12 @@
else
$this->lang = $lang;
if (!$path)
$path = DEFAULT_TEMPLATE;
if (!is_dir(LAYOUT.$path.LANG))
if (is_dir(LAYOUT.$path.LANG))
$path = LAYOUT.$path.LANG;
elseif (!is_dir($path))
$path = '';
$this->mofile = LAYOUT.$path.LANG.$this->lang.".mo";
$this->mofile = $path.$this->lang.".mo";
// check if get a readable mofile
if (is_readable($this->mofile))
@@ -69,10 +69,12 @@
$this->lang = $lang;
if (!is_dir(LAYOUT.$path.LANG))
if (is_dir(LAYOUT.$path.LANG))
$path = LAYOUT.$path.LANG;
elseif (!is_dir($path))
$path = '';
$this->mofile = LAYOUT.$path.LANG.$this->lang.".mo";
$this->mofile = $path.$this->lang.".mo";
// check if get a readable mofile
if (is_readable($this->mofile))