mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Session Migration command should not include toolbar comments.
This commit is contained in:
parent
e83d18f021
commit
e7f3ab0841
@ -109,7 +109,7 @@ class CreateMigration extends BaseCommand
|
||||
'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.
|
||||
|
@ -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
|
||||
|
@ -282,14 +282,15 @@ if ( ! function_exists('session'))
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ class View implements RendererInterface
|
||||
|
||||
$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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user