diff --git a/admin/index.php b/admin/index.php index f4a1f92..ab8c7a9 100644 --- a/admin/index.php +++ b/admin/index.php @@ -25,7 +25,7 @@ define('PLUGINS_PATH', APPLICATION_PATH . DIRECTORY_SEPARATOR . 'plugins'); // here we'll quicly check for absolute minimal php5 support -if(version_compare(phpversion(), "5.1.0", 'ge')){ +if(version_compare(phpversion(), "5.3.0", 'ge')){ // include the bootstrap file include(SYSTEM_PATH . DIRECTORY_SEPARATOR . 'bootstrap.php'); @@ -50,6 +50,6 @@ $application = new App($config); } else { - trigger_error('This application requires PHP 5.1+. Please upgrade your version of PHP.', E_USER_ERROR); + trigger_error('This application requires PHP 5.3+. Please upgrade your version of PHP.', E_USER_ERROR); } ?> \ No newline at end of file diff --git a/modules/Users/Users_Admin.php b/modules/Users/Users_Admin.php index d2a1d9b..8468896 100644 --- a/modules/Users/Users_Admin.php +++ b/modules/Users/Users_Admin.php @@ -34,7 +34,7 @@ public function view(){ * @access public */ public function signup(){ - if($user_id = app()->user->signup()){ + if($user_id = user()->signup()){ $_SESSION['user_id'] = $user_id; sml()->say(text('signup:account_success'), true); router()->redirect('login'); diff --git a/system/template/Template.php b/system/template/Template.php index c3ab87f..0cf810d 100644 --- a/system/template/Template.php +++ b/system/template/Template.php @@ -642,7 +642,9 @@ public function url($path = false, $bits = false){ // Otherwise, just build it as normal if(!$route_mask){ - $url .= sprintf('/%s', $r['module']); + if($r['module'] != strtolower(app()->config('default_module'))){ + $url .= sprintf('/%s', $r['module']); + } $url .= $r['method'] != app()->config('default_method') || is_array($bits) ? sprintf('/%s', $r['method']) : ''; } diff --git a/system/user/User.php b/system/user/User.php index 7d593d5..3c214ed 100644 --- a/system/user/User.php +++ b/system/user/User.php @@ -50,7 +50,7 @@ public function signup(){ // if the user is logged in, send to interface if($this->isLoggedIn()){ - app()->router->redirectToUrl( app()->router->interfaceUrl() ); + router()->redirectToUrl( app()->router->interfaceUrl() ); } $result = false; @@ -64,7 +64,7 @@ public function signup(){ $result = $form->save(); } - app()->template->set(array('form'=>$form)); + template()->set(array('form'=>$form)); return $result; @@ -306,7 +306,7 @@ public function postLoginRedirect(){ $redirect = false; } } - return empty($redirect) ? router()->interfaceUrl() : $redirect; + return (empty($redirect) ? router()->interfaceUrl() : $redirect); }