Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP7 compatibility changes - class constructors and evaluation order #533

Merged
merged 2 commits into from May 11, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -13,7 +13,7 @@
require(DIR_FS_CATALOG . 'includes/classes/action_recorder.php');
class actionRecorderAdmin extends actionRecorder {
function actionRecorderAdmin($module, $user_id = null, $user_name = null) {
function __construct($module, $user_id = null, $user_name = null) {
global $language, $PHP_SELF;
$module = tep_sanitize_string(str_replace(' ', '', $module));
@@ -24,7 +24,7 @@
*/
class box extends tableBlock {
function box() {
function __construct() {
$this->heading = array();
$this->contents = array();
}
@@ -13,7 +13,7 @@
class cfg_modules {
var $_modules = array();
function cfg_modules() {
function __construct() {
global $PHP_SELF, $language;
$file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
@@ -17,7 +17,7 @@ class currencies {
var $currencies;
// class constructor
function currencies() {
function __construct() {
$this->currencies = array();
$currencies_query = tep_db_query("select code, title, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, value from " . TABLE_CURRENCIES);
while ($currencies = tep_db_fetch_array($currencies_query)) {
@@ -28,7 +28,7 @@ class email {
var $attachments;
var $headers;
function email($headers = '') {
function __construct($headers = '') {
if ($headers == '') $headers = array();
$this->html_images = array();
@@ -16,7 +16,7 @@
class language {
var $languages, $catalog_languages, $browser_languages, $language;
function language($lng = '') {
function __construct($lng = '') {
$this->languages = array('af' => 'af|afrikaans',
'ar' => 'ar([-_][[:alpha:]]{2})?|arabic',
'be' => 'be|belarusian',
@@ -14,7 +14,7 @@ class logger {
var $timer_start, $timer_stop, $timer_total;
// class constructor
function logger() {
function __construct() {
$this->timer_start();
}
@@ -19,8 +19,8 @@
class messageStack extends tableBlock {
var $size = 0;
function messageStack() {
function __construct() {
global $messageToStack;
$this->errors = array();
@@ -38,7 +38,7 @@ class mime {
* @access public
*/
function mime($body, $params = '') {
function __construct($body, $params = '') {
if ($params == '') $params = array();
// Make sure we use the correct linfeed sequence
@@ -13,6 +13,10 @@
class objectInfo {
// class constructor
function __construct($object_array) {
$this->objectInfo($object_array);
}
function objectInfo($object_array) {
reset($object_array);
while (list($key, $value) = each($object_array)) {
@@ -13,7 +13,7 @@
class order {
var $info, $totals, $products, $customer, $delivery;
function order($order_id) {
function __construct($order_id) {
$this->info = array();
$this->totals = array();
$this->products = array();
@@ -35,7 +35,7 @@ class PasswordHash {
var $portable_hashes;
var $random_state;
function PasswordHash($iteration_count_log2, $portable_hashes)
function __construct($iteration_count_log2, $portable_hashes)
{
$this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
@@ -169,7 +169,7 @@ class PHPlot{
//BEGIN CODE
//////////////////////////////////////////////////////
//Constructor: Setup Img pointer, Colors and Size of Image
function PHPlot($which_width=600,$which_height=400,$which_output_file="",$which_input_file="") {
function __construct($which_width=600,$which_height=400,$which_output_file="",$which_input_file="") {
$this->SetRGBArray('2');
$this->background_done = 0; //Set to 1 after background image first drawn
@@ -13,6 +13,9 @@
class shoppingCart {
var $contents, $total, $weight;
function __construct() {
}
function shoppingCart() {
$this->reset();
}
@@ -11,7 +11,7 @@
*/
class splitPageResults {
function splitPageResults(&$current_page_number, $max_rows_per_page, &$sql_query, &$query_num_rows) {
function __construct(&$current_page_number, $max_rows_per_page, &$sql_query, &$query_num_rows) {
if (empty($current_page_number)) $current_page_number = 1;
$pos_to = strlen($sql_query);
@@ -19,6 +19,9 @@ class tableBlock {
var $table_row_parameters = '';
var $table_data_parameters = '';
function __construct() {
}
function tableBlock($contents) {
$tableBox_string = '';
@@ -13,7 +13,7 @@
class upload {
var $file, $filename, $destination, $permissions, $extensions, $tmp_filename, $message_location;
function upload($file = '', $destination = '', $permissions = '777', $extensions = '') {
function __construct($file = '', $destination = '', $permissions = '777', $extensions = '') {
$this->set_file($file);
$this->set_destination($destination);
$this->set_permissions($permissions);
@@ -18,7 +18,7 @@ class cfgm_action_recorder {
var $title;
var $template_integration = false;
function cfgm_action_recorder() {
function __construct() {
$this->directory = DIR_FS_CATALOG_MODULES . 'action_recorder/';
$this->title = MODULE_CFG_MODULE_ACTION_RECORDER_TITLE;
}
@@ -18,7 +18,7 @@ class cfgm_boxes {
var $title;
var $template_integration = true;
function cfgm_boxes() {
function __construct() {
$this->directory = DIR_FS_CATALOG_MODULES . 'boxes/';
$this->title = MODULE_CFG_MODULE_BOXES_TITLE;
}
@@ -18,7 +18,7 @@ class cfgm_dashboard {
var $title;
var $template_integration = false;
function cfgm_dashboard() {
function __construct() {
$this->directory = DIR_FS_ADMIN . 'includes/modules/dashboard/';
$this->language_directory = DIR_FS_ADMIN . 'includes/languages/';
$this->title = MODULE_CFG_MODULE_DASHBOARD_TITLE;
@@ -18,7 +18,7 @@ class cfgm_header_tags {
var $title;
var $template_integration = true;
function cfgm_header_tags() {
function __construct() {
$this->directory = DIR_FS_CATALOG_MODULES . 'header_tags/';
$this->title = MODULE_CFG_MODULE_HEADER_TAGS_TITLE;
}
@@ -18,7 +18,7 @@ class cfgm_navbar_modules {
var $title;
var $template_integration = false;
function cfgm_navbar_modules() {
function __construct() {
$this->directory = DIR_FS_CATALOG_MODULES . 'navbar_modules/';
$this->title = MODULE_CFG_MODULE_CONTENT_NAVBAR_TITLE;
}
@@ -18,7 +18,7 @@ class cfgm_order_total {
var $title;
var $template_integration = false;
function cfgm_order_total() {
function __construct() {
$this->directory = DIR_FS_CATALOG_MODULES . 'order_total/';
$this->title = MODULE_CFG_MODULE_ORDER_TOTAL_TITLE;
}
@@ -18,7 +18,7 @@ class cfgm_payment {
var $title;
var $template_integration = false;
function cfgm_payment() {
function __construct() {
$this->directory = DIR_FS_CATALOG_MODULES . 'payment/';
$this->title = MODULE_CFG_MODULE_PAYMENT_TITLE;
}
@@ -18,7 +18,7 @@ class cfgm_shipping {
var $title;
var $template_integration = false;
function cfgm_shipping() {
function __construct() {
$this->directory = DIR_FS_CATALOG_MODULES . 'shipping/';
$this->title = MODULE_CFG_MODULE_SHIPPING_TITLE;
}
@@ -18,7 +18,7 @@ class cfgm_social_bookmarks {
var $title;
var $template_integration = false;
function cfgm_social_bookmarks() {
function __construct() {
$this->directory = DIR_FS_CATALOG_MODULES . 'social_bookmarks/';
$this->title = MODULE_CFG_MODULE_SOCIAL_BOOKMARKS_TITLE;
}
@@ -17,7 +17,7 @@ class d_admin_logins {
var $sort_order;
var $enabled = false;
function d_admin_logins() {
function __construct() {
$this->title = MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_TITLE;
$this->description = MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_DESCRIPTION;
@@ -17,7 +17,7 @@ class d_customers {
var $sort_order;
var $enabled = false;
function d_customers() {
function __construct() {
$this->title = MODULE_ADMIN_DASHBOARD_CUSTOMERS_TITLE;
$this->description = MODULE_ADMIN_DASHBOARD_CUSTOMERS_DESCRIPTION;
@@ -17,7 +17,7 @@ class d_latest_addons {
var $sort_order;
var $enabled = false;
function d_latest_addons() {
function __construct() {
$this->title = MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_TITLE;
$this->description = MODULE_ADMIN_DASHBOARD_LATEST_ADDONS_DESCRIPTION;
@@ -17,7 +17,7 @@ class d_latest_news {
var $sort_order;
var $enabled = false;
function d_latest_news() {
function __construct() {
$this->title = MODULE_ADMIN_DASHBOARD_LATEST_NEWS_TITLE;
$this->description = MODULE_ADMIN_DASHBOARD_LATEST_NEWS_DESCRIPTION;
@@ -17,7 +17,7 @@ class d_orders {
var $sort_order;
var $enabled = false;
function d_orders() {
function __construct() {
$this->title = MODULE_ADMIN_DASHBOARD_ORDERS_TITLE;
$this->description = MODULE_ADMIN_DASHBOARD_ORDERS_DESCRIPTION;
@@ -17,7 +17,7 @@ class d_partner_news {
var $sort_order;
var $enabled = false;
function d_partner_news() {
function __construct() {
$this->title = MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_TITLE;
$this->description = MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_DESCRIPTION;
@@ -21,7 +21,7 @@ class d_paypal_app {
var $sort_order;
var $enabled = false;
function d_paypal_app() {
function __construct() {
$this->_app = new OSCOM_PayPal();
$this->_app->loadLanguageFile('admin/balance.php');
$this->_app->loadLanguageFile('admin/modules/dashboard/d_paypal_app.php');
@@ -17,7 +17,7 @@ class d_reviews {
var $sort_order;
var $enabled = false;
function d_reviews() {
function __construct() {
$this->title = MODULE_ADMIN_DASHBOARD_REVIEWS_TITLE;
$this->description = MODULE_ADMIN_DASHBOARD_REVIEWS_DESCRIPTION;
@@ -17,7 +17,7 @@ class d_security_checks {
var $sort_order;
var $enabled = false;
function d_security_checks() {
function __construct() {
$this->title = MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_TITLE;
$this->description = MODULE_ADMIN_DASHBOARD_SECURITY_CHECKS_DESCRIPTION;
@@ -17,7 +17,7 @@ class d_total_customers {
var $sort_order;
var $enabled = false;
function d_total_customers() {
function __construct() {
$this->title = MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_TITLE;
$this->description = MODULE_ADMIN_DASHBOARD_TOTAL_CUSTOMERS_DESCRIPTION;
@@ -17,7 +17,7 @@ class d_total_revenue {
var $sort_order;
var $enabled = false;
function d_total_revenue() {
function __construct() {
$this->title = MODULE_ADMIN_DASHBOARD_TOTAL_REVENUE_TITLE;
$this->description = MODULE_ADMIN_DASHBOARD_TOTAL_REVENUE_DESCRIPTION;
@@ -17,7 +17,7 @@ class d_version_check {
var $sort_order;
var $enabled = false;
function d_version_check() {
function __construct() {
$this->title = MODULE_ADMIN_DASHBOARD_VERSION_CHECK_TITLE;
$this->description = MODULE_ADMIN_DASHBOARD_VERSION_CHECK_DESCRIPTION;
@@ -13,7 +13,7 @@
class newsletter {
var $show_choose_audience, $title, $content;
function newsletter($title, $content) {
function __construct($title, $content) {
$this->show_choose_audience = false;
$this->title = $title;
$this->content = $content;
@@ -13,7 +13,7 @@
class product_notification {
var $show_choose_audience, $title, $content;
function product_notification($title, $content) {
function __construct($title, $content) {
$this->show_choose_audience = true;
$this->title = $title;
$this->content = $content;
@@ -13,7 +13,7 @@
class securityCheck_config_file_catalog {
var $type = 'warning';
function securityCheck_config_file_catalog() {
function __construct() {
global $language;
include(DIR_FS_ADMIN . 'includes/languages/' . $language . '/modules/security_check/config_file_catalog.php');
@@ -13,7 +13,7 @@
class securityCheck_default_currency {
var $type = 'error';
function securityCheck_default_currency() {
function __construct() {
global $language;
include(DIR_FS_ADMIN . 'includes/languages/' . $language . '/modules/security_check/default_currency.php');
@@ -13,7 +13,7 @@
class securityCheck_default_language {
var $type = 'error';
function securityCheck_default_language() {
function __construct() {
global $language;
include(DIR_FS_ADMIN . 'includes/languages/' . $language . '/modules/security_check/default_language.php');
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.