3 * This function is used for uninstalling Mahara
\r
4 * At the moment it is not being called from anywhere in the module.
\r
7 function delete_mahara() {
\r
10 // delete mahara entries (in case we don't have 'drop' priviledges)
\r
11 $sql = "DELETE FROM ".TABLE_PREFIX."mahara";
\r
12 if (!(mysql_query($sql, $db))) echo "Error deleting from ".TABLE_PREFIX."mahara. ";
\r
14 // drop mahara table
\r
15 $sql = "DROP TABLE IF EXISTS ".TABLE_PREFIX."mahara";
\r
16 if (!(mysql_query($sql, $db))) echo "Error dropping table, ".TABLE_PREFIX."mahara. ";
\r
18 // Also remove added language stuff
\r
19 $sql = "DELETE FROM ".TABLE_PREFIX."language_text WHERE "
\r
20 . "term='mahara' OR term='mahara_location' OR term='mahara_new_win' OR term='mahara_opened' "
\r
21 . "OR term='AT_ERROR_MAHARA_MINURL_ADD_EMPTY' OR term='AT_ERROR_MAHARA_ERROR_INSTALL' "
\r
22 . "OR term='AT_ERROR_MAHARA_ERROR_PATH' OR term='AT_FEEDBACK_MAHARA_LOGIN' OR term='AT_FEEDBACK_MAHARA_MINURL_ADD_SAVED'";
\r
23 if (!(mysql_query($sql, $db))) echo "Error delete rows from ".TABLE_PREFIX."language_text. ";
\r
26 // Remove mahara entry from config
\r
27 $sql = "DELETE FROM ".TABLE_PREFIX."config WHERE name='mahara'";
\r
28 if (!(mysql_query($sql, $db))) echo "Error deleting from ".TABLE_PREFIX."config. ";
\r
30 // Remove mahara from modules
\r
31 $sql = "DELETE FROM ".TABLE_PREFIX."modules WHERE dir_name='mahara'";
\r
32 if (!(mysql_query($sql, $db))) echo "Error deleting from ".TABLE_PREFIX."modules. ";
\r