diff options
author | Maryana Rozhankivska <mariroz@mr.lviv.ua> | 2014-04-25 13:25:03 +0300 |
---|---|---|
committer | Maryana Rozhankivska <mariroz@mr.lviv.ua> | 2014-04-25 13:25:03 +0300 |
commit | b6413975c36a5f912ed95ee749a5a1bd2d868f40 (patch) | |
tree | 210073e08bfa724f49dfc7c5a1d5dc774fc2cd6a | |
parent | d151b51c678127274ce76a05b28393961cfca9af (diff) | |
download | wallabag-b6413975c36a5f912ed95ee749a5a1bd2d868f40.tar.gz wallabag-b6413975c36a5f912ed95ee749a5a1bd2d868f40.tar.zst wallabag-b6413975c36a5f912ed95ee749a5a1bd2d868f40.zip |
fix of putenv warning under safe mode, issue #646
-rwxr-xr-x | inc/poche/Poche.class.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 7e3e6afe..5aa6ea07 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php | |||
@@ -72,7 +72,7 @@ class Poche | |||
72 | 72 | ||
73 | # l10n | 73 | # l10n |
74 | $language = $this->user->getConfigValue('language'); | 74 | $language = $this->user->getConfigValue('language'); |
75 | putenv('LC_ALL=' . $language); | 75 | @putenv('LC_ALL=' . $language); |
76 | setlocale(LC_ALL, $language); | 76 | setlocale(LC_ALL, $language); |
77 | bindtextdomain($language, LOCALE); | 77 | bindtextdomain($language, LOCALE); |
78 | textdomain($language); | 78 | textdomain($language); |
@@ -241,12 +241,12 @@ class Poche | |||
241 | $filter = new Twig_SimpleFilter('getReadingTime', 'Tools::getReadingTime'); | 241 | $filter = new Twig_SimpleFilter('getReadingTime', 'Tools::getReadingTime'); |
242 | $this->tpl->addFilter($filter); | 242 | $this->tpl->addFilter($filter); |
243 | } | 243 | } |
244 | 244 | ||
245 | public function createNewUser() { | 245 | public function createNewUser() { |
246 | if (isset($_GET['newuser'])){ | 246 | if (isset($_GET['newuser'])){ |
247 | if ($_POST['newusername'] != "" && $_POST['password4newuser'] != ""){ | 247 | if ($_POST['newusername'] != "" && $_POST['password4newuser'] != ""){ |
248 | $newusername = filter_var($_POST['newusername'], FILTER_SANITIZE_STRING); | 248 | $newusername = filter_var($_POST['newusername'], FILTER_SANITIZE_STRING); |
249 | if (!$this->store->userExists($newusername)){ | 249 | if (!$this->store->userExists($newusername)){ |
250 | if ($this->store->install($newusername, Tools::encodeString($_POST['password4newuser'] . $newusername))) { | 250 | if ($this->store->install($newusername, Tools::encodeString($_POST['password4newuser'] . $newusername))) { |
251 | Tools::logm('The new user '.$newusername.' has been installed'); | 251 | Tools::logm('The new user '.$newusername.' has been installed'); |
252 | $this->messages->add('s', sprintf(_('The new user %s has been installed. Do you want to <a href="?logout">logout ?</a>'),$newusername)); | 252 | $this->messages->add('s', sprintf(_('The new user %s has been installed. Do you want to <a href="?logout">logout ?</a>'),$newusername)); |
@@ -265,7 +265,7 @@ class Poche | |||
265 | } | 265 | } |
266 | } | 266 | } |
267 | } | 267 | } |
268 | 268 | ||
269 | public function deleteUser(){ | 269 | public function deleteUser(){ |
270 | if (isset($_GET['deluser'])){ | 270 | if (isset($_GET['deluser'])){ |
271 | if ($this->store->listUsers() > 1) { | 271 | if ($this->store->listUsers() > 1) { |