Skip to content

Commit eee67df

Browse files
author
Francis Gonzales
committed
Instance protected plugin correctly and modify default sanbox value
1 parent bfbf316 commit eee67df

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

plugin/buy_courses/database.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Date: 21/05/14
66
* Time: 12:19 PM
77
*/
8-
$objPlugin = new Buy_CoursesPlugin();
8+
$objPlugin = Buy_CoursesPlugin::create();
99

1010
$table = Database::get_main_table(TABLE_BUY_COURSE);
1111
$sql = "CREATE TABLE IF NOT EXISTS $table (
@@ -295,7 +295,7 @@
295295
$table = Database::get_main_table(TABLE_BUY_COURSE_PAYPAL);
296296
$sql = "CREATE TABLE IF NOT EXISTS $table (
297297
id INT unsigned NOT NULL auto_increment PRIMARY KEY,
298-
sandbox VARCHAR(5) NOT NULL DEFAULT 'SI',
298+
sandbox VARCHAR(5) NOT NULL DEFAULT 'YES',
299299
username VARCHAR(100) NOT NULL DEFAULT '',
300300
password VARCHAR(100) NOT NULL DEFAULT '',
301301
signature VARCHAR(100) NOT NULL DEFAULT '')";

plugin/buy_courses/src/buy_course_plugin.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static function create()
1818
return $result ? $result : $result = new self();
1919
}
2020

21-
public function __construct()
21+
protected function __construct()
2222
{
2323
parent::__construct('1.0', 'Jose Angel Ruiz, Francis Gonzales', array('paypal_enable' => 'boolean', 'transference_enable' => 'boolean', 'unregistered_users_enable' => 'boolean'));
2424
}

plugin/ticket/database.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Contains the SQL for the tickets management plugin database structure
44
*/
55

6-
$objPlugin = new TicketPlugin();
6+
$objPlugin = TicketPlugin::create();
77

88
$table = Database::get_main_table(TABLE_TICKET_ASSIGNED_LOG);
99
$sql = "CREATE TABLE IF NOT EXISTS ".$table." (

0 commit comments

Comments
 (0)