Skip to content
This repository has been archived by the owner on Dec 6, 2019. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed contructors to use __construct() vs old PHP4 style
  • Loading branch information
nabeelio committed Feb 21, 2017
1 parent 4e66194 commit 0278385
Show file tree
Hide file tree
Showing 49 changed files with 532 additions and 558 deletions.
7 changes: 7 additions & 0 deletions .gitignore
@@ -0,0 +1,7 @@
.gitignore
.idea/
Line
Liur
_headers
ed
phpvms.iml
17 changes: 8 additions & 9 deletions core/classes/CodonData.class.php
Expand Up @@ -41,28 +41,27 @@
* The parent class for a module
*/
class CodonData
{
{
public function __construct()
{

}

public function config($setting)
{
return Config::Get($setting);
}

public function log($text, $file='log')
{
Debug::log($text, $file);
}

public function firephp()
{
include_once CORE_PATH.DS.'lib'.DS.'firebug'.DS.'FirePHP.class.php';

$instance = FirePHP::getInstance(true);
$args = func_get_args();
return call_user_func_array(array($instance,'fb'),$args);
return call_user_func_array([$instance, 'fb'], func_get_args());
}
}
}
31 changes: 15 additions & 16 deletions core/codon.config.php
Expand Up @@ -36,7 +36,7 @@
* @license BSD License
* @package codon_core
*/

session_start();

error_reporting(E_ALL ^ E_NOTICE);
Expand All @@ -55,11 +55,10 @@
define('LIB_PATH', SITE_ROOT.DS.'lib');
define('DOCTRINE_MODELS_PATH', CORE_PATH.DS.'models');

$version = phpversion();
if($version[0] != '5')
{
die('You are not running PHP 5+');
}
//$version = phpversion();
//if($version[0] != '5') {
// die('You are not running PHP 5+');
//}

require CLASS_PATH.DS.'autoload.php';
spl_autoload_register('codon_autoload');
Expand All @@ -82,31 +81,31 @@
if(DBASE_NAME != '' && DBASE_SERVER != '' && DBASE_NAME != 'DBASE_NAME')
{
require CLASS_PATH.DS.'ezdb/ezdb.class.php';

DB::$show_errors = Config::Get('DEBUG_MODE');
DB::$throw_exceptions = false;

DB::init(DBASE_TYPE);

DB::set_log_errors(Config::Get('DEBUG_MODE'));
DB::set_error_handler(array('Debug', 'db_error'));

DB::set_caching(false);
DB::$table_prefix = TABLE_PREFIX;
DB::set_cache_dir(CACHE_PATH);
DB::$DB->debug_all = false;

if(Config::Get('DEBUG_MODE') == true)
DB::show_errors();
else
DB::hide_errors();

if(!DB::connect(DBASE_USER, DBASE_PASS, DBASE_NAME, DBASE_SERVER))
{
{
Debug::showCritical(Lang::gs('database.connection.failed').' ('.DB::$errno.': '.DB::$error.')');
die();
}

# Set the charset type to send to mysql
if(Config::Get('DB_CHARSET_NAME') !== '')
{
Expand All @@ -125,5 +124,5 @@

if(function_exists('post_module_load'))
post_module_load();
define('SKINS_PATH', LIB_PATH.DS.'skins'.DS.CURRENT_SKIN);

define('SKINS_PATH', LIB_PATH.DS.'skins'.DS.CURRENT_SKIN);

0 comments on commit 0278385

Please sign in to comment.