Instance protected plugin correctly and modify default sanbox value

1.9.x
Francis Gonzales 12 years ago
parent bfbf3168fc
commit eee67df13c
  1. 4
      plugin/buy_courses/database.php
  2. 2
      plugin/buy_courses/src/buy_course_plugin.class.php
  3. 2
      plugin/ticket/database.php

@ -5,7 +5,7 @@
* Date: 21/05/14
* Time: 12:19 PM
*/
$objPlugin = new Buy_CoursesPlugin();
$objPlugin = Buy_CoursesPlugin::create();
$table = Database::get_main_table(TABLE_BUY_COURSE);
$sql = "CREATE TABLE IF NOT EXISTS $table (
@ -295,7 +295,7 @@ Database::query($sql);
$table = Database::get_main_table(TABLE_BUY_COURSE_PAYPAL);
$sql = "CREATE TABLE IF NOT EXISTS $table (
id INT unsigned NOT NULL auto_increment PRIMARY KEY,
sandbox VARCHAR(5) NOT NULL DEFAULT 'SI',
sandbox VARCHAR(5) NOT NULL DEFAULT 'YES',
username VARCHAR(100) NOT NULL DEFAULT '',
password VARCHAR(100) NOT NULL DEFAULT '',
signature VARCHAR(100) NOT NULL DEFAULT '')";

@ -18,7 +18,7 @@ class Buy_CoursesPlugin extends Plugin
return $result ? $result : $result = new self();
}
public function __construct()
protected function __construct()
{
parent::__construct('1.0', 'Jose Angel Ruiz, Francis Gonzales', array('paypal_enable' => 'boolean', 'transference_enable' => 'boolean', 'unregistered_users_enable' => 'boolean'));
}

@ -3,7 +3,7 @@
* Contains the SQL for the tickets management plugin database structure
*/
$objPlugin = new TicketPlugin();
$objPlugin = TicketPlugin::create();
$table = Database::get_main_table(TABLE_TICKET_ASSIGNED_LOG);
$sql = "CREATE TABLE IF NOT EXISTS ".$table." (

Loading…
Cancel
Save