Skip to content

Commit

Permalink
Showing 4 changed files with 6 additions and 41 deletions.
2 changes: 1 addition & 1 deletion system/Commands/Sessions/CreateMigration.php
Original file line number Diff line number Diff line change
@@ -109,7 +109,7 @@ public function run(array $params = [])
'matchIP' => $config->sessionMatchIP ?? false,
];

$template = view('\CodeIgniter\Commands\Sessions\Views\migration.tpl', $data);
$template = view('\CodeIgniter\Commands\Sessions\Views\migration.tpl', $data, ['debug' => false]);
$template = str_replace('@php', '<?php', $template);

// Write the file out.
36 changes: 0 additions & 36 deletions system/Commands/Sessions/Views/migration.tpl.php
Original file line number Diff line number Diff line change
@@ -1,41 +1,5 @@
@php namespace <?= $namespace ?>\Database\Migrations;

/**
* CodeIgniter
*
* An open source application development framework for PHP
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014-2018 British Columbia Institute of Technology
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @package CodeIgniter
* @author CodeIgniter Dev Team
* @copyright 2014-2018 British Columbia Institute of Technology (https://bcit.ca/)
* @license https://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 3.0.0
* @filesource
*/

use CodeIgniter\Database\Migration;

class Migration_create_<?= $tableName ?>_table extends Migration
7 changes: 4 additions & 3 deletions system/Common.php
Original file line number Diff line number Diff line change
@@ -282,14 +282,15 @@ function esc($data, $context = 'html', $encoding = null)
*/
function session($val = null)
{
$session = \Config\Services::session();

// Returning a single item?
if (is_string($val))
{
helper('array');
return dot_array_search($val, $_SESSION);
return $session->get($val);
}

return \Config\Services::session();
return $session;
}

}
2 changes: 1 addition & 1 deletion system/View/View.php
Original file line number Diff line number Diff line change
@@ -209,7 +209,7 @@ public function render(string $view, array $options = null, $saveData = null): s

$this->logPerformance($this->renderVars['start'], microtime(true), $this->renderVars['view']);

if (CI_DEBUG)
if (CI_DEBUG && (! isset($options['debug']) || $options['debug'] === true))
{
$after = (new \Config\Filters())->globals['after'];
if (in_array('toolbar', $after) || array_key_exists('toolbar', $after))

0 comments on commit e7f3ab0

Please sign in to comment.