Skip to content

Commit 9555034

Browse files
committed
Merge branch 'develop' of github.com:storytlr/core into develop
2 parents 2e77655 + d8d8028 commit 9555034

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
define("STORYTLR_VERSION","0.9.4-rc1");
2+
define("STORYTLR_VERSION","1.1-dev");
33
define("DATABASE_VERSION", "1");
44
define("AUTO_INSTALL", true);
55
define("AUTO_UPGRADE", true);

protected/application/admin/controllers/AuthController.php

+9-7
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,14 @@ public function loginAction()
109109
// Send the cookie with the authentication data
110110
$cookie = new Stuffpress_Cookie($user->id);
111111
$cookie->set($remember);
112-
112+
113+
$config = Zend_Registry::get('configuration');
114+
$domain = trim($config->web->host, " /");
115+
$path = trim($config->web->path, " /");
116+
117+
113118
// If we have a special target
114-
if ($values['target'] == 'user_page') {
115-
$config = Zend_Registry::get('configuration');
116-
$domain = trim($config->web->host, " /");
117-
$path = trim($config->web->path, " /");
118-
119+
if ($values['target'] == 'user_page') {
119120
// If single user, we go back to the host
120121
if (isset($config->app->user)) {
121122
$url = "http://$domain/$path";
@@ -126,7 +127,8 @@ public function loginAction()
126127
return $this->_redirect($url);
127128
}
128129
else if ($values['target']) {
129-
return $this->_redirect($values['target']);
130+
$target = trim($values['target'], " /");
131+
return $this->_redirect("http://$domain/$target");
130132
}
131133

132134
// Otherwise we go back to the home page

0 commit comments

Comments
 (0)