From ef362ed465f1632d59344b61230110b9c7eb6fd2 Mon Sep 17 00:00:00 2001 From: Diftraku Date: Thu, 25 Apr 2013 23:09:48 +0300 Subject: [PATCH] Disable overzealous autoloading --- includes/class-mysql.php | 2 +- includes/functions.php | 8 ++++---- includes/geo/geoip.inc | 2 +- includes/pomo/entry.php | 2 +- includes/pomo/mo.php | 2 +- includes/pomo/po.php | 2 +- includes/pomo/streams.php | 10 +++++----- includes/pomo/translations.php | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/includes/class-mysql.php b/includes/class-mysql.php index 3f04e7c..772d5be 100644 --- a/includes/class-mysql.php +++ b/includes/class-mysql.php @@ -619,7 +619,7 @@ function get_set($parms) */ if ( ! function_exists ('mysql_connect') ) die('Fatal Error: ezSQL_mysql requires mySQL Lib to be compiled and or linked in to the PHP engine'); -if ( ! class_exists ('ezSQLcore') ) die('Fatal Error: ezSQL_mysql requires ezSQLcore (ez_sql_core.php) to be included/loaded before it can be used'); +if ( ! class_exists ('ezSQLcore', false) ) die('Fatal Error: ezSQL_mysql requires ezSQLcore (ez_sql_core.php) to be included/loaded before it can be used'); class ezSQL_mysql extends ezSQLcore { diff --git a/includes/functions.php b/includes/functions.php index 6538250..be6b19a 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -405,11 +405,11 @@ function yourls_db_connect() { or !defined( 'YOURLS_DB_PASS' ) or !defined( 'YOURLS_DB_NAME' ) or !defined( 'YOURLS_DB_HOST' ) - or !class_exists( 'ezSQL_mysql' ) + or !class_exists( 'ezSQL_mysql', false ) ) yourls_die ( yourls__( 'DB config missing, or could not find DB class' ), yourls__( 'Fatal error' ), 503 ); // Are we standalone or in the WordPress environment? - if ( class_exists( 'wpdb' ) ) { + if ( class_exists( 'wpdb', false ) ) { $ydb = new wpdb( YOURLS_DB_USER, YOURLS_DB_PASS, YOURLS_DB_NAME, YOURLS_DB_HOST ); } else { $ydb = new ezSQL_mysql( YOURLS_DB_USER, YOURLS_DB_PASS, YOURLS_DB_NAME, YOURLS_DB_HOST ); @@ -873,11 +873,11 @@ function yourls_geo_countrycode_to_countryname( $code ) { return $country; // Load the Geo class if not already done - if( !class_exists( 'GeoIP' ) ) { + if( !class_exists( 'GeoIP', false ) ) { $temp = yourls_geo_ip_to_countrycode( '127.0.0.1' ); } - if( class_exists( 'GeoIP' ) ) { + if( class_exists( 'GeoIP', false ) ) { $geo = new GeoIP; $id = $geo->GEOIP_COUNTRY_CODE_TO_NUMBER[ $code ]; $long = $geo->GEOIP_COUNTRY_NAMES[ $id ]; diff --git a/includes/geo/geoip.inc b/includes/geo/geoip.inc index 22664f7..e4b9b47 100644 --- a/includes/geo/geoip.inc +++ b/includes/geo/geoip.inc @@ -53,7 +53,7 @@ define("GEOIP_DIALUP_SPEED", 1); define("GEOIP_CABLEDSL_SPEED", 2); define("GEOIP_CORPORATE_SPEED", 3); -if( !class_exists('GeoIP') ) { +if( !class_exists('GeoIP', false) ) { class GeoIP { var $flags; var $filehandle; diff --git a/includes/pomo/entry.php b/includes/pomo/entry.php index 097e92c..2408c91 100644 --- a/includes/pomo/entry.php +++ b/includes/pomo/entry.php @@ -7,7 +7,7 @@ * @subpackage entry */ -if ( !class_exists( 'Translation_Entry' ) ): +if ( !class_exists( 'Translation_Entry', false ) ): /** * Translation_Entry class encapsulates a translatable string */ diff --git a/includes/pomo/mo.php b/includes/pomo/mo.php index 68c0792..a206da1 100644 --- a/includes/pomo/mo.php +++ b/includes/pomo/mo.php @@ -10,7 +10,7 @@ require_once dirname(__FILE__) . '/translations.php'; require_once dirname(__FILE__) . '/streams.php'; -if ( !class_exists( 'MO' ) ): +if ( !class_exists( 'MO', false ) ): class MO extends Gettext_Translations { var $_nplurals = 2; diff --git a/includes/pomo/po.php b/includes/pomo/po.php index f76be01..6082d7a 100644 --- a/includes/pomo/po.php +++ b/includes/pomo/po.php @@ -16,7 +16,7 @@ /** * Routines for working with PO files */ -if ( !class_exists( 'PO' ) ): +if ( !class_exists( 'PO', false ) ): class PO extends Gettext_Translations { var $comments_before_headers = ''; diff --git a/includes/pomo/streams.php b/includes/pomo/streams.php index dbb1de8..7cda3ac 100644 --- a/includes/pomo/streams.php +++ b/includes/pomo/streams.php @@ -8,7 +8,7 @@ * @subpackage streams */ -if ( !class_exists( 'POMO_Reader' ) ): +if ( !class_exists( 'POMO_Reader', false ) ): class POMO_Reader { var $endian = 'little'; @@ -102,7 +102,7 @@ function close() { } endif; -if ( !class_exists( 'POMO_FileReader' ) ): +if ( !class_exists( 'POMO_FileReader', false ) ): class POMO_FileReader extends POMO_Reader { function POMO_FileReader($filename) { parent::POMO_Reader(); @@ -142,7 +142,7 @@ function read_all() { } endif; -if ( !class_exists( 'POMO_StringReader' ) ): +if ( !class_exists( 'POMO_StringReader', false ) ): /** * Provides file-like methods for manipulating a string instead * of a physical file. @@ -182,7 +182,7 @@ function read_all() { } endif; -if ( !class_exists( 'POMO_CachedFileReader' ) ): +if ( !class_exists( 'POMO_CachedFileReader', false ) ): /** * Reads the contents of the file in the beginning. */ @@ -197,7 +197,7 @@ function POMO_CachedFileReader($filename) { } endif; -if ( !class_exists( 'POMO_CachedIntFileReader' ) ): +if ( !class_exists( 'POMO_CachedIntFileReader', false ) ): /** * Reads the contents of the file in the beginning. */ diff --git a/includes/pomo/translations.php b/includes/pomo/translations.php index 106b6da..9bbd65a 100644 --- a/includes/pomo/translations.php +++ b/includes/pomo/translations.php @@ -9,7 +9,7 @@ require_once dirname(__FILE__) . '/entry.php'; -if ( !class_exists( 'Translations' ) ): +if ( !class_exists( 'Translations', false ) ): class Translations { var $entries = array(); var $headers = array(); @@ -227,7 +227,7 @@ function set_header($header, $value) { } endif; -if ( !class_exists( 'NOOP_Translations' ) ): +if ( !class_exists( 'NOOP_Translations', false ) ): /** * Provides the same interface as Translations, but doesn't do anything */ -- 2.45.0