plugin/advanced_subscription/src/AdvancedSubscriptionPlugin.php 1 location
|
@@ 126-137 (lines=12) @@
|
123 |
|
* Drop the database tables for the plugin |
124 |
|
* @return void |
125 |
|
*/ |
126 |
|
private function uninstallDatabase() |
127 |
|
{ |
128 |
|
/* Drop plugin tables */ |
129 |
|
$advancedSubscriptionQueueTable = Database::get_main_table(TABLE_ADVANCED_SUBSCRIPTION_QUEUE); |
130 |
|
|
131 |
|
$sql = "DROP TABLE IF EXISTS $advancedSubscriptionQueueTable; "; |
132 |
|
Database::query($sql); |
133 |
|
|
134 |
|
/* Delete settings */ |
135 |
|
$settingsTable = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT); |
136 |
|
Database::query("DELETE FROM $settingsTable WHERE subkey = 'advanced_subscription'"); |
137 |
|
} |
138 |
|
|
139 |
|
/** |
140 |
|
* Get the error messages list |
plugin/pens/lib/PENSPlugin.php 1 location
|
@@ 96-107 (lines=12) @@
|
93 |
|
* Drop the database tables for the plugin |
94 |
|
* @return void |
95 |
|
*/ |
96 |
|
private function uninstallDatabase() |
97 |
|
{ |
98 |
|
/* Drop plugin tables */ |
99 |
|
$pensTable = Database::get_main_table(PENSPlugin::TABLE_PENS); |
100 |
|
|
101 |
|
$sql = "DROP TABLE IF EXISTS $pensTable; "; |
102 |
|
Database::query($sql); |
103 |
|
|
104 |
|
/* Delete settings */ |
105 |
|
$settingsTable = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT); |
106 |
|
Database::query("DELETE FROM $settingsTable WHERE subkey = 'plugin_pens'"); |
107 |
|
} |
108 |
|
|
109 |
|
/** |
110 |
|
* Get the error messages list |
main/inc/lib/api.lib.php 1 location
|
@@ 7763-7773 (lines=11) @@
|
7760 |
|
* @param bool $listCampus Whether we authorize |
7761 |
|
* @todo the $_settings should be reloaded here. => write api function for this and use this in global.inc.php also. |
7762 |
|
*/ |
7763 |
|
function api_register_campus($listCampus = true) { |
7764 |
|
$tbl_settings = Database :: get_main_table(TABLE_MAIN_SETTINGS_CURRENT); |
7765 |
|
|
7766 |
|
$sql = "UPDATE $tbl_settings SET selected_value='true' WHERE variable='registered'"; |
7767 |
|
Database::query($sql); |
7768 |
|
|
7769 |
|
if (!$listCampus) { |
7770 |
|
$sql = "UPDATE $tbl_settings SET selected_value='true' WHERE variable='donotlistcampus'"; |
7771 |
|
Database::query($sql); |
7772 |
|
} |
7773 |
|
} |
7774 |
|
|
7775 |
|
/** |
7776 |
|
* Checks whether current user is a student boss |