aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/index.php b/index.php
index 4aebfe10..a6459270 100644
--- a/index.php
+++ b/index.php
@@ -8,6 +8,7 @@
8 * @license http://www.wtfpl.net/ see COPYING file 8 * @license http://www.wtfpl.net/ see COPYING file
9 */ 9 */
10 10
11define ('POCHE', '1.0.0');
11require_once 'inc/poche/global.inc.php'; 12require_once 'inc/poche/global.inc.php';
12 13
13# Start Poche 14# Start Poche
@@ -35,7 +36,12 @@ $tpl_vars = array(
35if (! empty($notInstalledMessage)) { 36if (! empty($notInstalledMessage)) {
36 if (! Poche::$canRenderTemplates || ! Poche::$configFileAvailable) { 37 if (! Poche::$canRenderTemplates || ! Poche::$configFileAvailable) {
37 # We cannot use Twig to display the error message 38 # We cannot use Twig to display the error message
38 die($notInstalledMessage); 39 echo '<h1>Errors</h1><ol>';
40 foreach ($notInstalledMessage as $message) {
41 echo '<li>' . $message . '</li>';
42 }
43 echo '</ol>';
44 die();
39 } else { 45 } else {
40 # Twig is installed, put the error message in the template 46 # Twig is installed, put the error message in the template
41 $tpl_file = Tools::getTplFile('error'); 47 $tpl_file = Tools::getTplFile('error');
@@ -61,7 +67,10 @@ if (isset($_GET['login'])) {
61 $poche->export(); 67 $poche->export();
62} elseif (isset($_GET['updatetheme'])) { 68} elseif (isset($_GET['updatetheme'])) {
63 $poche->updateTheme(); 69 $poche->updateTheme();
70} elseif (isset($_GET['updatelanguage'])) {
71 $poche->updateLanguage();
64} 72}
73
65elseif (isset($_GET['plainurl']) && !empty($_GET['plainurl'])) { 74elseif (isset($_GET['plainurl']) && !empty($_GET['plainurl'])) {
66 $plain_url = new Url(base64_encode($_GET['plainurl'])); 75 $plain_url = new Url(base64_encode($_GET['plainurl']));
67 $poche->action('add', $plain_url); 76 $poche->action('add', $plain_url);