summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tinymce.install60
1 files changed, 22 insertions, 38 deletions
diff --git a/tinymce.install b/tinymce.install
index 671ec4f..0680899 100644
--- a/tinymce.install
+++ b/tinymce.install
@@ -13,51 +13,35 @@
*/
function tinymce_install() {
switch ($GLOBALS['db_type']) {
- case 'mysqli':
case 'mysql':
- $query1 = db_query("CREATE TABLE IF NOT EXISTS {tinymce_settings} (
- name varchar(128) NOT NULL default '',
- settings text NOT NULL default '',
- PRIMARY KEY (name)
- ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
+ case 'mysqli':
+ db_query("CREATE TABLE {tinymce_settings} (
+ name varchar(128) NOT NULL default '',
+ settings text NOT NULL default '',
+ PRIMARY KEY (name)
+ ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
- $query2 = db_query("CREATE TABLE IF NOT EXISTS {tinymce_role} (
- name varchar(128) NOT NULL default '',
- rid tinyint(3) unsigned NOT NULL default '0',
- PRIMARY KEY (name,rid)
- ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
-
- if ($query1 && $query2) {
- $created = TRUE;
- }
+ db_query("CREATE TABLE {tinymce_role} (
+ name varchar(128) NOT NULL default '',
+ rid tinyint(3) unsigned NOT NULL default '0',
+ PRIMARY KEY (name,rid)
+ ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
break;
case 'pgsql':
- $query1 = db_query("CREATE TABLE {tinymce_settings} (
- name varchar(128) NOT NULL default '',
- settings text NOT NULL default '',
- PRIMARY KEY (name));");
+ db_query("CREATE TABLE {tinymce_settings} (
+ name varchar(128) NOT NULL default '',
+ settings text NOT NULL default '',
+ PRIMARY KEY (name)
+ );");
- $query2 = db_query("CREATE TABLE {tinymce_role} (
- name varchar(128) NOT NULL default '',
- rid smallint NOT NULL default '0',
- PRIMARY KEY (name,rid));");
-
- if ($query1 && $query2) {
- $created = TRUE;
- }
+ db_query("CREATE TABLE {tinymce_role} (
+ name varchar(128) NOT NULL default '',
+ rid smallint NOT NULL default '0',
+ PRIMARY KEY (name,rid)
+ );");
break;
-
- default:
- break;
- }
-
- if ($created) {
- drupal_set_message(t('TinyMCE module installed successfully.'));
- }
- else {
- drupal_set_message(t('Table installation for the TinyMCE module was unsuccessful. The tables may need to be installed by hand. See tinymce.install file for a list of the installation queries.'), 'error');
- }
+ }
}
function tinymce_update_1() {