Skip to content

Commit

Permalink
Clear deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
Benn Oshrin committed Sep 13, 2019
1 parent 09d26bf commit a362dd5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions app/config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Configure\Engine\PhpConfig;
use Cake\Core\Plugin;
//use Cake\Core\Plugin;
use Cake\Database\Type;
use Cake\Datasource\ConnectionManager;
use Cake\Error\ErrorHandler;
use Cake\Http\ServerRequest;
use Cake\Log\Log;
use Cake\Mailer\Email;
use Cake\Mailer\TransportFactory;
use Cake\Utility\Inflector;
use Cake\Utility\Security;

Expand Down Expand Up @@ -151,7 +152,7 @@

Cache::setConfig(Configure::consume('Cache'));
ConnectionManager::setConfig(Configure::consume('Datasources'));
Email::setConfigTransport(Configure::consume('EmailTransport'));
TransportFactory::setConfig(Configure::consume('EmailTransport'));
Email::setConfig(Configure::consume('Email'));
Log::setConfig(Configure::consume('Log'));
// Set the salt based on our local configuration
Expand Down Expand Up @@ -222,6 +223,7 @@
* Plugin::loadAll(); // Loads all plugins at once
* Plugin::load('Migrations'); //Loads a single plugin named Migrations
*
* XXX plugins are now loaded using Application::addPlugin()
*/

/*
Expand Down
5 changes: 3 additions & 2 deletions app/config/bootstrap_cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
use Cake\Core\Configure;
use Cake\Core\Exception\MissingPluginException;
use Cake\Core\Plugin;
//use Cake\Core\Plugin;

/**
* Additional bootstrapping and configuration for CLI environments should
Expand All @@ -28,11 +28,12 @@
// Set logs to different files so they don't have permission conflicts.
Configure::write('Log.debug.file', 'cli-debug');
Configure::write('Log.error.file', 'cli-error');

/*
try {
Plugin::load('Bake');
} catch (MissingPluginException $e) {
// Do not halt if the plugin is missing
}
Plugin::load('Migrations');
*/
2 changes: 1 addition & 1 deletion app/src/Template/Element/menuUser.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<div id="user-panel-user-info">
<em class="material-icons">person</em>
<div id="user-panel-cn"><?= $vv_user['username']; ?></div>
<div id="user-panel-id"><?php print $this->Session->read('Auth.User.username'); ?></div>
<div id="user-panel-id"><?php print $this->getRequest()->getSession()->read('Auth.User.username'); ?></div>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/src/Template/Layout/default.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ if(isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'M
$bodyClasses = $controller_stripped . ' ' .$action_stripped;

// add further body classes as needed
if($this->Session->check('Auth.User') != NULL) {
if($this->getRequest()->getSession()->check('Auth.User') != NULL) {
$bodyClasses .= ' logged-in';
} else {
$bodyClasses .= ' logged-out';
Expand Down

0 comments on commit a362dd5

Please sign in to comment.