aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche
diff options
context:
space:
mode:
Diffstat (limited to 'inc/poche')
-rw-r--r--inc/poche/Poche.class.php30
1 files changed, 15 insertions, 15 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index e0dc0d20..cc2d8de3 100644
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -35,7 +35,7 @@ class Poche
35 35
36 /** 36 /**
37 * all checks before installation. 37 * all checks before installation.
38 * @return boolean 38 * @return boolean
39 */ 39 */
40 private function checkBeforeInstall() 40 private function checkBeforeInstall()
41 { 41 {
@@ -47,7 +47,7 @@ class Poche
47 die('You don\'t have write access on cache directory.'); 47 die('You don\'t have write access on cache directory.');
48 } 48 }
49 else if (file_exists('./install/update.php') && !DEBUG_POCHE) { 49 else if (file_exists('./install/update.php') && !DEBUG_POCHE) {
50 $msg = 'A poche update is needed. Please execute this update <a href="install/update.php">by clicking here</a>. If you have already do the update, please delete /install folder.'; 50 $msg = 'A poche update is needed. Please execute this update <a href="install/update.php">by clicking here</a>. If you have already done the update, please delete /install folder.';
51 $allIsGood = FALSE; 51 $allIsGood = FALSE;
52 } 52 }
53 else if (file_exists('./install') && !DEBUG_POCHE) { 53 else if (file_exists('./install') && !DEBUG_POCHE) {
@@ -59,7 +59,7 @@ class Poche
59 $msg = 'You don\'t have write access on sqlite file.'; 59 $msg = 'You don\'t have write access on sqlite file.';
60 $allIsGood = FALSE; 60 $allIsGood = FALSE;
61 } 61 }
62 62
63 if (!$allIsGood) { 63 if (!$allIsGood) {
64 echo $this->tpl->render('error.twig', array( 64 echo $this->tpl->render('error.twig', array(
65 'msg' => $msg 65 'msg' => $msg
@@ -90,7 +90,7 @@ class Poche
90 $this->tpl->addFilter($filter); 90 $this->tpl->addFilter($filter);
91 } 91 }
92 92
93 private function init() 93 private function init()
94 { 94 {
95 Tools::initPhp(); 95 Tools::initPhp();
96 Session::init(); 96 Session::init();
@@ -108,21 +108,21 @@ class Poche
108 $language = $this->user->getConfigValue('language'); 108 $language = $this->user->getConfigValue('language');
109 putenv('LC_ALL=' . $language); 109 putenv('LC_ALL=' . $language);
110 setlocale(LC_ALL, $language); 110 setlocale(LC_ALL, $language);
111 bindtextdomain($language, LOCALE); 111 bindtextdomain($language, LOCALE);
112 textdomain($language); 112 textdomain($language);
113 113
114 # Pagination 114 # Pagination
115 $this->pagination = new Paginator($this->user->getConfigValue('pager'), 'p'); 115 $this->pagination = new Paginator($this->user->getConfigValue('pager'), 'p');
116 } 116 }
117 117
118 private function install() 118 private function install()
119 { 119 {
120 Tools::logm('poche still not installed'); 120 Tools::logm('poche still not installed');
121 echo $this->tpl->render('install.twig', array( 121 echo $this->tpl->render('install.twig', array(
122 'token' => Session::getToken() 122 'token' => Session::getToken()
123 )); 123 ));
124 if (isset($_GET['install'])) { 124 if (isset($_GET['install'])) {
125 if (($_POST['password'] == $_POST['password_repeat']) 125 if (($_POST['password'] == $_POST['password_repeat'])
126 && $_POST['password'] != "" && $_POST['login'] != "") { 126 && $_POST['password'] != "" && $_POST['login'] != "") {
127 # let's rock, install poche baby ! 127 # let's rock, install poche baby !
128 if ($this->store->install($_POST['login'], Tools::encodeString($_POST['password'] . $_POST['login']))) 128 if ($this->store->install($_POST['login'], Tools::encodeString($_POST['password'] . $_POST['login'])))
@@ -280,8 +280,8 @@ class Poche
280 } 280 }
281 281
282 /** 282 /**
283 * update the password of the current user. 283 * update the password of the current user.
284 * if MODE_DEMO is TRUE, the password can't be updated. 284 * if MODE_DEMO is TRUE, the password can't be updated.
285 * @todo add the return value 285 * @todo add the return value
286 * @todo set the new password in function header like this updatePassword($newPassword) 286 * @todo set the new password in function header like this updatePassword($newPassword)
287 * @return boolean 287 * @return boolean
@@ -350,7 +350,7 @@ class Poche
350 /** 350 /**
351 * log out the poche user. It cleans the session. 351 * log out the poche user. It cleans the session.
352 * @todo add the return value 352 * @todo add the return value
353 * @return boolean 353 * @return boolean
354 */ 354 */
355 public function logout() 355 public function logout()
356 { 356 {
@@ -403,7 +403,7 @@ class Poche
403 /** 403 /**
404 * import from Pocket. poche needs a ./ril_export.html file 404 * import from Pocket. poche needs a ./ril_export.html file
405 * @todo add the return value 405 * @todo add the return value
406 * @return boolean 406 * @return boolean
407 */ 407 */
408 private function importFromPocket() 408 private function importFromPocket()
409 { 409 {
@@ -430,7 +430,7 @@ class Poche
430 $this->action('toggle_archive', $url, $last_id, TRUE); 430 $this->action('toggle_archive', $url, $last_id, TRUE);
431 } 431 }
432 } 432 }
433 433
434 # the second <ul> is for read links 434 # the second <ul> is for read links
435 $read = 1; 435 $read = 1;
436 } 436 }
@@ -442,7 +442,7 @@ class Poche
442 /** 442 /**
443 * import from Readability. poche needs a ./readability file 443 * import from Readability. poche needs a ./readability file
444 * @todo add the return value 444 * @todo add the return value
445 * @return boolean 445 * @return boolean
446 */ 446 */
447 private function importFromReadability() 447 private function importFromReadability()
448 { 448 {
@@ -495,7 +495,7 @@ class Poche
495 * import datas into your poche 495 * import datas into your poche
496 * @param string $from name of the service to import : pocket, instapaper or readability 496 * @param string $from name of the service to import : pocket, instapaper or readability
497 * @todo add the return value 497 * @todo add the return value
498 * @return boolean 498 * @return boolean
499 */ 499 */
500 public function import($from) 500 public function import($from)
501 { 501 {