From 1ced89908eddf50f53e2c878d76da72d75e0fdbb Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 1 Feb 2019 06:56:29 +0000 Subject: [PATCH] changed many files for php7 compatibility --- codepot/src/codepot/controllers/api.php | 4 ++-- codepot/src/codepot/controllers/code.php | 4 ++-- codepot/src/codepot/controllers/file.php | 4 ++-- codepot/src/codepot/controllers/graph.php | 4 ++-- codepot/src/codepot/controllers/issue.php | 4 ++-- codepot/src/codepot/controllers/main.php | 4 ++-- codepot/src/codepot/controllers/project.php | 4 ++-- codepot/src/codepot/controllers/site.php | 4 ++-- codepot/src/codepot/controllers/user.php | 4 ++-- codepot/src/codepot/controllers/wiki.php | 4 ++-- codepot/src/codepot/libraries/Lang_detect.php | 2 +- codepot/src/codepot/libraries/converter.php | 2 +- codepot/src/codepot/libraries/issuehelper.php | 2 +- codepot/src/codepot/libraries/wikihelper.php | 2 +- codepot/src/codepot/models/codemodel.php | 4 ++-- codepot/src/codepot/models/dbloginmodel.php | 6 +++--- codepot/src/codepot/models/filemodel.php | 4 ++-- codepot/src/codepot/models/gitmodel.php | 4 ++-- codepot/src/codepot/models/issuemodel.php | 4 ++-- codepot/src/codepot/models/ldaploginmodel.php | 6 +++--- codepot/src/codepot/models/loginmodel.php | 6 +++--- codepot/src/codepot/models/logmodel.php | 4 ++-- codepot/src/codepot/models/projectmodel.php | 4 ++-- codepot/src/codepot/models/sitemodel.php | 4 ++-- codepot/src/codepot/models/subversionmodel.php | 4 ++-- codepot/src/codepot/models/usermodel.php | 4 ++-- codepot/src/codepot/models/wikimodel.php | 4 ++-- codepot/src/system/codeigniter/Base4.php | 6 +++--- codepot/src/system/codeigniter/Base5.php | 2 +- codepot/src/system/codeigniter/Common.php | 8 +++++--- codepot/src/system/database/DB.php | 5 +++-- codepot/src/system/database/DB_cache.php | 2 +- codepot/src/system/database/DB_driver.php | 2 +- codepot/src/system/database/DB_forge.php | 2 +- codepot/src/system/database/DB_utility.php | 2 +- .../database/drivers/odbc/odbc_driver.php | 6 +++--- codepot/src/system/libraries/Calendar.php | 2 +- codepot/src/system/libraries/Cart.php | 2 +- codepot/src/system/libraries/Config.php | 2 +- codepot/src/system/libraries/Controller.php | 6 +++--- codepot/src/system/libraries/Email.php | 2 +- codepot/src/system/libraries/Encrypt.php | 2 +- codepot/src/system/libraries/Exceptions.php | 2 +- .../src/system/libraries/Form_validation.php | 2 +- codepot/src/system/libraries/Ftp.php | 2 +- codepot/src/system/libraries/Hooks.php | 2 +- codepot/src/system/libraries/Image_lib.php | 2 +- codepot/src/system/libraries/Input.php | 2 +- codepot/src/system/libraries/Language.php | 2 +- codepot/src/system/libraries/Loader.php | 7 ++++--- codepot/src/system/libraries/Log.php | 2 +- codepot/src/system/libraries/Model.php | 4 ++-- codepot/src/system/libraries/Output.php | 2 +- codepot/src/system/libraries/Pagination.php | 2 +- codepot/src/system/libraries/Profiler.php | 2 +- codepot/src/system/libraries/Router.php | 2 +- codepot/src/system/libraries/Session.php | 2 +- codepot/src/system/libraries/Sha1.php | 2 +- codepot/src/system/libraries/Table.php | 2 +- codepot/src/system/libraries/Trackback.php | 2 +- codepot/src/system/libraries/Typography.php | 2 +- codepot/src/system/libraries/URI.php | 2 +- codepot/src/system/libraries/Unit_test.php | 2 +- codepot/src/system/libraries/Upload.php | 2 +- codepot/src/system/libraries/User_agent.php | 2 +- codepot/src/system/libraries/Validation.php | 2 +- codepot/src/system/libraries/Xmlrpc.php | 18 +++++++++--------- codepot/src/system/libraries/Xmlrpcs.php | 6 +++--- codepot/src/system/libraries/Zip.php | 2 +- codepot/src/system/scaffolding/Scaffolding.php | 4 ++-- 70 files changed, 123 insertions(+), 119 deletions(-) diff --git a/codepot/src/codepot/controllers/api.php b/codepot/src/codepot/controllers/api.php index 4cd0f317..9d3017c1 100644 --- a/codepot/src/codepot/controllers/api.php +++ b/codepot/src/codepot/controllers/api.php @@ -2,9 +2,9 @@ class API extends Controller { - function API() + function __construct () { - parent::Controller(); + parent::__construct (); } function check_access () diff --git a/codepot/src/codepot/controllers/code.php b/codepot/src/codepot/controllers/code.php index 82fa4c59..e2e2f5d4 100644 --- a/codepot/src/codepot/controllers/code.php +++ b/codepot/src/codepot/controllers/code.php @@ -13,9 +13,9 @@ class Code extends Controller var $VIEW_FETCH = 'code_fetch'; var $VIEW_SEARCH = 'code_search'; - function Code () + function __construct () { - parent::Controller (); + parent::__construct (); $this->load->helper ('url'); $this->load->helper ('form'); $this->load->library ('Converter', 'converter'); diff --git a/codepot/src/codepot/controllers/file.php b/codepot/src/codepot/controllers/file.php index 67976c25..7f20ae45 100644 --- a/codepot/src/codepot/controllers/file.php +++ b/codepot/src/codepot/controllers/file.php @@ -6,9 +6,9 @@ class File extends Controller var $VIEW_HOME = 'file_home'; var $VIEW_SHOW = 'file_show'; - function File () + function __construct () { - parent::Controller (); + parent::__construct (); $this->load->helper ('url'); $this->load->helper ('form'); $this->load->library ('Converter', 'converter'); diff --git a/codepot/src/codepot/controllers/graph.php b/codepot/src/codepot/controllers/graph.php index a55e125f..f4c88968 100644 --- a/codepot/src/codepot/controllers/graph.php +++ b/codepot/src/codepot/controllers/graph.php @@ -5,9 +5,9 @@ class Graph extends Controller var $VIEW_ERROR = 'error'; var $VIEW_MAIN = 'graph_main'; - function Graph () + function __construct () { - parent::Controller (); + parent::__construct (); $this->load->helper ('url'); $this->load->helper ('form'); $this->load->library ('Converter', 'converter'); diff --git a/codepot/src/codepot/controllers/issue.php b/codepot/src/codepot/controllers/issue.php index 48b362c0..e7ecd34d 100644 --- a/codepot/src/codepot/controllers/issue.php +++ b/codepot/src/codepot/controllers/issue.php @@ -6,9 +6,9 @@ class Issue extends Controller var $VIEW_HOME = 'issue_home'; var $VIEW_SHOW = 'issue_show'; - function Issue () + function __construct () { - parent::Controller (); + parent::__construct (); $this->load->helper ('url'); $this->load->helper ('form'); diff --git a/codepot/src/codepot/controllers/main.php b/codepot/src/codepot/controllers/main.php index 6eb4981a..f67f9cd0 100644 --- a/codepot/src/codepot/controllers/main.php +++ b/codepot/src/codepot/controllers/main.php @@ -2,9 +2,9 @@ class Main extends Controller { - function Main() + function __construct () { - parent::Controller(); + parent::__construct (); $this->load->helper ('url'); $this->load->helper ('form'); diff --git a/codepot/src/codepot/controllers/project.php b/codepot/src/codepot/controllers/project.php index 639a3963..70cfeeb9 100644 --- a/codepot/src/codepot/controllers/project.php +++ b/codepot/src/codepot/controllers/project.php @@ -10,9 +10,9 @@ class Project extends Controller var $VIEW_LOG = 'log'; var $VIEW_MAP = 'project_map'; - function Project () + function __construct () { - parent::Controller (); + parent::__construct (); $this->load->helper ('url'); $this->load->helper ('form'); diff --git a/codepot/src/codepot/controllers/site.php b/codepot/src/codepot/controllers/site.php index c1e162f9..02a2cb5c 100644 --- a/codepot/src/codepot/controllers/site.php +++ b/codepot/src/codepot/controllers/site.php @@ -10,9 +10,9 @@ class Site extends Controller var $VIEW_CATALOG = 'site_catalog'; var $VIEW_LOG = 'log'; - function Site () + function __construct () { - parent::Controller (); + parent::__construct (); $this->load->helper ('url'); $this->load->helper ('form'); diff --git a/codepot/src/codepot/controllers/user.php b/codepot/src/codepot/controllers/user.php index 99191380..b10ec712 100644 --- a/codepot/src/codepot/controllers/user.php +++ b/codepot/src/codepot/controllers/user.php @@ -8,9 +8,9 @@ class User extends Controller var $VIEW_ISSUE = 'user_issue'; var $VIEW_SETTINGS = 'user_settings'; - function User () + function __construct () { - parent::Controller (); + parent::__construct (); $this->load->helper ('url'); $this->load->helper ('form'); diff --git a/codepot/src/codepot/controllers/wiki.php b/codepot/src/codepot/controllers/wiki.php index aa5a7cfb..76c87150 100644 --- a/codepot/src/codepot/controllers/wiki.php +++ b/codepot/src/codepot/controllers/wiki.php @@ -9,9 +9,9 @@ class Wiki extends Controller var $VIEW_EDITX = 'wiki_editx'; var $VIEW_DELETE = 'wiki_delete'; - function Wiki () + function __construct () { - parent::Controller (); + parent::__construct (); $this->load->helper ('url'); $this->load->helper ('form'); diff --git a/codepot/src/codepot/libraries/Lang_detect.php b/codepot/src/codepot/libraries/Lang_detect.php index 92fcaeb0..1aa0f7ff 100644 --- a/codepot/src/codepot/libraries/Lang_detect.php +++ b/codepot/src/codepot/libraries/Lang_detect.php @@ -72,7 +72,7 @@ class Lang_detect /** * Constructor */ - function Lang_detect() + function __construct() { $this->obj =& get_instance(); // get list of supported languages diff --git a/codepot/src/codepot/libraries/converter.php b/codepot/src/codepot/libraries/converter.php index 308cacb1..8b850164 100644 --- a/codepot/src/codepot/libraries/converter.php +++ b/codepot/src/codepot/libraries/converter.php @@ -2,7 +2,7 @@ class Converter { - function Converter () + function __construct () { } diff --git a/codepot/src/codepot/libraries/issuehelper.php b/codepot/src/codepot/libraries/issuehelper.php index 25dc062f..580c44f2 100644 --- a/codepot/src/codepot/libraries/issuehelper.php +++ b/codepot/src/codepot/libraries/issuehelper.php @@ -31,7 +31,7 @@ class IssueHelper var $PRIORITY_LOW = 'low'; var $PRIORITY_OTHER = 'other'; - function IssueHelper () + function __construct () { } diff --git a/codepot/src/codepot/libraries/wikihelper.php b/codepot/src/codepot/libraries/wikihelper.php index a4fc9116..703f60bd 100644 --- a/codepot/src/codepot/libraries/wikihelper.php +++ b/codepot/src/codepot/libraries/wikihelper.php @@ -10,7 +10,7 @@ class WikiHelper '##F' => '__FILE__' ); - function WikiHelper () + function __construct () { } diff --git a/codepot/src/codepot/models/codemodel.php b/codepot/src/codepot/models/codemodel.php index e0111acd..ccdcdeb1 100644 --- a/codepot/src/codepot/models/codemodel.php +++ b/codepot/src/codepot/models/codemodel.php @@ -9,9 +9,9 @@ class CodeModel extends Model return $this->errmsg; } - function CodeModel () + function __construct () { - parent::Model (); + parent::__construct (); $this->load->database (); } diff --git a/codepot/src/codepot/models/dbloginmodel.php b/codepot/src/codepot/models/dbloginmodel.php index d39361c1..6e8a9f20 100644 --- a/codepot/src/codepot/models/dbloginmodel.php +++ b/codepot/src/codepot/models/dbloginmodel.php @@ -3,9 +3,9 @@ require_once 'loginmodel.php'; class DbLoginModel extends LoginModel { - function DbLoginModel () + function __construct () { - parent::LoginModel (); + parent::__construct (); $this->load->database (); } @@ -77,7 +77,7 @@ class DbLoginModel extends LoginModel } // TODO: implement $insider like LdapLoginModel - return parent::authenticate ($userid, $user->passwd, $user->email); + return parent::__authenticate ($userid, $user->passwd, $user->email); } function changePassword ($userid, $passwd) diff --git a/codepot/src/codepot/models/filemodel.php b/codepot/src/codepot/models/filemodel.php index 028c5e92..9ffd9461 100644 --- a/codepot/src/codepot/models/filemodel.php +++ b/codepot/src/codepot/models/filemodel.php @@ -14,9 +14,9 @@ class FileModel extends Model return $this->errmsg; } - function FileModel () + function __construct () { - parent::Model (); + parent::__construct (); $this->load->database (); } diff --git a/codepot/src/codepot/models/gitmodel.php b/codepot/src/codepot/models/gitmodel.php index 6a76994a..c7432358 100644 --- a/codepot/src/codepot/models/gitmodel.php +++ b/codepot/src/codepot/models/gitmodel.php @@ -5,9 +5,9 @@ $CI->load->model('CodeRepoModel'); class GitModel extends CodeRepoModel { - function GitModel () + function __construct () { - parent::CodeRepoModel (); + parent::__construct (); } private function _canonical_path($path) diff --git a/codepot/src/codepot/models/issuemodel.php b/codepot/src/codepot/models/issuemodel.php index 22587040..4a0302a2 100644 --- a/codepot/src/codepot/models/issuemodel.php +++ b/codepot/src/codepot/models/issuemodel.php @@ -14,9 +14,9 @@ class IssueModel extends Model return $this->errmsg; } - function IssueModel () + function __construct () { - parent::Model (); + parent::__construct (); $this->load->database (); } diff --git a/codepot/src/codepot/models/ldaploginmodel.php b/codepot/src/codepot/models/ldaploginmodel.php index ad99f6b1..d053fa2c 100644 --- a/codepot/src/codepot/models/ldaploginmodel.php +++ b/codepot/src/codepot/models/ldaploginmodel.php @@ -3,9 +3,9 @@ require_once 'loginmodel.php'; class LdapLoginModel extends LoginModel { - function LdapLoginModel () + function __construct () { - parent::LoginModel (); + parent::__construct (); } function authenticate ($userid, $password) @@ -171,7 +171,7 @@ class LdapLoginModel extends LoginModel //@ldap_unbind ($ldap); @ldap_close ($ldap); - return parent::authenticate ($userid, $password, $email, $insider); + return parent::__authenticate ($userid, $password, $email, $insider); } function queryUserInfo ($userid) diff --git a/codepot/src/codepot/models/loginmodel.php b/codepot/src/codepot/models/loginmodel.php index f8c2cee5..e59d14f3 100644 --- a/codepot/src/codepot/models/loginmodel.php +++ b/codepot/src/codepot/models/loginmodel.php @@ -9,9 +9,9 @@ class LoginModel extends Model { var $error_message = ''; - function LoginModel () + function __construct () { - parent::Model (); + parent::__construct (); $this->load->library ('session'); } @@ -66,7 +66,7 @@ class LoginModel extends Model ); } - function authenticate ($userid, $password, $email = '', $insider = NULL) + function __authenticate ($userid, $password, $email = '', $insider = NULL) { //$server = $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT']; $server = $_SERVER['HTTP_HOST']; diff --git a/codepot/src/codepot/models/logmodel.php b/codepot/src/codepot/models/logmodel.php index cc57dfff..ec71dcd6 100644 --- a/codepot/src/codepot/models/logmodel.php +++ b/codepot/src/codepot/models/logmodel.php @@ -2,9 +2,9 @@ class LogModel extends Model { - function LogModel () + function __construct () { - parent::Model (); + parent::__construct (); $this->load->database (); } diff --git a/codepot/src/codepot/models/projectmodel.php b/codepot/src/codepot/models/projectmodel.php index 14ed2a5c..8a76e7ad 100644 --- a/codepot/src/codepot/models/projectmodel.php +++ b/codepot/src/codepot/models/projectmodel.php @@ -5,9 +5,9 @@ $CI->load->model('SubversionModel'); class ProjectModel extends Model { - function ProjectModel () + function __construct () { - parent::Model (); + parent::__construct (); $this->load->database (); } diff --git a/codepot/src/codepot/models/sitemodel.php b/codepot/src/codepot/models/sitemodel.php index e8ac88d8..c709dd6d 100644 --- a/codepot/src/codepot/models/sitemodel.php +++ b/codepot/src/codepot/models/sitemodel.php @@ -2,9 +2,9 @@ class SiteModel extends Model { - function SiteModel () + function __construct () { - parent::Model (); + parent::__construct (); $this->load->database (); } diff --git a/codepot/src/codepot/models/subversionmodel.php b/codepot/src/codepot/models/subversionmodel.php index 3ed4d975..d7883411 100644 --- a/codepot/src/codepot/models/subversionmodel.php +++ b/codepot/src/codepot/models/subversionmodel.php @@ -5,9 +5,9 @@ $CI->load->model('CodeRepoModel'); class SubversionModel extends CodeRepoModel { - function SubversionModel () + function __construct () { - parent::CodeRepoModel (); + parent::__construct (); } private function _canonical_path($path) diff --git a/codepot/src/codepot/models/usermodel.php b/codepot/src/codepot/models/usermodel.php index 043e4c7f..27b26314 100644 --- a/codepot/src/codepot/models/usermodel.php +++ b/codepot/src/codepot/models/usermodel.php @@ -2,9 +2,9 @@ class UserModel extends Model { - function UserModel () + function __construct () { - parent::Model (); + parent::__construct (); $this->load->database (); } diff --git a/codepot/src/codepot/models/wikimodel.php b/codepot/src/codepot/models/wikimodel.php index 013b7cc1..f6fd4ce4 100644 --- a/codepot/src/codepot/models/wikimodel.php +++ b/codepot/src/codepot/models/wikimodel.php @@ -14,9 +14,9 @@ class WikiModel extends Model return $this->errmsg; } - function WikiModel () + function __construct () { - parent::Model (); + parent::__construct (); $this->load->database (); } diff --git a/codepot/src/system/codeigniter/Base4.php b/codepot/src/system/codeigniter/Base4.php index 3561c256..aed24f36 100644 --- a/codepot/src/system/codeigniter/Base4.php +++ b/codepot/src/system/codeigniter/Base4.php @@ -40,10 +40,10 @@ */ class CI_Base extends CI_Loader { - function CI_Base() + function __construct() { // This allows syntax like $this->load->foo() to work - parent::CI_Loader(); + parent::__construct(); $this->load =& $this; // This allows resources used within controller constructors to work @@ -66,4 +66,4 @@ function &get_instance() /* End of file Base4.php */ -/* Location: ./system/codeigniter/Base4.php */ \ No newline at end of file +/* Location: ./system/codeigniter/Base4.php */ diff --git a/codepot/src/system/codeigniter/Base5.php b/codepot/src/system/codeigniter/Base5.php index 5d944ae5..9793353b 100644 --- a/codepot/src/system/codeigniter/Base5.php +++ b/codepot/src/system/codeigniter/Base5.php @@ -34,7 +34,7 @@ class CI_Base { private static $instance; - public function CI_Base() + public function __construct() { self::$instance =& $this; } diff --git a/codepot/src/system/codeigniter/Common.php b/codepot/src/system/codeigniter/Common.php index 3b84ffcc..60f3320e 100644 --- a/codepot/src/system/codeigniter/Common.php +++ b/codepot/src/system/codeigniter/Common.php @@ -139,13 +139,15 @@ function &load_class($class, $instantiate = TRUE) { $name = config_item('subclass_prefix').$class; - $objects[$class] =& instantiate_class(new $name()); + $obj = new $name(); + $objects[$class] =& instantiate_class(obj); return $objects[$class]; } $name = ($class != 'Controller') ? 'CI_'.$class : $class; - $objects[$class] =& instantiate_class(new $name()); + $obj = new $name(); + $objects[$class] =& instantiate_class($obj); return $objects[$class]; } @@ -418,4 +420,4 @@ function _exception_handler($severity, $message, $filepath, $line) /* End of file Common.php */ -/* Location: ./system/codeigniter/Common.php */ \ No newline at end of file +/* Location: ./system/codeigniter/Common.php */ diff --git a/codepot/src/system/database/DB.php b/codepot/src/system/database/DB.php index f174687c..517a863a 100644 --- a/codepot/src/system/database/DB.php +++ b/codepot/src/system/database/DB.php @@ -130,7 +130,8 @@ function &DB($params = '', $active_record_override = FALSE) // Instantiate the DB adapter $driver = 'CI_DB_'.$params['dbdriver'].'_driver'; - $DB =& instantiate_class(new $driver($params)); + $obj = new $driver($params); + $DB =& instantiate_class($obj); if ($DB->autoinit == TRUE) { @@ -143,4 +144,4 @@ function &DB($params = '', $active_record_override = FALSE) /* End of file DB.php */ -/* Location: ./system/database/DB.php */ \ No newline at end of file +/* Location: ./system/database/DB.php */ diff --git a/codepot/src/system/database/DB_cache.php b/codepot/src/system/database/DB_cache.php index d3968b31..ce287df7 100644 --- a/codepot/src/system/database/DB_cache.php +++ b/codepot/src/system/database/DB_cache.php @@ -33,7 +33,7 @@ class CI_DB_Cache { * Grabs the CI super object instance so we can access it. * */ - function CI_DB_Cache(&$db) + function __construct(&$db) { // Assign the main CI object to $this->CI // and load the file helper since we use it a lot diff --git a/codepot/src/system/database/DB_driver.php b/codepot/src/system/database/DB_driver.php index 2823ea8a..71678932 100644 --- a/codepot/src/system/database/DB_driver.php +++ b/codepot/src/system/database/DB_driver.php @@ -78,7 +78,7 @@ class CI_DB_driver { * * @param array */ - function CI_DB_driver($params) + function __construct($params) { if (is_array($params)) { diff --git a/codepot/src/system/database/DB_forge.php b/codepot/src/system/database/DB_forge.php index c5931db2..d201c459 100644 --- a/codepot/src/system/database/DB_forge.php +++ b/codepot/src/system/database/DB_forge.php @@ -35,7 +35,7 @@ class CI_DB_forge { * Grabs the CI super object instance so we can access it. * */ - function CI_DB_forge() + function __construct() { // Assign the main database object to $this->db $CI =& get_instance(); diff --git a/codepot/src/system/database/DB_utility.php b/codepot/src/system/database/DB_utility.php index 94e7a0bd..a260f11c 100644 --- a/codepot/src/system/database/DB_utility.php +++ b/codepot/src/system/database/DB_utility.php @@ -33,7 +33,7 @@ class CI_DB_utility extends CI_DB_forge { * Grabs the CI super object instance so we can access it. * */ - function CI_DB_utility() + function __construct() { // Assign the main database object to $this->db $CI =& get_instance(); diff --git a/codepot/src/system/database/drivers/odbc/odbc_driver.php b/codepot/src/system/database/drivers/odbc/odbc_driver.php index 6cb3080d..bc4abc81 100644 --- a/codepot/src/system/database/drivers/odbc/odbc_driver.php +++ b/codepot/src/system/database/drivers/odbc/odbc_driver.php @@ -48,9 +48,9 @@ class CI_DB_odbc_driver extends CI_DB { var $_random_keyword; - function CI_DB_odbc_driver($params) + function __construct($params) { - parent::CI_DB($params); + parent::__construct($params); $this->_random_keyword = ' RND('.time().')'; // database specific random keyword } @@ -636,4 +636,4 @@ class CI_DB_odbc_driver extends CI_DB { /* End of file odbc_driver.php */ -/* Location: ./system/database/drivers/odbc/odbc_driver.php */ \ No newline at end of file +/* Location: ./system/database/drivers/odbc/odbc_driver.php */ diff --git a/codepot/src/system/libraries/Calendar.php b/codepot/src/system/libraries/Calendar.php index 275bf245..dbbc84e5 100644 --- a/codepot/src/system/libraries/Calendar.php +++ b/codepot/src/system/libraries/Calendar.php @@ -45,7 +45,7 @@ class CI_Calendar { * * @access public */ - function CI_Calendar($config = array()) + function __construct($config = array()) { $this->CI =& get_instance(); diff --git a/codepot/src/system/libraries/Cart.php b/codepot/src/system/libraries/Cart.php index 643d2eca..f3819c31 100644 --- a/codepot/src/system/libraries/Cart.php +++ b/codepot/src/system/libraries/Cart.php @@ -40,7 +40,7 @@ class CI_Cart { * * The constructor loads the Session class, used to store the shopping cart contents. */ - function CI_Cart($params = array()) + function __construct($params = array()) { // Set the super object to a local variable for use later $this->CI =& get_instance(); diff --git a/codepot/src/system/libraries/Config.php b/codepot/src/system/libraries/Config.php index 76012077..babc44bd 100644 --- a/codepot/src/system/libraries/Config.php +++ b/codepot/src/system/libraries/Config.php @@ -42,7 +42,7 @@ class CI_Config { * @param boolean true if errors should just return false, false if an error message should be displayed * @return boolean if the file was successfully loaded or not */ - function CI_Config() + function __construct() { $this->config =& get_config(); log_message('debug', "Config Class Initialized"); diff --git a/codepot/src/system/libraries/Controller.php b/codepot/src/system/libraries/Controller.php index c5637c95..5388f131 100644 --- a/codepot/src/system/libraries/Controller.php +++ b/codepot/src/system/libraries/Controller.php @@ -37,9 +37,9 @@ class Controller extends CI_Base { * * Calls the initialize() function */ - function Controller() + function __construct() { - parent::CI_Base(); + parent::__construct(); $this->_ci_initialize(); log_message('debug', "Controller Class Initialized"); } @@ -124,4 +124,4 @@ class Controller extends CI_Base { // END _Controller class /* End of file Controller.php */ -/* Location: ./system/libraries/Controller.php */ \ No newline at end of file +/* Location: ./system/libraries/Controller.php */ diff --git a/codepot/src/system/libraries/Email.php b/codepot/src/system/libraries/Email.php index d0f2ea9a..61bb85ea 100644 --- a/codepot/src/system/libraries/Email.php +++ b/codepot/src/system/libraries/Email.php @@ -82,7 +82,7 @@ class CI_Email { * * The constructor can be passed an array of config values */ - function CI_Email($config = array()) + function __construct($config = array()) { if (count($config) > 0) { diff --git a/codepot/src/system/libraries/Encrypt.php b/codepot/src/system/libraries/Encrypt.php index c893fbf9..8c632244 100644 --- a/codepot/src/system/libraries/Encrypt.php +++ b/codepot/src/system/libraries/Encrypt.php @@ -41,7 +41,7 @@ class CI_Encrypt { * Simply determines whether the mcrypt library exists. * */ - function CI_Encrypt() + function __construct() { $this->CI =& get_instance(); $this->_mcrypt_exists = ( ! function_exists('mcrypt_encrypt')) ? FALSE : TRUE; diff --git a/codepot/src/system/libraries/Exceptions.php b/codepot/src/system/libraries/Exceptions.php index bd567ccd..4b403e07 100644 --- a/codepot/src/system/libraries/Exceptions.php +++ b/codepot/src/system/libraries/Exceptions.php @@ -52,7 +52,7 @@ class CI_Exceptions { * Constructor * */ - function CI_Exceptions() + function __construct() { $this->ob_level = ob_get_level(); // Note: Do not log messages from this constructor. diff --git a/codepot/src/system/libraries/Form_validation.php b/codepot/src/system/libraries/Form_validation.php index 640bf918..a98d0e3e 100644 --- a/codepot/src/system/libraries/Form_validation.php +++ b/codepot/src/system/libraries/Form_validation.php @@ -41,7 +41,7 @@ class CI_Form_validation { * Constructor * */ - function CI_Form_validation($rules = array()) + function __construct($rules = array()) { $this->CI =& get_instance(); diff --git a/codepot/src/system/libraries/Ftp.php b/codepot/src/system/libraries/Ftp.php index 16ad9ad4..75c23ba2 100644 --- a/codepot/src/system/libraries/Ftp.php +++ b/codepot/src/system/libraries/Ftp.php @@ -40,7 +40,7 @@ class CI_FTP { * * The constructor can be passed an array of config values */ - function CI_FTP($config = array()) + function __construct($config = array()) { if (count($config) > 0) { diff --git a/codepot/src/system/libraries/Hooks.php b/codepot/src/system/libraries/Hooks.php index 6d736c3f..423cb306 100644 --- a/codepot/src/system/libraries/Hooks.php +++ b/codepot/src/system/libraries/Hooks.php @@ -37,7 +37,7 @@ class CI_Hooks { * Constructor * */ - function CI_Hooks() + function __construct() { $this->_initialize(); log_message('debug', "Hooks Class Initialized"); diff --git a/codepot/src/system/libraries/Image_lib.php b/codepot/src/system/libraries/Image_lib.php index 0b29c1fb..0cc90db0 100644 --- a/codepot/src/system/libraries/Image_lib.php +++ b/codepot/src/system/libraries/Image_lib.php @@ -83,7 +83,7 @@ class CI_Image_lib { * @param string * @return void */ - function CI_Image_lib($props = array()) + function __construct($props = array()) { if (count($props) > 0) { diff --git a/codepot/src/system/libraries/Input.php b/codepot/src/system/libraries/Input.php index 39681519..b3bf7eaa 100644 --- a/codepot/src/system/libraries/Input.php +++ b/codepot/src/system/libraries/Input.php @@ -61,7 +61,7 @@ class CI_Input { * * @access public */ - function CI_Input() + function __construct() { log_message('debug', "Input Class Initialized"); diff --git a/codepot/src/system/libraries/Language.php b/codepot/src/system/libraries/Language.php index 515d04a4..9ce76647 100644 --- a/codepot/src/system/libraries/Language.php +++ b/codepot/src/system/libraries/Language.php @@ -34,7 +34,7 @@ class CI_Language { * * @access public */ - function CI_Language() + function __construct() { log_message('debug', "Language Class Initialized"); } diff --git a/codepot/src/system/libraries/Loader.php b/codepot/src/system/libraries/Loader.php index 4a03312c..8c949780 100644 --- a/codepot/src/system/libraries/Loader.php +++ b/codepot/src/system/libraries/Loader.php @@ -49,7 +49,7 @@ class CI_Loader { * * @access public */ - function CI_Loader() + function __construct() { $this->_ci_is_php5 = (floor(phpversion()) >= 5) ? TRUE : FALSE; $this->_ci_view_path = APPPATH.'views/'; @@ -252,7 +252,8 @@ class CI_Loader { require_once(BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/'.$CI->db->dbdriver.'_utility'.EXT); $class = 'CI_DB_'.$CI->db->dbdriver.'_utility'; - $CI->dbutil =& instantiate_class(new $class()); + $obj = new $class(); + $CI->dbutil =& instantiate_class($obj); $CI->load->_ci_assign_to_models(); } @@ -1082,4 +1083,4 @@ class CI_Loader { } /* End of file Loader.php */ -/* Location: ./system/libraries/Loader.php */ \ No newline at end of file +/* Location: ./system/libraries/Loader.php */ diff --git a/codepot/src/system/libraries/Log.php b/codepot/src/system/libraries/Log.php index 4e6b3bc3..e3461819 100644 --- a/codepot/src/system/libraries/Log.php +++ b/codepot/src/system/libraries/Log.php @@ -37,7 +37,7 @@ class CI_Log { * * @access public */ - function CI_Log() + function __construct() { $config =& get_config(); diff --git a/codepot/src/system/libraries/Model.php b/codepot/src/system/libraries/Model.php index e9c2d24d..e19b0451 100644 --- a/codepot/src/system/libraries/Model.php +++ b/codepot/src/system/libraries/Model.php @@ -33,7 +33,7 @@ class Model { * * @access public */ - function Model() + function __construct() { // If the magic __get() or __set() methods are used in a Model references can't be used. $this->_assign_libraries( (method_exists($this, '__get') OR method_exists($this, '__set')) ? FALSE : TRUE ); @@ -80,4 +80,4 @@ class Model { // END Model Class /* End of file Model.php */ -/* Location: ./system/libraries/Model.php */ \ No newline at end of file +/* Location: ./system/libraries/Model.php */ diff --git a/codepot/src/system/libraries/Output.php b/codepot/src/system/libraries/Output.php index f320b414..5384c960 100644 --- a/codepot/src/system/libraries/Output.php +++ b/codepot/src/system/libraries/Output.php @@ -34,7 +34,7 @@ class CI_Output { var $enable_profiler = FALSE; - function CI_Output() + function __construct() { log_message('debug', "Output Class Initialized"); } diff --git a/codepot/src/system/libraries/Pagination.php b/codepot/src/system/libraries/Pagination.php index d6321f41..9f348ac7 100644 --- a/codepot/src/system/libraries/Pagination.php +++ b/codepot/src/system/libraries/Pagination.php @@ -59,7 +59,7 @@ class CI_Pagination { * @access public * @param array initialization parameters */ - function CI_Pagination($params = array()) + function __construct($params = array()) { if (count($params) > 0) { diff --git a/codepot/src/system/libraries/Profiler.php b/codepot/src/system/libraries/Profiler.php index 84f7871b..8f4ceb89 100644 --- a/codepot/src/system/libraries/Profiler.php +++ b/codepot/src/system/libraries/Profiler.php @@ -34,7 +34,7 @@ class CI_Profiler { var $CI; - function CI_Profiler() + function __construct() { $this->CI =& get_instance(); $this->CI->load->language('profiler'); diff --git a/codepot/src/system/libraries/Router.php b/codepot/src/system/libraries/Router.php index 7dbad037..9d68b457 100644 --- a/codepot/src/system/libraries/Router.php +++ b/codepot/src/system/libraries/Router.php @@ -43,7 +43,7 @@ class CI_Router { * * Runs the route mapping function. */ - function CI_Router() + function __construct() { $this->config =& load_class('Config'); $this->uri =& load_class('URI'); diff --git a/codepot/src/system/libraries/Session.php b/codepot/src/system/libraries/Session.php index bd942681..e31e78ed 100644 --- a/codepot/src/system/libraries/Session.php +++ b/codepot/src/system/libraries/Session.php @@ -51,7 +51,7 @@ class CI_Session { * The constructor runs the session routines automatically * whenever the class is instantiated. */ - function CI_Session($params = array()) + function __construct($params = array()) { log_message('debug', "Session Class Initialized"); diff --git a/codepot/src/system/libraries/Sha1.php b/codepot/src/system/libraries/Sha1.php index f9611a8a..27a144b4 100644 --- a/codepot/src/system/libraries/Sha1.php +++ b/codepot/src/system/libraries/Sha1.php @@ -44,7 +44,7 @@ */ class CI_SHA { - function CI_SHA() + function __construct() { log_message('debug', "SHA1 Class Initialized"); } diff --git a/codepot/src/system/libraries/Table.php b/codepot/src/system/libraries/Table.php index a990d406..31311802 100644 --- a/codepot/src/system/libraries/Table.php +++ b/codepot/src/system/libraries/Table.php @@ -37,7 +37,7 @@ class CI_Table { var $empty_cells = ""; - function CI_Table() + function __construct() { log_message('debug', "Table Class Initialized"); } diff --git a/codepot/src/system/libraries/Trackback.php b/codepot/src/system/libraries/Trackback.php index 9b1737c5..d4c0a060 100644 --- a/codepot/src/system/libraries/Trackback.php +++ b/codepot/src/system/libraries/Trackback.php @@ -40,7 +40,7 @@ class CI_Trackback { * * @access public */ - function CI_Trackback() + function __construct() { log_message('debug', "Trackback Class Initialized"); } diff --git a/codepot/src/system/libraries/Typography.php b/codepot/src/system/libraries/Typography.php index 0f0a8b7a..9bc72ebb 100644 --- a/codepot/src/system/libraries/Typography.php +++ b/codepot/src/system/libraries/Typography.php @@ -48,7 +48,7 @@ class CI_Typography { * Nothing to do here... * */ - function CI_Typography() + function __construct() { } diff --git a/codepot/src/system/libraries/URI.php b/codepot/src/system/libraries/URI.php index 23efb38c..37a37347 100644 --- a/codepot/src/system/libraries/URI.php +++ b/codepot/src/system/libraries/URI.php @@ -42,7 +42,7 @@ class CI_URI { * * @access public */ - function CI_URI() + function __construct() { $this->config =& load_class('Config'); log_message('debug', "URI Class Initialized"); diff --git a/codepot/src/system/libraries/Unit_test.php b/codepot/src/system/libraries/Unit_test.php index 29aeaae9..61a5b457 100644 --- a/codepot/src/system/libraries/Unit_test.php +++ b/codepot/src/system/libraries/Unit_test.php @@ -34,7 +34,7 @@ class CI_Unit_test { var $_template = NULL; var $_template_rows = NULL; - function CI_Unit_test() + function __construct() { log_message('debug', "Unit Testing Class Initialized"); } diff --git a/codepot/src/system/libraries/Upload.php b/codepot/src/system/libraries/Upload.php index 1a9aab22..a3b3ce36 100644 --- a/codepot/src/system/libraries/Upload.php +++ b/codepot/src/system/libraries/Upload.php @@ -58,7 +58,7 @@ class CI_Upload { * * @access public */ - function CI_Upload($props = array()) + function __construct($props = array()) { if (count($props) > 0) { diff --git a/codepot/src/system/libraries/User_agent.php b/codepot/src/system/libraries/User_agent.php index a7c7a760..748890f0 100644 --- a/codepot/src/system/libraries/User_agent.php +++ b/codepot/src/system/libraries/User_agent.php @@ -56,7 +56,7 @@ class CI_User_agent { * @access public * @return void */ - function CI_User_agent() + function __construct() { if (isset($_SERVER['HTTP_USER_AGENT'])) { diff --git a/codepot/src/system/libraries/Validation.php b/codepot/src/system/libraries/Validation.php index a42b7760..36314cee 100644 --- a/codepot/src/system/libraries/Validation.php +++ b/codepot/src/system/libraries/Validation.php @@ -43,7 +43,7 @@ class CI_Validation { * Constructor * */ - function CI_Validation() + function __construct() { $this->CI =& get_instance(); diff --git a/codepot/src/system/libraries/Xmlrpc.php b/codepot/src/system/libraries/Xmlrpc.php index fe5562fe..df3e2a65 100644 --- a/codepot/src/system/libraries/Xmlrpc.php +++ b/codepot/src/system/libraries/Xmlrpc.php @@ -68,7 +68,7 @@ class CI_Xmlrpc { // VALUES THAT MULTIPLE CLASSES NEED //------------------------------------- - function CI_Xmlrpc ($config = array()) + function __construct($config = array()) { $this->xmlrpcName = $this->xmlrpcName; $this->xmlrpc_backslash = chr(92).chr(92); @@ -359,9 +359,9 @@ class XML_RPC_Client extends CI_Xmlrpc var $timeout = 5; var $no_multicall = false; - function XML_RPC_Client($path, $server, $port=80) + function __construct($path, $server, $port=80) { - parent::CI_Xmlrpc(); + parent::__construct(); $this->port = $port; $this->server = $server; @@ -434,7 +434,7 @@ class XML_RPC_Response var $errstr = ''; var $headers = array(); - function XML_RPC_Response($val, $code = 0, $fstr = '') + function __construct($val, $code = 0, $fstr = '') { if ($code != 0) { @@ -614,9 +614,9 @@ class XML_RPC_Message extends CI_Xmlrpc var $params = array(); var $xh = array(); - function XML_RPC_Message($method, $pars=0) + function __construct($method, $pars=0) { - parent::CI_Xmlrpc(); + parent::__construct(); $this->method_name = $method; if (is_array($pars) && count($pars) > 0) @@ -1209,9 +1209,9 @@ class XML_RPC_Values extends CI_Xmlrpc var $me = array(); var $mytype = 0; - function XML_RPC_Values($val=-1, $type='') + function __construct($val=-1, $type='') { - parent::CI_Xmlrpc(); + parent::__construct(); if ($val != -1 OR $type != '') { @@ -1418,4 +1418,4 @@ class XML_RPC_Values extends CI_Xmlrpc // END XML_RPC_Values Class /* End of file Xmlrpc.php */ -/* Location: ./system/libraries/Xmlrpc.php */ \ No newline at end of file +/* Location: ./system/libraries/Xmlrpc.php */ diff --git a/codepot/src/system/libraries/Xmlrpcs.php b/codepot/src/system/libraries/Xmlrpcs.php index 429ab847..06ea6259 100644 --- a/codepot/src/system/libraries/Xmlrpcs.php +++ b/codepot/src/system/libraries/Xmlrpcs.php @@ -48,9 +48,9 @@ class CI_Xmlrpcs extends CI_Xmlrpc // Constructor, more or less //------------------------------------- - function CI_Xmlrpcs($config=array()) + function __construct($config=array()) { - parent::CI_Xmlrpc(); + parent::__construct (); $this->set_system_methods(); if (isset($config['functions']) && is_array($config['functions'])) @@ -533,4 +533,4 @@ class CI_Xmlrpcs extends CI_Xmlrpc /* End of file Xmlrpcs.php */ -/* Location: ./system/libraries/Xmlrpcs.php */ \ No newline at end of file +/* Location: ./system/libraries/Xmlrpcs.php */ diff --git a/codepot/src/system/libraries/Zip.php b/codepot/src/system/libraries/Zip.php index af50ca1c..47bf2c38 100644 --- a/codepot/src/system/libraries/Zip.php +++ b/codepot/src/system/libraries/Zip.php @@ -38,7 +38,7 @@ class CI_Zip { var $file_num = 0; var $offset = 0; - function CI_Zip() + function __construct() { log_message('debug', "Zip Compression Class Initialized"); } diff --git a/codepot/src/system/scaffolding/Scaffolding.php b/codepot/src/system/scaffolding/Scaffolding.php index d110626b..cc379c7b 100644 --- a/codepot/src/system/scaffolding/Scaffolding.php +++ b/codepot/src/system/scaffolding/Scaffolding.php @@ -32,7 +32,7 @@ class Scaffolding { var $base_url = ''; var $lang = array(); - function Scaffolding($db_table) + function __construct($db_table) { $this->CI =& get_instance(); @@ -288,4 +288,4 @@ class Scaffolding { } /* End of file Scaffolding.php */ -/* Location: ./system/scaffolding/Scaffolding.php */ \ No newline at end of file +/* Location: ./system/scaffolding/Scaffolding.php */