Merged branch 'master' into api
This commit is contained in:
commit
259eabfaaa
9 changed files with 13 additions and 7 deletions
|
@ -1,4 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
$startTime = microtime(true);
|
||||||
|
|
||||||
require_once '../src/core.php';
|
require_once '../src/core.php';
|
||||||
|
|
||||||
$query = rtrim($_SERVER['REQUEST_URI'], '/');
|
$query = rtrim($_SERVER['REQUEST_URI'], '/');
|
||||||
|
@ -155,8 +157,10 @@ foreach (['GET', 'POST'] as $method)
|
||||||
\Chibi\Router::register(['UserController', 'settingsAction'], $method, '/user/{name}/settings', $userValidations);
|
\Chibi\Router::register(['UserController', 'settingsAction'], $method, '/user/{name}/settings', $userValidations);
|
||||||
\Chibi\Router::register(['UserController', 'editAction'], $method, '/user/{name}/edit', $userValidations);
|
\Chibi\Router::register(['UserController', 'editAction'], $method, '/user/{name}/edit', $userValidations);
|
||||||
\Chibi\Router::register(['UserController', 'activationAction'], $method, '/activation/{token}', $userValidations);
|
\Chibi\Router::register(['UserController', 'activationAction'], $method, '/activation/{token}', $userValidations);
|
||||||
|
\Chibi\Router::register(['UserController', 'activationProxyAction'], $method, '/activation-proxy', $userValidations);
|
||||||
\Chibi\Router::register(['UserController', 'activationProxyAction'], $method, '/activation-proxy/{token}', $userValidations);
|
\Chibi\Router::register(['UserController', 'activationProxyAction'], $method, '/activation-proxy/{token}', $userValidations);
|
||||||
\Chibi\Router::register(['UserController', 'passwordResetAction'], $method, '/password-reset/{token}', $userValidations);
|
\Chibi\Router::register(['UserController', 'passwordResetAction'], $method, '/password-reset/{token}', $userValidations);
|
||||||
|
\Chibi\Router::register(['UserController', 'passwordResetProxyAction'], $method, '/password-reset-proxy', $userValidations);
|
||||||
\Chibi\Router::register(['UserController', 'passwordResetProxyAction'], $method, '/password-reset-proxy/{token}', $userValidations);
|
\Chibi\Router::register(['UserController', 'passwordResetProxyAction'], $method, '/password-reset-proxy/{token}', $userValidations);
|
||||||
\Chibi\Router::register(['UserController', 'toggleSafetyAction'], $method, '/user/toggle-safety/{safety}', $userValidations);
|
\Chibi\Router::register(['UserController', 'toggleSafetyAction'], $method, '/user/toggle-safety/{safety}', $userValidations);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,8 +44,9 @@ class AuthController
|
||||||
{
|
{
|
||||||
\Chibi\Util\Url::forward(\Chibi\Util\Url::makeAbsolute($_SESSION['login-redirect-url']));
|
\Chibi\Util\Url::forward(\Chibi\Util\Url::makeAbsolute($_SESSION['login-redirect-url']));
|
||||||
unset($_SESSION['login-redirect-url']);
|
unset($_SESSION['login-redirect-url']);
|
||||||
return;
|
exit;
|
||||||
}
|
}
|
||||||
\Chibi\Util\Url::forward(\Chibi\Router::linkTo(['StaticPagesController', 'mainPageView']));
|
\Chibi\Util\Url::forward(\Chibi\Router::linkTo(['StaticPagesController', 'mainPageView']));
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ class LogController
|
||||||
'filter' => $formQuery,
|
'filter' => $formQuery,
|
||||||
'page' => 1
|
'page' => 1
|
||||||
]));
|
]));
|
||||||
return;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = Api::run(
|
$ret = Api::run(
|
||||||
|
|
|
@ -23,7 +23,7 @@ class PostController
|
||||||
'additionalInfo' => $additionalInfo,
|
'additionalInfo' => $additionalInfo,
|
||||||
'query' => $formQuery]);
|
'query' => $formQuery]);
|
||||||
\Chibi\Util\Url::forward($url);
|
\Chibi\Util\Url::forward($url);
|
||||||
return;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = trim($query);
|
$query = trim($query);
|
||||||
|
|
|
@ -155,5 +155,6 @@ class TagController
|
||||||
if ($suppliedOldPage != 0 and $suppliedOldQuery == $suppliedQuery)
|
if ($suppliedOldPage != 0 and $suppliedOldQuery == $suppliedQuery)
|
||||||
$params['page'] = $suppliedOldPage;
|
$params['page'] = $suppliedOldPage;
|
||||||
\Chibi\Util\Url::forward(\Chibi\Router::linkTo(['PostController', 'listView'], $params));
|
\Chibi\Util\Url::forward(\Chibi\Router::linkTo(['PostController', 'listView'], $params));
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,6 +128,7 @@ class UserController
|
||||||
|
|
||||||
\Chibi\Util\Url::forward(\Chibi\Router::linkTo(['StaticPagesController', 'mainPageView']));
|
\Chibi\Util\Url::forward(\Chibi\Router::linkTo(['StaticPagesController', 'mainPageView']));
|
||||||
LogHelper::log('{user} removed {subject}\'s account', ['subject' => TextHelper::reprUser($name)]);
|
LogHelper::log('{user} removed {subject}\'s account', ['subject' => TextHelper::reprUser($name)]);
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function settingsAction($name)
|
public function settingsAction($name)
|
||||||
|
@ -348,7 +349,7 @@ class UserController
|
||||||
if (Auth::isLoggedIn())
|
if (Auth::isLoggedIn())
|
||||||
{
|
{
|
||||||
\Chibi\Util\Url::forward(\Chibi\Router::linkTo(['StaticPagesController', 'mainPageView']));
|
\Chibi\Util\Url::forward(\Chibi\Router::linkTo(['StaticPagesController', 'mainPageView']));
|
||||||
return;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$suppliedName = InputHelper::get('name');
|
$suppliedName = InputHelper::get('name');
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Assets::setSubTitle('registration form');
|
Assets::setSubTitle('registration form');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ($this->context->transport->success === true): ?>
|
<?php if (isset($this->context->transport->message)): ?>
|
||||||
<?php \Chibi\View::render('message', $this->context) ?>
|
<?php \Chibi\View::render('message', $this->context) ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php if ($this->context->transport->success === true): ?>
|
<?php if (isset($this->context->transport->message)): ?>
|
||||||
<?php \Chibi\View::render('message', $this->context) ?>
|
<?php \Chibi\View::render('message', $this->context) ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
$startTime = microtime(true);
|
|
||||||
define('SZURU_VERSION', '0.7.1');
|
define('SZURU_VERSION', '0.7.1');
|
||||||
define('SZURU_LINK', 'http://github.com/rr-/szurubooru');
|
define('SZURU_LINK', 'http://github.com/rr-/szurubooru');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue