From 412fbe3f5b1dac87d179f15c17c2d162d392e303 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Thu, 24 Oct 2013 12:32:58 +0200 Subject: [PATCH] [FIX] Proper getTableName in Base Class --- public/include/classes/base.class.php | 4 ++++ public/include/classes/transaction.class.php | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/public/include/classes/base.class.php b/public/include/classes/base.class.php index fe548cbc..1f059c37 100644 --- a/public/include/classes/base.class.php +++ b/public/include/classes/base.class.php @@ -8,8 +8,12 @@ if (!defined('SECURITY')) // some cross-class functions. class Base { private $sError = ''; + protected $table = ''; private $values = array(), $types = ''; + public function getTableName() { + return $this->table; + } public function setDebug($debug) { $this->debug = $debug; } diff --git a/public/include/classes/transaction.class.php b/public/include/classes/transaction.class.php index 53d111e3..3933079f 100644 --- a/public/include/classes/transaction.class.php +++ b/public/include/classes/transaction.class.php @@ -5,7 +5,8 @@ if (!defined('SECURITY')) die('Hacking attempt'); class Transaction extends Base { - private $sError = '', $table = 'transactions'; + private $sError = ''; + protected $table = 'transactions'; public $num_rows = 0, $insert_id = 0; /**