summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/config/autoload.php3
-rw-r--r--application/config/config.php3
-rw-r--r--application/config/constants.php3
-rw-r--r--application/config/database.php4
-rw-r--r--application/config/doctypes.php3
-rw-r--r--application/config/foreign_chars.php3
-rw-r--r--application/config/hooks.php3
-rw-r--r--application/config/memcached.php3
-rw-r--r--application/config/migration.php3
-rw-r--r--application/config/mimes.php3
-rw-r--r--application/config/profiler.php3
-rw-r--r--application/config/routes.php3
-rw-r--r--application/config/smileys.php3
-rw-r--r--application/config/user_agents.php3
-rw-r--r--user_guide_src/source/general/creating_libraries.rst3
15 files changed, 31 insertions, 15 deletions
diff --git a/application/config/autoload.php b/application/config/autoload.php
index 3bf999e99..f3ae942a2 100644
--- a/application/config/autoload.php
+++ b/application/config/autoload.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,7 @@
* @since Version 1.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
diff --git a/application/config/config.php b/application/config/config.php
index e0b5a4c16..ae89715c0 100644
--- a/application/config/config.php
+++ b/application/config/config.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,7 @@
* @since Version 1.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
diff --git a/application/config/constants.php b/application/config/constants.php
index e2820ad2b..239fd46fb 100644
--- a/application/config/constants.php
+++ b/application/config/constants.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,7 @@
* @since Version 1.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
diff --git a/application/config/database.php b/application/config/database.php
index 56bea72aa..c8297796b 100644
--- a/application/config/database.php
+++ b/application/config/database.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,8 @@
* @since Version 1.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
+
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
diff --git a/application/config/doctypes.php b/application/config/doctypes.php
index 3086a35f9..4468456b3 100644
--- a/application/config/doctypes.php
+++ b/application/config/doctypes.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,7 @@
* @since Version 1.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
$_doctypes = array(
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
diff --git a/application/config/foreign_chars.php b/application/config/foreign_chars.php
index 07fc1785b..e151364ad 100644
--- a/application/config/foreign_chars.php
+++ b/application/config/foreign_chars.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,7 @@
* @since Version 1.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
diff --git a/application/config/hooks.php b/application/config/hooks.php
index 18fb7b6ad..2693c34f7 100644
--- a/application/config/hooks.php
+++ b/application/config/hooks.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,7 @@
* @since Version 1.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
diff --git a/application/config/memcached.php b/application/config/memcached.php
index 0499c66b5..373536d44 100644
--- a/application/config/memcached.php
+++ b/application/config/memcached.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,7 @@
* @since Version 2.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
diff --git a/application/config/migration.php b/application/config/migration.php
index 9191fcfba..3b84787d3 100644
--- a/application/config/migration.php
+++ b/application/config/migration.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,7 @@
* @since Version 1.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
diff --git a/application/config/mimes.php b/application/config/mimes.php
index 2b4c36805..8123557f4 100644
--- a/application/config/mimes.php
+++ b/application/config/mimes.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,7 @@
* @since Version 1.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
diff --git a/application/config/profiler.php b/application/config/profiler.php
index b08666cb0..f99e109db 100644
--- a/application/config/profiler.php
+++ b/application/config/profiler.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,7 @@
* @since Version 1.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
diff --git a/application/config/routes.php b/application/config/routes.php
index cee9a5361..572f87e35 100644
--- a/application/config/routes.php
+++ b/application/config/routes.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,7 @@
* @since Version 1.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
diff --git a/application/config/smileys.php b/application/config/smileys.php
index 6d329d412..0537fe339 100644
--- a/application/config/smileys.php
+++ b/application/config/smileys.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,7 @@
* @since Version 1.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
diff --git a/application/config/user_agents.php b/application/config/user_agents.php
index d34ff3515..69b91fff5 100644
--- a/application/config/user_agents.php
+++ b/application/config/user_agents.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php
/**
* CodeIgniter
*
@@ -24,6 +24,7 @@
* @since Version 1.0
* @filesource
*/
+defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
diff --git a/user_guide_src/source/general/creating_libraries.rst b/user_guide_src/source/general/creating_libraries.rst
index 4beb600da..a1e1b3e78 100644
--- a/user_guide_src/source/general/creating_libraries.rst
+++ b/user_guide_src/source/general/creating_libraries.rst
@@ -44,7 +44,8 @@ The Class File
Classes should have this basic prototype::
- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+ <?php
+ defined('BASEPATH') OR exit('No direct script access allowed');
class Someclass {