aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/controller/visitor
diff options
context:
space:
mode:
Diffstat (limited to 'application/front/controller/visitor')
-rw-r--r--application/front/controller/visitor/InstallController.php13
-rw-r--r--application/front/controller/visitor/TagController.php2
2 files changed, 5 insertions, 10 deletions
diff --git a/application/front/controller/visitor/InstallController.php b/application/front/controller/visitor/InstallController.php
index aa032860..94ebb4ae 100644
--- a/application/front/controller/visitor/InstallController.php
+++ b/application/front/controller/visitor/InstallController.php
@@ -128,13 +128,14 @@ class InstallController extends ShaarliVisitorController
128 $this->container->conf->get('credentials.salt') 128 $this->container->conf->get('credentials.salt')
129 ) 129 )
130 ); 130 );
131 $this->container->conf->set('general.header_link', $this->container->basePath);
131 132
132 try { 133 try {
133 // Everything is ok, let's create config file. 134 // Everything is ok, let's create config file.
134 $this->container->conf->write($this->container->loginManager->isLoggedIn()); 135 $this->container->conf->write($this->container->loginManager->isLoggedIn());
135 } catch (\Exception $e) { 136 } catch (\Exception $e) {
136 $this->assignView('message', $e->getMessage()); 137 $this->assignView('message', t('Error while writing config file after configuration update.'));
137 $this->assignView('stacktrace', $e->getTraceAsString()); 138 $this->assignView('stacktrace', $e->getMessage() . PHP_EOL . $e->getTraceAsString());
138 139
139 return $response->write($this->render('error')); 140 return $response->write($this->render('error'));
140 } 141 }
@@ -155,18 +156,14 @@ class InstallController extends ShaarliVisitorController
155 { 156 {
156 // Ensure Shaarli has proper access to its resources 157 // Ensure Shaarli has proper access to its resources
157 $errors = ApplicationUtils::checkResourcePermissions($this->container->conf); 158 $errors = ApplicationUtils::checkResourcePermissions($this->container->conf);
158
159 if (empty($errors)) { 159 if (empty($errors)) {
160 return true; 160 return true;
161 } 161 }
162 162
163 // FIXME! Do not insert HTML here. 163 $message = t('Insufficient permissions:') . PHP_EOL;
164 $message = '<p>'. t('Insufficient permissions:') .'</p><ul>';
165
166 foreach ($errors as $error) { 164 foreach ($errors as $error) {
167 $message .= '<li>'.$error.'</li>'; 165 $message .= PHP_EOL . $error;
168 } 166 }
169 $message .= '</ul>';
170 167
171 throw new ResourcePermissionException($message); 168 throw new ResourcePermissionException($message);
172 } 169 }
diff --git a/application/front/controller/visitor/TagController.php b/application/front/controller/visitor/TagController.php
index c176f43f..de4e7ea2 100644
--- a/application/front/controller/visitor/TagController.php
+++ b/application/front/controller/visitor/TagController.php
@@ -11,8 +11,6 @@ use Slim\Http\Response;
11 * Class TagController 11 * Class TagController
12 * 12 *
13 * Slim controller handle tags. 13 * Slim controller handle tags.
14 *
15 * TODO: check redirections with new helper
16 */ 14 */
17class TagController extends ShaarliVisitorController 15class TagController extends ShaarliVisitorController
18{ 16{