diff options
-rwxr-xr-x | boot.php | 5 | ||||
-rw-r--r-- | install/update.php | 818 | ||||
-rw-r--r-- | util/hmessages.po | 94 | ||||
-rw-r--r-- | view/css/conversation.css | 6 | ||||
-rw-r--r-- | view/theme/redbasic/php/style.php | 2 |
5 files changed, 467 insertions, 458 deletions
@@ -48,9 +48,8 @@ require_once('include/xchan.php'); require_once('include/hubloc.php'); require_once('include/attach.php'); -define ( 'PLATFORM_NAME', 'red' ); -define ( 'STD_VERSION', '5.3.1' ); - +define ( 'PLATFORM_NAME', 'hubzilla' ); +define ( 'STD_VERSION', '2.5.8' ); define ( 'ZOT_REVISION', '1.2' ); define ( 'DB_UPDATE_VERSION', 1192 ); diff --git a/install/update.php b/install/update.php index 1406f2d1b..ac560f4db 100644 --- a/install/update.php +++ b/install/update.php @@ -2548,411 +2548,421 @@ function update_r1190() { } function update_r1191() { - if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { - $r1 = q("CREATE TABLE addressbooks ( - id SERIAL NOT NULL, - principaluri VARCHAR(255), - displayname VARCHAR(255), - uri VARCHAR(200), - description TEXT, - synctoken INTEGER NOT NULL DEFAULT 1 - );" - ); - - $r2 = q("ALTER TABLE ONLY addressbooks ADD CONSTRAINT addressbooks_pkey PRIMARY KEY (id);"); - - $r3 = q("CREATE UNIQUE INDEX addressbooks_ukey ON addressbooks USING btree (principaluri, uri);"); - - $r4 = q("CREATE TABLE cards ( - id SERIAL NOT NULL, - addressbookid INTEGER NOT NULL, - carddata BYTEA, - uri VARCHAR(200), - lastmodified INTEGER, - etag VARCHAR(32), - size INTEGER NOT NULL - );" - ); - - $r5 = q("ALTER TABLE ONLY cards ADD CONSTRAINT cards_pkey PRIMARY KEY (id);"); - - $r6 = q("CREATE UNIQUE INDEX cards_ukey ON cards USING btree (addressbookid, uri);"); - - $r7 = q("CREATE TABLE addressbookchanges ( - id SERIAL NOT NULL, - uri VARCHAR(200) NOT NULL, - synctoken INTEGER NOT NULL, - addressbookid INTEGER NOT NULL, - operation SMALLINT NOT NULL - );" - ); - - $r8 = q("ALTER TABLE ONLY addressbookchanges ADD CONSTRAINT addressbookchanges_pkey PRIMARY KEY (id);"); - - $r9 = q("CREATE INDEX addressbookchanges_addressbookid_synctoken_ix ON addressbookchanges USING btree (addressbookid, synctoken);"); - - $r10 = q("CREATE TABLE calendarobjects ( - id SERIAL NOT NULL, - calendardata BYTEA, - uri VARCHAR(200), - calendarid INTEGER NOT NULL, - lastmodified INTEGER, - etag VARCHAR(32), - size INTEGER NOT NULL, - componenttype VARCHAR(8), - firstoccurence INTEGER, - lastoccurence INTEGER, - uid VARCHAR(200) - );" - ); - - $r11 = q("ALTER TABLE ONLY calendarobjects ADD CONSTRAINT calendarobjects_pkey PRIMARY KEY (id);"); - - $r12 = q("CREATE UNIQUE INDEX calendarobjects_ukey ON calendarobjects USING btree (calendarid, uri);"); - - $r13 = q("CREATE TABLE calendars ( - id SERIAL NOT NULL, - synctoken INTEGER NOT NULL DEFAULT 1, - components VARCHAR(21) - );" - ); - - $r14 = q("ALTER TABLE ONLY calendars ADD CONSTRAINT calendars_pkey PRIMARY KEY (id);"); - - $r15 = q("CREATE TABLE calendarinstances ( - id SERIAL NOT NULL, - calendarid INTEGER NOT NULL, - principaluri VARCHAR(100), - access SMALLINT NOT NULL DEFAULT '1', -- '1 = owner, 2 = read, 3 = readwrite' - displayname VARCHAR(100), - uri VARCHAR(200), - description TEXT, - calendarorder INTEGER NOT NULL DEFAULT 0, - calendarcolor VARCHAR(10), - timezone TEXT, - transparent SMALLINT NOT NULL DEFAULT '0', - share_href VARCHAR(100), - share_displayname VARCHAR(100), - share_invitestatus SMALLINT NOT NULL DEFAULT '2' -- '1 = noresponse, 2 = accepted, 3 = declined, 4 = invalid' - );" - ); - - $r16 = q("ALTER TABLE ONLY calendarinstances ADD CONSTRAINT calendarinstances_pkey PRIMARY KEY (id);"); - - $r17 = q("CREATE UNIQUE INDEX calendarinstances_principaluri_uri ON calendarinstances USING btree (principaluri, uri);"); - - $r18 = q("CREATE UNIQUE INDEX calendarinstances_principaluri_calendarid ON calendarinstances USING btree (principaluri, calendarid);"); - - $r19 = q("CREATE UNIQUE INDEX calendarinstances_principaluri_share_href ON calendarinstances USING btree (principaluri, share_href);"); - - $r20 = q("CREATE TABLE calendarsubscriptions ( - id SERIAL NOT NULL, - uri VARCHAR(200) NOT NULL, - principaluri VARCHAR(100) NOT NULL, - source TEXT, - displayname VARCHAR(100), - refreshrate VARCHAR(10), - calendarorder INTEGER NOT NULL DEFAULT 0, - calendarcolor VARCHAR(10), - striptodos SMALLINT NULL, - stripalarms SMALLINT NULL, - stripattachments SMALLINT NULL, - lastmodified INTEGER - );" - ); - - $r21 = q("ALTER TABLE ONLY calendarsubscriptions ADD CONSTRAINT calendarsubscriptions_pkey PRIMARY KEY (id);"); - - $r22 = q("CREATE UNIQUE INDEX calendarsubscriptions_ukey ON calendarsubscriptions USING btree (principaluri, uri);"); - - $r23 = q("CREATE TABLE calendarchanges ( - id SERIAL NOT NULL, - uri VARCHAR(200) NOT NULL, - synctoken INTEGER NOT NULL, - calendarid INTEGER NOT NULL, - operation SMALLINT NOT NULL DEFAULT 0 - );" - ); - - $r24 = q("ALTER TABLE ONLY calendarchanges ADD CONSTRAINT calendarchanges_pkey PRIMARY KEY (id);"); - - $r25 = q("CREATE INDEX calendarchanges_calendarid_synctoken_ix ON calendarchanges USING btree (calendarid, synctoken);"); - - $r26 = q("CREATE TABLE schedulingobjects ( - id SERIAL NOT NULL, - principaluri VARCHAR(255), - calendardata BYTEA, - uri VARCHAR(200), - lastmodified INTEGER, - etag VARCHAR(32), - size INTEGER NOT NULL - );" - ); - - $r27 = q("CREATE TABLE locks ( - id SERIAL NOT NULL, - owner VARCHAR(100), - timeout INTEGER, - created INTEGER, - token VARCHAR(100), - scope SMALLINT, - depth SMALLINT, - uri TEXT - );" - ); - - $r28 = q("ALTER TABLE ONLY locks ADD CONSTRAINT locks_pkey PRIMARY KEY (id);"); - - $r29 = q("CREATE INDEX locks_token_ix ON locks USING btree (token);"); - - $r30 = q("CREATE INDEX locks_uri_ix ON locks USING btree (uri);"); - - $r31 = q("CREATE TABLE principals ( - id SERIAL NOT NULL, - uri VARCHAR(200) NOT NULL, - email VARCHAR(80), - displayname VARCHAR(80) - );" - ); - - $r32 = q("ALTER TABLE ONLY principals ADD CONSTRAINT principals_pkey PRIMARY KEY (id);"); - - $r33 = q("CREATE UNIQUE INDEX principals_ukey ON principals USING btree (uri);"); - - $r34 = q("CREATE TABLE groupmembers ( - id SERIAL NOT NULL, - principal_id INTEGER NOT NULL, - member_id INTEGER NOT NULL - );" - ); - - $r35 = q("ALTER TABLE ONLY groupmembers ADD CONSTRAINT groupmembers_pkey PRIMARY KEY (id);"); - - $r36 = q("CREATE UNIQUE INDEX groupmembers_ukey ON groupmembers USING btree (principal_id, member_id);"); - - $r37 = q("CREATE TABLE propertystorage ( - id SERIAL NOT NULL, - path VARCHAR(1024) NOT NULL, - name VARCHAR(100) NOT NULL, - valuetype INT, - value BYTEA - );" - ); - - $r38 = q("ALTER TABLE ONLY propertystorage ADD CONSTRAINT propertystorage_pkey PRIMARY KEY (id);"); - - $r39 = q("CREATE UNIQUE INDEX propertystorage_ukey ON propertystorage (path, name);"); - - $r40 = q("CREATE TABLE users ( - id SERIAL NOT NULL, - username VARCHAR(50), - digesta1 VARCHAR(32) - );" - ); - - $r41 = q("ALTER TABLE ONLY users ADD CONSTRAINT users_pkey PRIMARY KEY (id);"); - - $r42 = q("CREATE UNIQUE INDEX users_ukey ON users USING btree (username);"); - - if( - $r1 && $r2 && $r3 && $r4 && $r5 && $r6 && $r7 && $r8 && $r9 && $r10 - && $r11 && $r12 && $r13 && $r14 && $r15 && $r16 && $r17 && $r18 && $r19 && $r20 - && $r21 && $r22 && $r23 && $r24 && $r25 && $r26 && $r27 && $r28 && $r29 && $r30 - && $r31 && $r32 && $r33 && $r34 && $r35 && $r36 && $r37 && $r38 && $r39 && $r40 - && $r41 && $r42 - ) - return UPDATE_SUCCESS; - return UPDATE_FAILED; + + $r = q("SELECT 1 FROM principals LIMIT 1"); + + if($r !== false) { + return UPDATE_SUCCESS; } else { - $r1 = q("CREATE TABLE if not exists addressbooks ( - id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - principaluri VARBINARY(255), - displayname VARCHAR(255), - uri VARBINARY(200), - description TEXT, - synctoken INT(11) UNSIGNED NOT NULL DEFAULT '1', - UNIQUE(principaluri(100), uri(100)) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" - ); - - $r2 = q("CREATE TABLE if not exists cards ( - id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - addressbookid INT(11) UNSIGNED NOT NULL, - carddata MEDIUMBLOB, - uri VARBINARY(200), - lastmodified INT(11) UNSIGNED, - etag VARBINARY(32), - size INT(11) UNSIGNED NOT NULL - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" - ); - - $r3 = q("CREATE TABLE if not exists addressbookchanges ( - id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - uri VARBINARY(200) NOT NULL, - synctoken INT(11) UNSIGNED NOT NULL, - addressbookid INT(11) UNSIGNED NOT NULL, - operation TINYINT(1) NOT NULL, - INDEX addressbookid_synctoken (addressbookid, synctoken) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" - ); - - $r4 = q("CREATE TABLE if not exists calendarobjects ( - id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - calendardata MEDIUMBLOB, - uri VARBINARY(200), - calendarid INTEGER UNSIGNED NOT NULL, - lastmodified INT(11) UNSIGNED, - etag VARBINARY(32), - size INT(11) UNSIGNED NOT NULL, - componenttype VARBINARY(8), - firstoccurence INT(11) UNSIGNED, - lastoccurence INT(11) UNSIGNED, - uid VARBINARY(200), - UNIQUE(calendarid, uri), - INDEX calendarid_time (calendarid, firstoccurence) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" - ); - - $r5 = q("CREATE TABLE if not exists calendars ( - id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - synctoken INTEGER UNSIGNED NOT NULL DEFAULT '1', - components VARBINARY(21) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" - ); - - $r6 = q("CREATE TABLE if not exists calendarinstances ( - id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - calendarid INTEGER UNSIGNED NOT NULL, - principaluri VARBINARY(100), - access TINYINT(1) NOT NULL DEFAULT '1' COMMENT '1 = owner, 2 = read, 3 = readwrite', - displayname VARCHAR(100), - uri VARBINARY(200), - description TEXT, - calendarorder INT(11) UNSIGNED NOT NULL DEFAULT '0', - calendarcolor VARBINARY(10), - timezone TEXT, - transparent TINYINT(1) NOT NULL DEFAULT '0', - share_href VARBINARY(100), - share_displayname VARCHAR(100), - share_invitestatus TINYINT(1) NOT NULL DEFAULT '2' COMMENT '1 = noresponse, 2 = accepted, 3 = declined, 4 = invalid', - UNIQUE(principaluri, uri), - UNIQUE(calendarid, principaluri), - UNIQUE(calendarid, share_href) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" - ); - - $r7 = q("CREATE TABLE if not exists calendarchanges ( - id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - uri VARBINARY(200) NOT NULL, - synctoken INT(11) UNSIGNED NOT NULL, - calendarid INT(11) UNSIGNED NOT NULL, - operation TINYINT(1) NOT NULL, - INDEX calendarid_synctoken (calendarid, synctoken) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" - ); - - $r8 = q("CREATE TABLE if not exists calendarsubscriptions ( - id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - uri VARBINARY(200) NOT NULL, - principaluri VARBINARY(100) NOT NULL, - source TEXT, - displayname VARCHAR(100), - refreshrate VARCHAR(10), - calendarorder INT(11) UNSIGNED NOT NULL DEFAULT '0', - calendarcolor VARBINARY(10), - striptodos TINYINT(1) NULL, - stripalarms TINYINT(1) NULL, - stripattachments TINYINT(1) NULL, - lastmodified INT(11) UNSIGNED, - UNIQUE(principaluri, uri) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" - ); - - $r9 = q("CREATE TABLE if not exists schedulingobjects ( - id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - principaluri VARBINARY(255), - calendardata MEDIUMBLOB, - uri VARBINARY(200), - lastmodified INT(11) UNSIGNED, - etag VARBINARY(32), - size INT(11) UNSIGNED NOT NULL - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" - ); - - $r10 = q("CREATE TABLE if not exists locks ( - id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - owner VARCHAR(100), - timeout INTEGER UNSIGNED, - created INTEGER, - token VARBINARY(100), - scope TINYINT, - depth TINYINT, - uri VARBINARY(1000), - INDEX(token), - INDEX(uri(100)) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" - ); - - $r11 = q("CREATE TABLE if not exists principals ( - id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - uri VARBINARY(200) NOT NULL, - email VARBINARY(80), - displayname VARCHAR(80), - UNIQUE(uri) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" - ); - - $r12 = q("CREATE TABLE if not exists groupmembers ( - id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - principal_id INTEGER UNSIGNED NOT NULL, - member_id INTEGER UNSIGNED NOT NULL, - UNIQUE(principal_id, member_id) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" - ); - - $r13 = q("CREATE TABLE if not exists propertystorage ( - id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - path VARBINARY(1024) NOT NULL, - name VARBINARY(100) NOT NULL, - valuetype INT UNSIGNED, - value MEDIUMBLOB - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" - ); - - $r14 = q("CREATE UNIQUE INDEX path_property ON propertystorage (path(600), name(100));"); - - $r15 = q("CREATE TABLE if not exists users ( - id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - username VARBINARY(50), - digesta1 VARBINARY(32), - UNIQUE(username) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" - ); - - $r16 = q("CREATE TABLE if not exists calendarinstances ( - id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, - calendarid INTEGER UNSIGNED NOT NULL, - principaluri VARBINARY(100), - access TINYINT(1) NOT NULL DEFAULT '1' COMMENT '1 = owner, 2 = read, 3 = readwrite', - displayname VARCHAR(100), - uri VARBINARY(200), - description TEXT, - calendarorder INT(11) UNSIGNED NOT NULL DEFAULT '0', - calendarcolor VARBINARY(10), - timezone TEXT, - transparent TINYINT(1) NOT NULL DEFAULT '0', - share_href VARBINARY(100), - share_displayname VARCHAR(100), - share_invitestatus TINYINT(1) NOT NULL DEFAULT '2' COMMENT '1 = noresponse, 2 = accepted, 3 = declined, 4 = invalid', - UNIQUE(principaluri, uri), - UNIQUE(calendarid, principaluri), - UNIQUE(calendarid, share_href) - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" - ); - - if($r1 && $r2 && $r3 && $r4 && $r5 && $r6 && $r7 && $r8 && $r9 && $r10 && $r11 && $r12 && $r13 && $r14 && $r15 && $r16) - return UPDATE_SUCCESS; - return UPDATE_FAILED; + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { + $r1 = q("CREATE TABLE addressbooks ( + id SERIAL NOT NULL, + principaluri VARCHAR(255), + displayname VARCHAR(255), + uri VARCHAR(200), + description TEXT, + synctoken INTEGER NOT NULL DEFAULT 1 + );" + ); + + $r2 = q("ALTER TABLE ONLY addressbooks ADD CONSTRAINT addressbooks_pkey PRIMARY KEY (id);"); + + $r3 = q("CREATE UNIQUE INDEX addressbooks_ukey ON addressbooks USING btree (principaluri, uri);"); + + $r4 = q("CREATE TABLE cards ( + id SERIAL NOT NULL, + addressbookid INTEGER NOT NULL, + carddata BYTEA, + uri VARCHAR(200), + lastmodified INTEGER, + etag VARCHAR(32), + size INTEGER NOT NULL + );" + ); + + $r5 = q("ALTER TABLE ONLY cards ADD CONSTRAINT cards_pkey PRIMARY KEY (id);"); + + $r6 = q("CREATE UNIQUE INDEX cards_ukey ON cards USING btree (addressbookid, uri);"); + + $r7 = q("CREATE TABLE addressbookchanges ( + id SERIAL NOT NULL, + uri VARCHAR(200) NOT NULL, + synctoken INTEGER NOT NULL, + addressbookid INTEGER NOT NULL, + operation SMALLINT NOT NULL + );" + ); + + $r8 = q("ALTER TABLE ONLY addressbookchanges ADD CONSTRAINT addressbookchanges_pkey PRIMARY KEY (id);"); + + $r9 = q("CREATE INDEX addressbookchanges_addressbookid_synctoken_ix ON addressbookchanges USING btree (addressbookid, synctoken);"); + + $r10 = q("CREATE TABLE calendarobjects ( + id SERIAL NOT NULL, + calendardata BYTEA, + uri VARCHAR(200), + calendarid INTEGER NOT NULL, + lastmodified INTEGER, + etag VARCHAR(32), + size INTEGER NOT NULL, + componenttype VARCHAR(8), + firstoccurence INTEGER, + lastoccurence INTEGER, + uid VARCHAR(200) + );" + ); + + $r11 = q("ALTER TABLE ONLY calendarobjects ADD CONSTRAINT calendarobjects_pkey PRIMARY KEY (id);"); + + $r12 = q("CREATE UNIQUE INDEX calendarobjects_ukey ON calendarobjects USING btree (calendarid, uri);"); + + $r13 = q("CREATE TABLE calendars ( + id SERIAL NOT NULL, + synctoken INTEGER NOT NULL DEFAULT 1, + components VARCHAR(21) + );" + ); + + $r14 = q("ALTER TABLE ONLY calendars ADD CONSTRAINT calendars_pkey PRIMARY KEY (id);"); + + $r15 = q("CREATE TABLE calendarinstances ( + id SERIAL NOT NULL, + calendarid INTEGER NOT NULL, + principaluri VARCHAR(100), + access SMALLINT NOT NULL DEFAULT '1', -- '1 = owner, 2 = read, 3 = readwrite' + displayname VARCHAR(100), + uri VARCHAR(200), + description TEXT, + calendarorder INTEGER NOT NULL DEFAULT 0, + calendarcolor VARCHAR(10), + timezone TEXT, + transparent SMALLINT NOT NULL DEFAULT '0', + share_href VARCHAR(100), + share_displayname VARCHAR(100), + share_invitestatus SMALLINT NOT NULL DEFAULT '2' -- '1 = noresponse, 2 = accepted, 3 = declined, 4 = invalid' + );" + ); + + $r16 = q("ALTER TABLE ONLY calendarinstances ADD CONSTRAINT calendarinstances_pkey PRIMARY KEY (id);"); + + $r17 = q("CREATE UNIQUE INDEX calendarinstances_principaluri_uri ON calendarinstances USING btree (principaluri, uri);"); + + $r18 = q("CREATE UNIQUE INDEX calendarinstances_principaluri_calendarid ON calendarinstances USING btree (principaluri, calendarid);"); + + $r19 = q("CREATE UNIQUE INDEX calendarinstances_principaluri_share_href ON calendarinstances USING btree (principaluri, share_href);"); + + $r20 = q("CREATE TABLE calendarsubscriptions ( + id SERIAL NOT NULL, + uri VARCHAR(200) NOT NULL, + principaluri VARCHAR(100) NOT NULL, + source TEXT, + displayname VARCHAR(100), + refreshrate VARCHAR(10), + calendarorder INTEGER NOT NULL DEFAULT 0, + calendarcolor VARCHAR(10), + striptodos SMALLINT NULL, + stripalarms SMALLINT NULL, + stripattachments SMALLINT NULL, + lastmodified INTEGER + );" + ); + + $r21 = q("ALTER TABLE ONLY calendarsubscriptions ADD CONSTRAINT calendarsubscriptions_pkey PRIMARY KEY (id);"); + + $r22 = q("CREATE UNIQUE INDEX calendarsubscriptions_ukey ON calendarsubscriptions USING btree (principaluri, uri);"); + + $r23 = q("CREATE TABLE calendarchanges ( + id SERIAL NOT NULL, + uri VARCHAR(200) NOT NULL, + synctoken INTEGER NOT NULL, + calendarid INTEGER NOT NULL, + operation SMALLINT NOT NULL DEFAULT 0 + );" + ); + + $r24 = q("ALTER TABLE ONLY calendarchanges ADD CONSTRAINT calendarchanges_pkey PRIMARY KEY (id);"); + + $r25 = q("CREATE INDEX calendarchanges_calendarid_synctoken_ix ON calendarchanges USING btree (calendarid, synctoken);"); + + $r26 = q("CREATE TABLE schedulingobjects ( + id SERIAL NOT NULL, + principaluri VARCHAR(255), + calendardata BYTEA, + uri VARCHAR(200), + lastmodified INTEGER, + etag VARCHAR(32), + size INTEGER NOT NULL + );" + ); + + $r27 = q("CREATE TABLE locks ( + id SERIAL NOT NULL, + owner VARCHAR(100), + timeout INTEGER, + created INTEGER, + token VARCHAR(100), + scope SMALLINT, + depth SMALLINT, + uri TEXT + );" + ); + + $r28 = q("ALTER TABLE ONLY locks ADD CONSTRAINT locks_pkey PRIMARY KEY (id);"); + + $r29 = q("CREATE INDEX locks_token_ix ON locks USING btree (token);"); + + $r30 = q("CREATE INDEX locks_uri_ix ON locks USING btree (uri);"); + + $r31 = q("CREATE TABLE principals ( + id SERIAL NOT NULL, + uri VARCHAR(200) NOT NULL, + email VARCHAR(80), + displayname VARCHAR(80) + );" + ); + + $r32 = q("ALTER TABLE ONLY principals ADD CONSTRAINT principals_pkey PRIMARY KEY (id);"); + + $r33 = q("CREATE UNIQUE INDEX principals_ukey ON principals USING btree (uri);"); + + $r34 = q("CREATE TABLE groupmembers ( + id SERIAL NOT NULL, + principal_id INTEGER NOT NULL, + member_id INTEGER NOT NULL + );" + ); + + $r35 = q("ALTER TABLE ONLY groupmembers ADD CONSTRAINT groupmembers_pkey PRIMARY KEY (id);"); + + $r36 = q("CREATE UNIQUE INDEX groupmembers_ukey ON groupmembers USING btree (principal_id, member_id);"); + + $r37 = q("CREATE TABLE propertystorage ( + id SERIAL NOT NULL, + path VARCHAR(1024) NOT NULL, + name VARCHAR(100) NOT NULL, + valuetype INT, + value BYTEA + );" + ); + + $r38 = q("ALTER TABLE ONLY propertystorage ADD CONSTRAINT propertystorage_pkey PRIMARY KEY (id);"); + + $r39 = q("CREATE UNIQUE INDEX propertystorage_ukey ON propertystorage (path, name);"); + + $r40 = q("CREATE TABLE users ( + id SERIAL NOT NULL, + username VARCHAR(50), + digesta1 VARCHAR(32) + );" + ); + + $r41 = q("ALTER TABLE ONLY users ADD CONSTRAINT users_pkey PRIMARY KEY (id);"); + + $r42 = q("CREATE UNIQUE INDEX users_ukey ON users USING btree (username);"); + + if( + $r1 && $r2 && $r3 && $r4 && $r5 && $r6 && $r7 && $r8 && $r9 && $r10 + && $r11 && $r12 && $r13 && $r14 && $r15 && $r16 && $r17 && $r18 && $r19 && $r20 + && $r21 && $r22 && $r23 && $r24 && $r25 && $r26 && $r27 && $r28 && $r29 && $r30 + && $r31 && $r32 && $r33 && $r34 && $r35 && $r36 && $r37 && $r38 && $r39 && $r40 + && $r41 && $r42 + ) + return UPDATE_SUCCESS; + return UPDATE_FAILED; + } + else { + $r1 = q("CREATE TABLE if not exists addressbooks ( + id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + principaluri VARBINARY(255), + displayname VARCHAR(255), + uri VARBINARY(200), + description TEXT, + synctoken INT(11) UNSIGNED NOT NULL DEFAULT '1', + UNIQUE(principaluri(100), uri(100)) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" + ); + + $r2 = q("CREATE TABLE if not exists cards ( + id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + addressbookid INT(11) UNSIGNED NOT NULL, + carddata MEDIUMBLOB, + uri VARBINARY(200), + lastmodified INT(11) UNSIGNED, + etag VARBINARY(32), + size INT(11) UNSIGNED NOT NULL + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" + ); + + $r3 = q("CREATE TABLE if not exists addressbookchanges ( + id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + uri VARBINARY(200) NOT NULL, + synctoken INT(11) UNSIGNED NOT NULL, + addressbookid INT(11) UNSIGNED NOT NULL, + operation TINYINT(1) NOT NULL, + INDEX addressbookid_synctoken (addressbookid, synctoken) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" + ); + + $r4 = q("CREATE TABLE if not exists calendarobjects ( + id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + calendardata MEDIUMBLOB, + uri VARBINARY(200), + calendarid INTEGER UNSIGNED NOT NULL, + lastmodified INT(11) UNSIGNED, + etag VARBINARY(32), + size INT(11) UNSIGNED NOT NULL, + componenttype VARBINARY(8), + firstoccurence INT(11) UNSIGNED, + lastoccurence INT(11) UNSIGNED, + uid VARBINARY(200), + UNIQUE(calendarid, uri), + INDEX calendarid_time (calendarid, firstoccurence) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" + ); + + $r5 = q("CREATE TABLE if not exists calendars ( + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + synctoken INTEGER UNSIGNED NOT NULL DEFAULT '1', + components VARBINARY(21) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" + ); + + $r6 = q("CREATE TABLE if not exists calendarinstances ( + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + calendarid INTEGER UNSIGNED NOT NULL, + principaluri VARBINARY(100), + access TINYINT(1) NOT NULL DEFAULT '1' COMMENT '1 = owner, 2 = read, 3 = readwrite', + displayname VARCHAR(100), + uri VARBINARY(200), + description TEXT, + calendarorder INT(11) UNSIGNED NOT NULL DEFAULT '0', + calendarcolor VARBINARY(10), + timezone TEXT, + transparent TINYINT(1) NOT NULL DEFAULT '0', + share_href VARBINARY(100), + share_displayname VARCHAR(100), + share_invitestatus TINYINT(1) NOT NULL DEFAULT '2' COMMENT '1 = noresponse, 2 = accepted, 3 = declined, 4 = invalid', + UNIQUE(principaluri, uri), + UNIQUE(calendarid, principaluri), + UNIQUE(calendarid, share_href) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" + ); + + $r7 = q("CREATE TABLE if not exists calendarchanges ( + id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + uri VARBINARY(200) NOT NULL, + synctoken INT(11) UNSIGNED NOT NULL, + calendarid INT(11) UNSIGNED NOT NULL, + operation TINYINT(1) NOT NULL, + INDEX calendarid_synctoken (calendarid, synctoken) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" + ); + + $r8 = q("CREATE TABLE if not exists calendarsubscriptions ( + id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + uri VARBINARY(200) NOT NULL, + principaluri VARBINARY(100) NOT NULL, + source TEXT, + displayname VARCHAR(100), + refreshrate VARCHAR(10), + calendarorder INT(11) UNSIGNED NOT NULL DEFAULT '0', + calendarcolor VARBINARY(10), + striptodos TINYINT(1) NULL, + stripalarms TINYINT(1) NULL, + stripattachments TINYINT(1) NULL, + lastmodified INT(11) UNSIGNED, + UNIQUE(principaluri, uri) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" + ); + + $r9 = q("CREATE TABLE if not exists schedulingobjects ( + id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + principaluri VARBINARY(255), + calendardata MEDIUMBLOB, + uri VARBINARY(200), + lastmodified INT(11) UNSIGNED, + etag VARBINARY(32), + size INT(11) UNSIGNED NOT NULL + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" + ); + + $r10 = q("CREATE TABLE if not exists locks ( + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + owner VARCHAR(100), + timeout INTEGER UNSIGNED, + created INTEGER, + token VARBINARY(100), + scope TINYINT, + depth TINYINT, + uri VARBINARY(1000), + INDEX(token), + INDEX(uri(100)) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" + ); + + $r11 = q("CREATE TABLE if not exists principals ( + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + uri VARBINARY(200) NOT NULL, + email VARBINARY(80), + displayname VARCHAR(80), + UNIQUE(uri) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" + ); + + $r12 = q("CREATE TABLE if not exists groupmembers ( + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + principal_id INTEGER UNSIGNED NOT NULL, + member_id INTEGER UNSIGNED NOT NULL, + UNIQUE(principal_id, member_id) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" + ); + + $r13 = q("CREATE TABLE if not exists propertystorage ( + id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + path VARBINARY(1024) NOT NULL, + name VARBINARY(100) NOT NULL, + valuetype INT UNSIGNED, + value MEDIUMBLOB + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" + ); + + $r14 = q("CREATE UNIQUE INDEX path_property ON propertystorage (path(600), name(100));"); + + $r15 = q("CREATE TABLE if not exists users ( + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + username VARBINARY(50), + digesta1 VARBINARY(32), + UNIQUE(username) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" + ); + + $r16 = q("CREATE TABLE if not exists calendarinstances ( + id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, + calendarid INTEGER UNSIGNED NOT NULL, + principaluri VARBINARY(100), + access TINYINT(1) NOT NULL DEFAULT '1' COMMENT '1 = owner, 2 = read, 3 = readwrite', + displayname VARCHAR(100), + uri VARBINARY(200), + description TEXT, + calendarorder INT(11) UNSIGNED NOT NULL DEFAULT '0', + calendarcolor VARBINARY(10), + timezone TEXT, + transparent TINYINT(1) NOT NULL DEFAULT '0', + share_href VARBINARY(100), + share_displayname VARCHAR(100), + share_invitestatus TINYINT(1) NOT NULL DEFAULT '2' COMMENT '1 = noresponse, 2 = accepted, 3 = declined, 4 = invalid', + UNIQUE(principaluri, uri), + UNIQUE(calendarid, principaluri), + UNIQUE(calendarid, share_href) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;" + ); + + if($r1 && $r2 && $r3 && $r4 && $r5 && $r6 && $r7 && $r8 && $r9 && $r10 && $r11 && $r12 && $r13 && $r14 && $r15 && $r16) + return UPDATE_SUCCESS; + return UPDATE_FAILED; + } } + + } diff --git a/util/hmessages.po b/util/hmessages.po index a11fbec7d..8cb0a2dec 100644 --- a/util/hmessages.po +++ b/util/hmessages.po @@ -1,14 +1,14 @@ -# red -# Copyright (C) 2012-2016 red -# This file is distributed under the same license as the red package. +# hubzilla +# Copyright (C) 2012-2016 hubzilla +# This file is distributed under the same license as the hubzilla package. # Mike Macgirvin, 2012 # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 5.3.1\n" +"Project-Id-Version: 2.5.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-05 20:52-0700\n" +"POT-Creation-Date: 2017-07-05 21:45-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -583,7 +583,7 @@ msgid "Membership on this site is by invitation only." msgstr "" #: ../../Zotlabs/Module/Register.php:268 ../../include/nav.php:147 -#: ../../boot.php:1573 +#: ../../boot.php:1572 msgid "Register" msgstr "" @@ -880,7 +880,7 @@ msgstr "" #: ../../extend/addon/addon/gitwiki/Mod_Gitwiki.php:166 #: ../../include/dir_fns.php:143 ../../include/dir_fns.php:144 #: ../../include/dir_fns.php:145 ../../view/theme/redbasic/php/config.php:100 -#: ../../view/theme/redbasic/php/config.php:115 ../../boot.php:1596 +#: ../../view/theme/redbasic/php/config.php:115 ../../boot.php:1595 msgid "No" msgstr "" @@ -943,7 +943,7 @@ msgstr "" #: ../../extend/addon/addon/gitwiki/Mod_Gitwiki.php:166 #: ../../include/dir_fns.php:143 ../../include/dir_fns.php:144 #: ../../include/dir_fns.php:145 ../../view/theme/redbasic/php/config.php:100 -#: ../../view/theme/redbasic/php/config.php:115 ../../boot.php:1596 +#: ../../view/theme/redbasic/php/config.php:115 ../../boot.php:1595 msgid "Yes" msgstr "" @@ -978,8 +978,8 @@ msgstr "" #: ../../Zotlabs/Module/Settings/Oauth.php:87 #: ../../Zotlabs/Module/Settings/Account.php:118 #: ../../Zotlabs/Module/Settings/Channel.php:476 +#: ../../Zotlabs/Module/Settings/Featured.php:50 #: ../../Zotlabs/Module/Settings/Display.php:203 -#: ../../Zotlabs/Module/Settings/Featured.php:52 #: ../../Zotlabs/Module/Settings/Tokens.php:168 #: ../../Zotlabs/Module/Settings/Permcats.php:110 #: ../../Zotlabs/Module/Thing.php:320 ../../Zotlabs/Module/Thing.php:370 @@ -5443,7 +5443,7 @@ msgid "" "Password reset failed." msgstr "" -#: ../../Zotlabs/Module/Lostpass.php:91 ../../boot.php:1600 +#: ../../Zotlabs/Module/Lostpass.php:91 ../../boot.php:1599 msgid "Password Reset" msgstr "" @@ -6590,6 +6590,30 @@ msgstr "" msgid "Start calendar week on Monday" msgstr "" +#: ../../Zotlabs/Module/Settings/Featured.php:20 +msgid "Affinity Slider settings updated." +msgstr "" + +#: ../../Zotlabs/Module/Settings/Featured.php:34 +msgid "No feature settings configured" +msgstr "" + +#: ../../Zotlabs/Module/Settings/Featured.php:41 +msgid "Default maximum affinity level" +msgstr "" + +#: ../../Zotlabs/Module/Settings/Featured.php:46 +msgid "Default minimum affinity level" +msgstr "" + +#: ../../Zotlabs/Module/Settings/Featured.php:50 +msgid "Affinity Slider Settings" +msgstr "" + +#: ../../Zotlabs/Module/Settings/Featured.php:60 +msgid "Feature/Addon Settings" +msgstr "" + #: ../../Zotlabs/Module/Settings/Display.php:145 msgid "No special theme for mobile devices" msgstr "" @@ -6703,30 +6727,6 @@ msgstr "" msgid "Grid page max height of content (in pixels)" msgstr "" -#: ../../Zotlabs/Module/Settings/Featured.php:21 -msgid "Affinity Slider settings updated." -msgstr "" - -#: ../../Zotlabs/Module/Settings/Featured.php:36 -msgid "No feature settings configured" -msgstr "" - -#: ../../Zotlabs/Module/Settings/Featured.php:43 -msgid "Default maximum affinity level" -msgstr "" - -#: ../../Zotlabs/Module/Settings/Featured.php:48 -msgid "Default minimum affinity level" -msgstr "" - -#: ../../Zotlabs/Module/Settings/Featured.php:52 -msgid "Affinity Slider Settings" -msgstr "" - -#: ../../Zotlabs/Module/Settings/Featured.php:62 -msgid "Feature/Addon Settings" -msgstr "" - #: ../../Zotlabs/Module/Settings/Tokens.php:31 #, php-format msgid "This channel is limited to %d tokens" @@ -7894,7 +7894,7 @@ msgid "Suggest Channels" msgstr "" #: ../../Zotlabs/Lib/Apps.php:221 ../../include/nav.php:115 -#: ../../boot.php:1592 +#: ../../boot.php:1591 msgid "Login" msgstr "" @@ -11251,7 +11251,7 @@ msgstr "" msgid "YYYY-MM-DD or MM-DD" msgstr "" -#: ../../include/datetime.php:286 ../../boot.php:2420 +#: ../../include/datetime.php:286 ../../boot.php:2419 msgid "never" msgstr "" @@ -11683,7 +11683,7 @@ msgstr "" msgid "Click to authenticate to your home hub" msgstr "" -#: ../../include/nav.php:101 ../../include/nav.php:125 ../../boot.php:1591 +#: ../../include/nav.php:101 ../../include/nav.php:125 ../../boot.php:1590 msgid "Logout" msgstr "" @@ -13350,44 +13350,44 @@ msgstr "" msgid "Set size of followup author photos" msgstr "" -#: ../../boot.php:1572 +#: ../../boot.php:1571 msgid "Create an account to access services and applications" msgstr "" -#: ../../boot.php:1594 +#: ../../boot.php:1593 msgid "Login/Email" msgstr "" -#: ../../boot.php:1595 +#: ../../boot.php:1594 msgid "Password" msgstr "" -#: ../../boot.php:1596 +#: ../../boot.php:1595 msgid "Remember me" msgstr "" -#: ../../boot.php:1599 +#: ../../boot.php:1598 msgid "Forgot your password?" msgstr "" -#: ../../boot.php:2137 +#: ../../boot.php:2136 msgid "toggle mobile" msgstr "" -#: ../../boot.php:2290 +#: ../../boot.php:2289 #, php-format msgid "[$Projectname] Website SSL error for %s" msgstr "" -#: ../../boot.php:2295 +#: ../../boot.php:2294 msgid "Website SSL certificate is not valid. Please correct." msgstr "" -#: ../../boot.php:2414 +#: ../../boot.php:2413 #, php-format msgid "[$Projectname] Cron tasks not running on %s" msgstr "" -#: ../../boot.php:2419 +#: ../../boot.php:2418 msgid "Cron/Scheduled tasks not running." msgstr "" diff --git a/view/css/conversation.css b/view/css/conversation.css index 08f23c4d0..d10e1e14e 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -77,7 +77,7 @@ /* conv_item */ .wall-item-head-new { - border-top: 0.2rem solid #0275d8; + border-top: 0.2rem solid #007bff; } .wall-item-info { @@ -168,11 +168,11 @@ a.wall-item-name-link { } .ivoted { - color: #0275d8; + color: #007bff; } .item-highlight { - border-left: 0.2rem solid #0275d8; + border-left: 0.2rem solid #007bff; } .item-highlight .wall-item-head, diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index ad8220028..e5a6eb0cd 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -80,7 +80,7 @@ if (! $nav_icon_colour) if (! $nav_active_icon_colour) $nav_active_icon_colour = 'rgba(255, 255, 255, 0.75)'; if (! $link_colour) - $link_colour = '#0275d8'; + $link_colour = '#007bff'; if (! $banner_colour) $banner_colour = '#fff'; if (! $bgcolour) |