Skip to content

Commit 653c427

Browse files
author
Mark S.
committed
Merge pull request #133 from dereuromark/develop
Develop
2 parents 58210e8 + ca586e1 commit 653c427

23 files changed

+64
-1941
lines changed

Controller/Component/Auth/FallbackPasswordHasher.php

Lines changed: 0 additions & 87 deletions
This file was deleted.

Controller/Component/Auth/ModernPasswordHasher.php

Lines changed: 0 additions & 80 deletions
This file was deleted.

Controller/Component/Auth/PasswordHasherFactory.php

Lines changed: 0 additions & 40 deletions
This file was deleted.

Controller/Component/CommonComponent.php

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,6 @@ public function startup(Controller $Controller = null) {
5656
$this->Controller->request->params['pass'] = $this->trimDeep($this->Controller->request->params['pass']);
5757
}
5858

59-
// Deprecation notices
60-
if (Configure::read('App.warnAboutNamedParams')) {
61-
if (!empty($Controller->request->params['named']) && ($referer = $Controller->request->referer(true)) && $referer !== '/') {
62-
trigger_error('Named params ' . json_encode($Controller->request->params['named']) . ' - from ' . $referer, E_USER_DEPRECATED);
63-
}
64-
}
65-
6659
// Information gathering
6760
if (!Configure::read('App.disableMobileDetection') && ($mobile = $this->Session->read('Session.mobile')) === null) {
6861
App::uses('UserAgentLib', 'Tools.Lib');
@@ -692,26 +685,6 @@ public function ensureControllerConsistency() {
692685
}
693686
}
694687

695-
/**
696-
* Main controller function for seo-slugs
697-
* passed titleSlug != current title => redirect to the expected one
698-
*
699-
* @deprecated Will be removed in 1.0
700-
* @return void
701-
*/
702-
public function ensureConsistency($id, $passedTitleSlug, $currentTitle) {
703-
$expectedTitle = slug($currentTitle);
704-
if (empty($passedTitleSlug) || $expectedTitle != $passedTitleSlug) { # case sensitive!!!
705-
$ref = env('HTTP_REFERER');
706-
if (!$this->isForeignReferer($ref)) {
707-
$this->Controller->log('Internal ConsistencyProblem at \'' . $ref . '\' - [' . $passedTitleSlug . '] instead of [' . $expectedTitle . ']', 'referer');
708-
} else {
709-
$this->Controller->log('External ConsistencyProblem at \'' . $ref . '\' - [' . $passedTitleSlug . '] instead of [' . $expectedTitle . ']', 'referer');
710-
}
711-
$this->Controller->redirect([$id, $expectedTitle], 301);
712-
}
713-
}
714-
715688
/**
716689
* Try to detect group for a multidim array for select boxes.
717690
* Extracts the group name of the selected key.
@@ -951,26 +924,6 @@ public function getSearchItem($keyword = null, $searchphrase = null, $options =
951924
return [$keyword => $searchphrase];
952925
}
953926

954-
/**
955-
* Returns auto-generated password
956-
*
957-
* @param string $type: user, ...
958-
* @param int $length (if no type is submitted)
959-
* @return pwd on success, empty string otherwise
960-
* @deprecated Will be removed in 1.0. Use RandomLib
961-
*/
962-
public static function pwd($type = null, $length = null) {
963-
trigger_error('deprecated');
964-
App::uses('RandomLib', 'Tools.Lib');
965-
if (!empty($type) && $type === 'user') {
966-
return RandomLib::pronounceablePwd(6);
967-
}
968-
if (!empty($length)) {
969-
return RandomLib::pronounceablePwd($length);
970-
}
971-
return '';
972-
}
973-
974927
/**
975928
* TODO: move to Lib
976929
* Checks if string contains @ sign

Controller/MyController.php

Lines changed: 2 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
<?php
2-
App::uses('Controller', 'Controller');
2+
App::uses('ShimController', 'Shim.Controller');
33

44
/**
55
* DRY Controller stuff
66
*/
7-
class MyController extends Controller {
8-
9-
/**
10-
* @var array
11-
* @link https://github.com/cakephp/cakephp/pull/857
12-
*/
13-
public $paginate = [];
7+
class MyController extends ShimController {
148

159
/**
1610
* Fix for asset compress to not run into fatal error loops
@@ -22,52 +16,4 @@ public function __construct($request = null, $response = null) {
2216
}
2317
}
2418

25-
/**
26-
* Add headers for IE8 etc to fix caching issues in those stupid browsers
27-
*
28-
* @overwrite to fix IE cacheing issues
29-
* @return void
30-
*/
31-
public function disableCache() {
32-
$this->response->header([
33-
'Pragma' => 'no-cache',
34-
]);
35-
return parent::disableCache();
36-
}
37-
38-
/**
39-
* Handles automatic pagination of model records.
40-
*
41-
* @overwrite to support defaults like limit, querystring settings
42-
* @param Model|string $object Model to paginate (e.g: model instance, or 'Model', or 'Model.InnerModel')
43-
* @param string|array $scope Conditions to use while paginating
44-
* @param array $whitelist List of allowed options for paging
45-
* @return array Model query results
46-
*/
47-
public function paginate($object = null, $scope = [], $whitelist = []) {
48-
if ($defaultSettings = (array)Configure::read('Paginator')) {
49-
$this->paginate += $defaultSettings;
50-
}
51-
return parent::paginate($object, $scope, $whitelist);
52-
}
53-
54-
/**
55-
* Hook to monitor headers being sent.
56-
*
57-
* @return void
58-
*/
59-
public function afterFilter() {
60-
parent::afterFilter();
61-
62-
if (Configure::read('App.monitorHeaders') && $this->name !== 'CakeError') {
63-
if (headers_sent($filename, $linenum)) {
64-
$message = sprintf('Headers already sent in %s on line %s', $filename, $linenum);
65-
if (Configure::read('debug')) {
66-
throw new CakeException($message);
67-
}
68-
trigger_error($message);
69-
}
70-
}
71-
}
72-
7319
}

Controller/QloginController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class QloginController extends ToolsAppController {
99

1010
public $uses = ['Tools.Qlogin'];
1111

12-
public $components = ['Tools.Common'];
12+
public $components = ['Tools.Flash', 'Tools.Common'];
1313

1414
public function beforeFilter() {
1515
parent::beforeFilter();

0 commit comments

Comments
 (0)