Merge branch '1.10.x' of https://github.com/chamilo/chamilo-lms into 1.10.x

1.10.x
Angel Fernando Quiroz Campos 9 years ago
commit 89f58e52a8
  1. 20
      plugin/buycourses/src/buy_course_plugin.class.php

@ -63,13 +63,23 @@ class BuyCoursesPlugin extends Plugin
*/
function install()
{
$appPlugin = new AppPlugin();
$installedPlugins = $appPlugin->get_installed_plugins();
if (in_array($this->get_name(), $installedPlugins)) {
$tablesToBeCompared = array(
self::TABLE_PAYPAL,
self::TABLE_TRANSFER,
self::TABLE_ITEM_BENEFICIARY,
self::TABLE_ITEM,
self::TABLE_SALE,
self::TABLE_CURRENCY
);
$em = Database::getManager();
$cn = $em -> getConnection();
$sm = $cn -> getSchemaManager();
$tables = $sm ->tablesExist($tablesToBeCompared);
if ($tables) {
return false;
}
require_once api_get_path(SYS_PLUGIN_PATH) . 'buycourses/database.php';
}

Loading…
Cancel
Save