Changeset 21289 for extensions/community/maintain.inc.php
- Timestamp:
- Mar 6, 2013, 5:45:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/community/maintain.inc.php
r12358 r21289 10 10 global $conf, $prefixeTable; 11 11 12 if ('mysql' == $conf['dblayer']) 13 { 14 $query = ' 12 $query = ' 15 13 CREATE TABLE '.$prefixeTable.'community_permissions ( 16 14 id int(11) NOT NULL AUTO_INCREMENT, … … 25 23 ) ENGINE=MyISAM DEFAULT CHARACTER SET utf8 26 24 ;'; 27 28 29 25 pwg_query($query); 26 27 $query = ' 30 28 CREATE TABLE '.$prefixeTable.'community_pendings ( 31 29 image_id mediumint(8) unsigned NOT NULL, … … 35 33 ) ENGINE=MyISAM DEFAULT CHARACTER SET utf8 36 34 ;'; 37 pwg_query($query); 38 } 39 elseif ('pgsql' == $conf['dblayer']) 40 { 41 $query = ' 42 CREATE TABLE "'.$prefixeTable.'community_permissions" ( 43 "id" serial NOT NULL, 44 "type" VARCHAR(255) NOT NULL, 45 "group_id" INTEGER, 46 "user_id" INTEGER, 47 "category_id" INTEGER, 48 "recursive" BOOLEAN default true, 49 "create_subcategories" BOOLEAN default false, 50 "moderated" BOOLEAN default true, 51 PRIMARY KEY ("id") 52 ) 53 ;'; 54 pwg_query($query); 55 56 $query = ' 57 CREATE TABLE "'.$prefixeTable.'community_pendings" ( 58 image_id INTEGER NOT NULL, 59 state VARCHAR(255) NOT NULL, 60 added_on TIMESTAMP NOT NULL, 61 validated_by INTEGER 62 ) 63 ;'; 64 pwg_query($query); 65 } 66 else 67 { 68 $query = ' 69 CREATE TABLE "'.$prefixeTable.'community_permissions" ( 70 "id" INTEGER NOT NULL, 71 "type" VARCHAR(255) NOT NULL, 72 "group_id" INTEGER, 73 "user_id" INTEGER, 74 "category_id" INTEGER, 75 "recursive" BOOLEAN default true, 76 "create_subcategories" BOOLEAN default false, 77 "moderated" BOOLEAN default true, 78 PRIMARY KEY ("id") 79 ) 80 ;'; 81 pwg_query($query); 82 83 $query = ' 84 CREATE TABLE "'.$prefixeTable.'community_pendings" ( 85 image_id INTEGER NOT NULL, 86 state VARCHAR(255) NOT NULL, 87 added_on TIMESTAMP NOT NULL, 88 validated_by INTEGER 89 ) 90 ;'; 91 pwg_query($query); 92 } 35 pwg_query($query); 93 36 } 94 37 … … 147 90 global $conf, $prefixeTable; 148 91 149 $from_piwigo21_file = $conf[' local_data_dir'].'/plugins/core_user_upload_to_community.php';92 $from_piwigo21_file = $conf['data_location'].'/plugins/core_user_upload_to_community.php'; 150 93 if (is_file($from_piwigo21_file)) 151 94 {
Note: See TracChangeset
for help on using the changeset viewer.