Fix introduced style errors
This commit is contained in:
parent
d6953fa5ed
commit
fecfeac55d
|
@ -8,14 +8,16 @@
|
|||
|
||||
class OC_Core_LostPassword_Controller {
|
||||
protected static function displayLostPasswordPage($error, $requested) {
|
||||
OC_Template::printGuestPage('core/lostpassword', 'lostpassword', array('error' => $error, 'requested' => $requested));
|
||||
OC_Template::printGuestPage('core/lostpassword', 'lostpassword',
|
||||
array('error' => $error, 'requested' => $requested));
|
||||
}
|
||||
|
||||
protected static function displayResetPasswordPage($success, $args) {
|
||||
$route_args = array();
|
||||
$route_args['token'] = $args['token'];
|
||||
$route_args['user'] = $args['user'];
|
||||
OC_Template::printGuestPage('core/lostpassword', 'resetpassword', array('success' => $success, 'args' => $route_args));
|
||||
OC_Template::printGuestPage('core/lostpassword', 'resetpassword',
|
||||
array('success' => $success, 'args' => $route_args));
|
||||
}
|
||||
|
||||
protected static function checkToken($user, $token) {
|
||||
|
@ -29,10 +31,12 @@ class OC_Core_LostPassword_Controller {
|
|||
public static function sendEmail($args) {
|
||||
if (OC_User::userExists($_POST['user'])) {
|
||||
$token = hash('sha256', OC_Util::generate_random_bytes(30).OC_Config::getValue('passwordsalt', ''));
|
||||
OC_Preferences::setValue($_POST['user'], 'owncloud', 'lostpassword', hash('sha256', $token)); // Hash the token again to prevent timing attacks
|
||||
OC_Preferences::setValue($_POST['user'], 'owncloud', 'lostpassword',
|
||||
hash('sha256', $token)); // Hash the token again to prevent timing attacks
|
||||
$email = OC_Preferences::getValue($_POST['user'], 'settings', 'email', '');
|
||||
if (!empty($email)) {
|
||||
$link = OC_Helper::linkToRoute('core_lostpassword_reset', array('user' => $_POST['user'], 'token' => $token));
|
||||
$link = OC_Helper::linkToRoute('core_lostpassword_reset',
|
||||
array('user' => $_POST['user'], 'token' => $token));
|
||||
$link = OC_Helper::makeURLAbsolute($link);
|
||||
|
||||
$tmpl = new OC_Template('core/lostpassword', 'email');
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
require_once('settings/routes.php');
|
||||
require_once 'settings/routes.php';
|
||||
|
||||
// Core ajax actions
|
||||
// AppConfig
|
||||
|
|
|
@ -516,7 +516,8 @@ class OC{
|
|||
}
|
||||
$file_ext = substr($param['file'], -3);
|
||||
if ($file_ext != 'php'
|
||||
|| !self::loadAppScriptFile($param)) {
|
||||
|| !self::loadAppScriptFile($param))
|
||||
{
|
||||
header('HTTP/1.0 404 Not Found');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -247,7 +247,10 @@ class OC_OCS {
|
|||
try {
|
||||
$router->match($_SERVER['PATH_INFO']);
|
||||
} catch (ResourceNotFoundException $e) {
|
||||
$txt='Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services. DEBUG OUTPUT:'."\n";
|
||||
$txt='Invalid query, please check the syntax. '
|
||||
.'API specifications are here: '
|
||||
.'http://www.freedesktop.org/wiki/Specifications/open-collaboration-services.'
|
||||
.'DEBUG OUTPUT:'."\n";
|
||||
$txt.=OC_OCS::getdebugoutput();
|
||||
echo(OC_OCS::generatexml($format, 'failed', 999, $txt));
|
||||
} catch (MethodNotAllowedException $e) {
|
||||
|
|
|
@ -106,7 +106,11 @@ class OC_Route extends Route {
|
|||
* @param $file
|
||||
*/
|
||||
public function actionInclude($file) {
|
||||
$function = create_function('$param', 'unset($param["_route"]);$_GET=array_merge($_GET,$param);unset($param);require_once "'.$file.'";');
|
||||
$function = create_function('$param',
|
||||
'unset($param["_route"]);'
|
||||
.'$_GET=array_merge($_GET,$param);'
|
||||
.'unset($param);'
|
||||
.'require_once "'.$file.'";');
|
||||
$this->action($function);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ class OC_Router {
|
|||
$file = OC_App::getAppPath($app).'/appinfo/routes.php';
|
||||
if(file_exists($file)) {
|
||||
$this->useCollection($app);
|
||||
require_once($file);
|
||||
require_once $file;
|
||||
$collection = $this->getCollection($app);
|
||||
$this->root->addCollection($collection, '/apps/'.$app);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ class OC_Router {
|
|||
unset($parameters['action']);
|
||||
call_user_func($action, $parameters);
|
||||
} elseif (isset($parameters['file'])) {
|
||||
include ($parameters['file']);
|
||||
include $parameters['file'];
|
||||
} else {
|
||||
throw new Exception('no action available');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue