[Mapbender-commits] r5157 - trunk/mapbender/resources/db/pgsql/UTF-8/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sat Dec 12 06:07:52 EST 2009


Author: verenadiewald
Date: 2009-12-12 06:07:52 -0500 (Sat, 12 Dec 2009)
New Revision: 5157

Added:
   trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.1_to_2.7rc1_pgsql_UTF-8.sql
Removed:
   trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.1_to_2.7rc1_pgsql_UTF-8.sql
   trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6_to_2.7rc1_pgsql_UTF-8.sql
Log:
renamed file update_2.6_to_2.7rc1_pgsql_UTF-8.sql

Deleted: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.1_to_2.7rc1_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.1_to_2.7rc1_pgsql_UTF-8.sql	2009-12-12 11:05:58 UTC (rev 5156)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.1_to_2.7rc1_pgsql_UTF-8.sql	2009-12-12 11:07:52 UTC (rev 5157)
@@ -1,641 +0,0 @@
--- remove event handlers, are now in the script
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'selArea1';
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'pan1';
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'featureInfo1';
-UPDATE gui_element SET e_content = '' WHERE e_id = 'navFrame';
-
-
---
--- new definition of addWMSfromfilteredList_ajax due to i18n
-UPDATE gui_element set e_attributes = '', e_js_file = 'mod_addWmsFromFilteredList_button.php' where e_id = 'addWMSfromfilteredList_ajax';
-
-
---
--- polish entries for translations table
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Pan', 'Przesuń');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Display complete map', 'Pokaż calą mapę');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Zoom in', 'Powiększ');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Zoom out', 'Pomniejsz');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Back', 'Wróć');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Forward', 'Do przodu');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Coordinates', 'Współrzędne');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Zoom by rectangle', 'Wybierz fragment mapy');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Redraw', 'Załaduj ponownie');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Query', 'Szukaj danych');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Logout', 'Wymelduj');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'WMS preferences', 'Ustawienia WMS');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Adding WMS from filtered list', 'Dodaj WMS z listy');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Set map center', 'Zaznacz środek mapy');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Help', 'Pomoc');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Show WMS infos', 'Informacje WMS');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Save workspace as web map context document', 'Zapisz widok jako web map context dokument');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Resize Mapsize', 'Zmień rozmiar mapy');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Rubber', 'Usuń szkic');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Get Area', 'Oblicz powierzchnię');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Close Polygon', 'Zamknij poligon');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Move back to your GUI list', 'Z powrotem do listy GUI');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Legend', 'Legenda');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Print', 'Drukuj');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Imprint', 'Imprint');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Maps', 'Mapy');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Search', 'Szukaj');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Meetingpoint', 'Miejsce spotkań');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Metadatasearch', 'Wyszukiwanie metadanych');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Adding WMS', 'Dodaj WMS');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Adding WMS from List', 'Dodaj WMS z listy');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Info', 'Informacja');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Change Projection', 'Zmień układ współrzędnych');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Copyright', 'Copyright');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Digitize', 'Dygitalizacja');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Overview', 'Mapa przeglądowa');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Drag Mapsize', 'Powiększ');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Mapframe', 'Okno mapy');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Navigation Frame', 'Pasek narzędzi');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Scale Select', 'Wybierz skalę');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Scale Text', 'Wpisz skalę');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Scalebar', 'Podziałka');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Set Background', 'Wybierz mapę tematyczną jako tło');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Zoom to Coordinates', 'Powiększ według współrzędnych');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Change Password', 'Zmień hasło');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Load a web map context document', 'Załaduj web map context dokument');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Logo', 'Logo');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Measure distance', 'Zmierz odległość');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Set language', 'Wybierz język');
-
-
---
--- update wfs conf module
-UPDATE gui_element SET
-e_attributes = 'href = "../php/mod_wfs_conf_client.php" target="AdminFrame"'
-WHERE e_id = 'wfs_conf' AND fkey_gui_id IN ('admin1', 'admin_de_services', 'admin_en_services');
-
-ALTER TABLE wfs_conf ADD COLUMN
-wfs_conf_type int4 NOT NULL DEFAULT 0;
---
--- new wfs conf columns
-ALTER TABLE wfs_conf_element ADD COLUMN
-f_helptext text;
-
-ALTER TABLE wfs_conf_element ADD COLUMN
-f_category_name varchar(255) NOT NULL DEFAULT '';
-
--- reload uses Mapbender API
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'reload';
-
--- init event is now triggered by jQuery
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'body';
-
--- mapframe layers are now added dynamically by the modules
-UPDATE gui_element SET e_content = '' WHERE e_id = 'mapframe1';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_log.js' WHERE e_id = 'log';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_resize_mapsize.js' WHERE e_id = 'resizeMapsize';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_sandclock.js' WHERE e_id = 'sandclock';
-
--- init event is now triggered by jQuery
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'zoomFull';
-
--- file extension is now .js
-UPDATE gui_element SET e_attributes = '', e_js_file = 'mod_zoomFull.js' WHERE e_id = 'zoomFull';
-
--- file extension is now .js
-UPDATE gui_element SET e_attributes = '', e_js_file = 'mod_repaint.js' WHERE e_id = 'repaint';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_changeEPSG.js' WHERE e_id = 'changeEPSG';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_scalebar.js' WHERE e_id = 'scalebar';
-
--- parameter: skip WMS request if current SRS is not supported
--- I'm not sure how to insert this dynamically into all applications that have either mapframe1 or overview
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui', 'mapframe1', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui1', 'mapframe1', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui2', 'mapframe1', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui_digitize', 'mapframe1', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui', 'overview', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui1', 'overview', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui2', 'overview', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui_digitize', 'overview', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
-
-
----------------------------------------------MONITORING BEGIN
--- Index: idx_mb_monitor_status
-
--- DROP INDEX idx_mb_monitor_status;
-
-CREATE INDEX idx_mb_monitor_status
-  ON mb_monitor
-  USING btree
-  (status);
-
--- Index: idx_mb_monitor_upload_id
-
--- DROP INDEX idx_mb_monitor_upload_id;
-
-CREATE INDEX idx_mb_monitor_upload_id
-  ON mb_monitor
-  USING btree
-  (upload_id);
-
-
--- Table: mb_wms_availability
-
--- DROP TABLE mb_wms_availability;
-
-CREATE TABLE mb_wms_availability
-(
-  fkey_wms_id integer,
-  fkey_upload_id character varying,
-  last_status integer,
-  availability real,
-  image integer,
-  status_comment character varying,
-  average_resp_time real,
-  upload_url character varying,
-  map_url character varying,
-  CONSTRAINT mb_wms_availability_fkey_wms_id_wms_id FOREIGN KEY (fkey_wms_id)
-      REFERENCES wms (wms_id) MATCH SIMPLE
-      ON UPDATE CASCADE ON DELETE CASCADE
-)
-WITH OIDS;
-
--- Function: mb_monitor_after()
-
--- DROP FUNCTION mb_monitor_after();
-
-CREATE OR REPLACE FUNCTION mb_monitor_after()
-  RETURNS "trigger" AS
-$BODY$DECLARE
-   availability_new REAL;
-   average_res_cap REAL;
-   count_monitors REAL;
-    BEGIN
-     IF TG_OP = 'UPDATE' THEN
-
-     count_monitors := count(fkey_wms_id) from mb_monitor where fkey_wms_id=NEW.fkey_wms_id;
-      --the following should be adopted if the duration of storing is changed!!!
-      average_res_cap := ((select average_resp_time from mb_wms_availability where fkey_wms_id=NEW.fkey_wms_id)*count_monitors+(NEW.timestamp_end-NEW.timestamp_begin))/(count_monitors+1);
-
-     IF NEW.status > -1 THEN --service gives caps
-      availability_new := round(cast(((select availability from mb_wms_availability where fkey_wms_id=NEW.fkey_wms_id)*count_monitors + 100)/(count_monitors+1) as numeric),2);
-     ELSE --service has problems with caps
-      availability_new := round(cast(((select availability from mb_wms_availability where fkey_wms_id=NEW.fkey_wms_id)*count_monitors)/(count_monitors+1) as numeric),2);
-     END IF;
-
-      UPDATE mb_wms_availability SET average_resp_time=average_res_cap,last_status=NEW.status, availability=availability_new, image=NEW.image, status_comment=NEW.status_comment,upload_url=NEW.upload_url,map_url=NEW.map_url WHERE mb_wms_availability.fkey_wms_id=NEW.fkey_wms_id;
-      RETURN NEW;
-     END IF;
-     IF TG_OP = 'INSERT' THEN
-
-	IF (select count(fkey_wms_id) from mb_wms_availability where fkey_wms_id=NEW.fkey_wms_id) > 0  then -- service is not new
-			UPDATE mb_wms_availability set fkey_upload_id=NEW.upload_id,last_status=NEW.status,status_comment=NEW.status_comment,upload_url=NEW.upload_url where fkey_wms_id=NEW.fkey_wms_id;
-		else --service has not yet been monitored
-			INSERT INTO mb_wms_availability (fkey_upload_id,fkey_wms_id,last_status,status_comment,upload_url,map_url,average_resp_time,availability) VALUES (NEW.upload_id,NEW.fkey_wms_id,NEW.status,NEW.status_comment,NEW.upload_url::text,NEW.map_url,0,100);
-		end if;
-
-      RETURN NEW;
-     END IF;
-    END;
-$BODY$
-  LANGUAGE 'plpgsql' VOLATILE;
-
-
--- Trigger: mb_monitor_after on mb_monitor
-
--- DROP TRIGGER mb_monitor_after ON mb_monitor;
-
-CREATE TRIGGER mb_monitor_after
-  AFTER INSERT OR UPDATE
-  ON mb_monitor
-  FOR EACH ROW
-  EXECUTE PROCEDURE mb_monitor_after();
-
-
--- Table: mb_user_abo_ows
-
--- DROP TABLE mb_user_abo_ows;
-
-CREATE TABLE mb_user_abo_ows
-(
-  fkey_mb_user_id integer,
-  fkey_wms_id integer,
-  fkey_wfs_id integer,
-  CONSTRAINT mb_user_abo_ows_user_id_fkey FOREIGN KEY (fkey_mb_user_id)
-      REFERENCES mb_user (mb_user_id) MATCH SIMPLE
-      ON UPDATE CASCADE ON DELETE CASCADE,
-  CONSTRAINT mb_user_abo_ows_wfs_fkey FOREIGN KEY (fkey_wfs_id)
-      REFERENCES wfs (wfs_id) MATCH SIMPLE
-      ON UPDATE CASCADE ON DELETE CASCADE,
-  CONSTRAINT mb_user_abo_ows_wms_fkey FOREIGN KEY (fkey_wms_id)
-      REFERENCES wms (wms_id) MATCH SIMPLE
-      ON UPDATE CASCADE ON DELETE CASCADE
-)
-WITHOUT OIDS;
-
-
--- Index: idx_wms_id
-
--- DROP INDEX idx_wms_id;
-
-CREATE INDEX idx_wms_id
-  ON wms
-  USING btree
-  (wms_id);
-
-
-
--- add monitor subscriber notification to admin1
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin1','monitor_abo_show',2,1,'monitoring','Show subscriptions','a','','href = "../php/mod_abo_show.php?sessionID" target = "AdminFrame" ',8,1080,190,20,10,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Manage monitoring subscriptions','a','','','','AdminFrame','http://www.mapbender.org/');
-
--- add monitor results to admin1
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin1','monitor_results',2,1,'monitoring results','Monitoring results','a','','href = "../php/mod_monitorCapabilities_read.php?sessionID" target = "AdminFrame" ',8,1110,190,20,10,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','View monitoring results','a','','','','AdminFrame','http://www.mapbender.org/');
-
----------------------------------------------MONITORING END
-
----------------------------
--- OWS Proxy log
-CREATE TABLE mb_proxy_log (
-
-    proxy_log_timestamp timestamp default now(),
-    fkey_wms_id integer NOT NULL,
-    fkey_mb_user_id integer NOT NULL,
-    request varchar(4096),
-    pixel bigint,
-    price real
-
-)
-with oids;
-ALTER TABLE wms ADD COLUMN wms_proxylog integer;
-ALTER TABLE wms ALTER COLUMN wms_proxylog SET STORAGE PLAIN;
-ALTER TABLE wms ADD COLUMN wms_pricevolume integer;
-ALTER TABLE wms ALTER COLUMN wms_pricevolume SET STORAGE PLAIN;
----------------------------
-
----------------------------
--- http auth
-ALTER TABLE wms ADD COLUMN wms_username VARCHAR(255) NOT NULL DEFAULT '';
-ALTER TABLE wms ADD COLUMN wms_password VARCHAR(255) NOT NULL DEFAULT '';
-ALTER TABLE wms ADD COLUMN wms_auth_type VARCHAR(255) NOT NULL DEFAULT '';
-
--- Column: mb_user_digest
--- ALTER TABLE mb_user DROP COLUMN mb_user_digest;
-ALTER TABLE mb_user ADD COLUMN mb_user_digest text;
-ALTER TABLE mb_user ALTER COLUMN mb_user_digest SET STORAGE EXTENDED;
-
---Initial filling with empty strings
-UPDATE mb_user set mb_user_digest='';
-
---howto set up the http_auth digest hash
---update mb_user set mb_user_digest=md5(mb_user_name || ';' || mb_user_email || ':' || '<realm_name>' || ':' || 'password') where mb_user_id = <ID>;
-
----------------------------
--- http://www.mapbender.org/FeatureInfo#considerScalehints --
--- INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui', 'featureInfo1', 'considerScalehints', '0', '' ,'var');
--- INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'featureInfo1', 'considerScalehints', '0', '' ,'var');
--- INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui2', 'featureInfo1', 'considerScalehints', '0', '' ,'var');
--- INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui_digitize', 'featureInfo1', 'considerScalehints', '0', '' ,'var');
-
-
-------------------------------
--- greek updates for translations table
-update translations set msgstr = 'Περίγραμμα/Κορνίζα πλοήγησης' where msgid = 'Navigation Frame' and locale = 'gr';
-update translations set msgstr = 'Φόρτωση κειμένου διαδυκτιακού χάρτη' where msgid = 'Load a web map context document' and locale = 'gr';
-update translations set msgstr = 'Αποθήκευση χώρου εργασίας με μορφή κείμενου διαδυκτιακού χάρτη' where msgid = 'Save workspace as web map context document' and locale = 'gr';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_selArea.js' WHERE e_id = 'selArea1';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_zoomIn1.js' WHERE e_id = 'zoomIn1';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_overview.js' WHERE e_id = 'overview';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_zoomOut1.js' WHERE e_id = 'zoomOut1';
-
--- set white background to Mapframe1
-UPDATE gui_element set e_more_styles='overflow:hidden;background-color:#ffffff' where e_id='mapframe1';
-
--- background to overview
-UPDATE gui_element set e_more_styles='overflow:hidden;background-color:#ffffff' where e_id='overview';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_pan.js' WHERE e_id = 'pan1';
-
--- remove title tag of Mapframe1 because it's displayed  im Map
-UPDATE gui_element SET e_title='' WHERE e_id='mapframe1';
-
--- remove title tag of Mapframe1 because it's displayed  im Map
-UPDATE gui_element SET e_title='' WHERE e_id='overview';
-
--- resize admin frame in admin guis
-UPDATE gui_element SET e_width = 1000 WHERE e_id = 'AdminFrame';
-
-
--- CSW handling add CSW administration to admin2_de , admin2_en, admin1
--- admin2_en
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_en', 'headline_Configure_CSW', 3, 1, 'Catalog Management', 'Catalog Management', 'div', '', '', 5, 760, 193, 66, 2, '', ' Catalog Management', 'div', '', '', '', '', '');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_en', 'loadCSW', 3, 1, 'Add Catalog', 'Add Catalog', 'a', '', 'href = "../php/mod_loadCatalogCapabilities.php?sessionID" target = "AdminFrame" ', 8, 780, 190, 20, 5, '', 'Add Catalog', 'a', '', '', '', 'AdminFrame', 'http://www.mapbender.org/index.php/newGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_en', 'loadCSWGUI', 3, 1, 'Link Catalog to GUI', 'Link Catalog to GUI', 'a', '', 'href = "../php/mod_loadCatalogToGUI.php?sessionID" target = "AdminFrame" ', 8, 800, 190, 20, 5, '', 'Link Catalog to GUI', 'a', '', '', '', 'AdminFrame', 'http://www.mapbender.org/index.php/newGUI');
-
--- admin2_de
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_de', 'headline_Configure_CSW', 3, 1, 'Catalog Management', 'Catalog Management', 'div', '', '', 5, 760, 193, 66, 2, '', ' CSW Verwaltung', 'div', '', '', '', '', '');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_de', 'loadCSW', 3, 1, 'CSW laden', 'CSW laden', 'a', '', 'href = "../php/mod_loadCatalogCapabilities.php?sessionID" target = "AdminFrame" ', 8, 780, 190, 20, 5, '', 'Add Catalog', 'a', '', '', '', 'AdminFrame', 'http://www.mapbender.org/index.php/newGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_de', 'loadCSWGUI', 3, 1, 'CSW einer Applikation zuordnen', 'Link Catalog to GUI', 'a', '', 'href = "../php/mod_loadCatalogToGUI.php?sessionID" target = "AdminFrame" ', 8, 800, 190, 20, 5, '', 'Link Catalog to GUI', 'a', '', '', '', 'AdminFrame', 'http://www.mapbender.org/index.php/newGUI');
-
--- admin1
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin1','loadCSW',3,1,'Add Catalog','Add Catalog','a','','href = "../php/mod_loadCatalogCapabilities.php?sessionID" target = "AdminFrame" ',8,1140,190,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Add Catalog','a','','','','AdminFrame','http://www.mapbender.org/index.php/newGUI');
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin1','loadCSWGUI',3,1,'Link Catalog to GUI','Link Catalog to GUI','a','','href = "../php/mod_loadCatalogToGUI.php?sessionID" target = "AdminFrame" ',8,1160,190,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Link Catalog to GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/newGUI');
-
--- add CSW search to gui1
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','addCSW',2,1,'search via a CSW Client','Search CSW','img','../img/button_gray/csw_off.png','onclick=''var searchCSWPopup = new mb_popup({title:"Search Catalog",url:"../javascripts/mod_searchCSW_ajax.php?sessionID",width:720, height:600,left:20, top:20});searchCSWPopup.show()''  onmouseover=''this.src = this.src.replace(/_off/,"_over");''  onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Search Catalog"',925,60,24,24,1,'','','','mod_addCSW.php','mod_addWMSgeneralFunctions.js','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/AddCSW');
-
--- remove event handlers, are now in the script
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'resizeMapsize';
-
-
---
--- CSW Support - new Tables to build up CSW support
---
-CREATE TABLE cat
-(
-  cat_id serial NOT NULL, -- auto generated
-  cat_version character varying(50) NOT NULL DEFAULT ''::character varying, -- get from cat version from xml - service_type_version
-  --cat_name character varying(255), -- ows-service-id:title
-  cat_title character varying(255) NOT NULL DEFAULT ''::character varying, --ows-service-id:title
-  cat_abstract text, --ows-service-id:abstract
-  --cat_keywords do we need them? There maybe a special table? - cs:keywords - another table to hold kw
-  --UploadUrl
-  cat_upload_url character varying(255),
-  fees character varying(50), --servicetype-fees
-  accessconstraints text, -- servicetype-accessconstraints
-  --ServiceProvider
-  providername character varying(255),
-  providersite character varying(255),
-  --ServiceContact
-  individualname character varying(255),
-  positionname character varying(255),
-  --ContactInfo
-  voice character varying(255), -- Phone
-  facsimile character varying(255),
-  --Address
-  deliverypoint character varying(255),
-  city character varying(255),
-  administrativearea character varying(255),
-  postalcode character varying(255),
-  country character varying(255),
-  electronicmailaddress character varying(255),
-  --Whole Cap-doc
-  cat_getcapabilities_doc text,
-  --Information about Owner
-  cat_owner integer,
-  --Actuality
-  cat_timestamp integer
-);
-
-
-ALTER TABLE ONLY cat
-    ADD CONSTRAINT cat_pkey PRIMARY KEY (cat_id);
-
-CREATE TABLE cat_keyword (
-    fkey_cat_id integer NOT NULL,
-    fkey_keyword_id integer NOT NULL
-);
-
-ALTER TABLE ONLY cat_keyword
-    ADD CONSTRAINT pk_cat_keyword PRIMARY KEY (fkey_cat_id, fkey_keyword_id);
-
-ALTER TABLE ONLY cat_keyword
-    ADD CONSTRAINT fkey_keyword_id_fkey_cat_id FOREIGN KEY (fkey_keyword_id) REFERENCES keyword(keyword_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-ALTER TABLE ONLY cat_keyword
-    ADD CONSTRAINT fkey_cat_id_fkey_keyword_id FOREIGN KEY (fkey_cat_id) REFERENCES cat(cat_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
-CREATE TABLE gui_cat
-(
-  fkey_gui_id character varying(50) NOT NULL DEFAULT ''::character varying,
-  fkey_cat_id integer NOT NULL DEFAULT 0,
-  CONSTRAINT fkey_cat_gui_id FOREIGN KEY (fkey_gui_id)
-      REFERENCES gui (gui_id) MATCH SIMPLE
-      ON UPDATE CASCADE ON DELETE CASCADE,
-  CONSTRAINT fkey_cat_cat_id FOREIGN KEY (fkey_cat_id)
-      REFERENCES cat (cat_id) MATCH SIMPLE
-      ON UPDATE CASCADE ON DELETE CASCADE
-);
-
-CREATE TABLE cat_op_conf
-(
-  fk_cat_id integer NOT NULL,
-  param_name character varying(255) NOT NULL,
-  param_value text NOT NULL,
-  param_type character varying(255) NOT NULL,
-  CONSTRAINT pk_con_cat_op PRIMARY KEY (fk_cat_id, param_type, param_name, param_value),
-  CONSTRAINT fk_cat_conf_to_cat FOREIGN KEY (fk_cat_id)
-      REFERENCES cat (cat_id) MATCH SIMPLE
-      ON UPDATE CASCADE ON DELETE CASCADE
-);
-
--- remove obsolete src from treeGDE (no longer a frame)
-UPDATE gui_element SET e_src = '' WHERE e_id = 'treeGDE';
-
--- remove frameborder = 0 from treeGDE (no longer a frame)
-UPDATE gui_element SET e_attributes = 'onmouseover="this.style.zIndex=300;this.style.width=350;" onmouseout="this.style.zIndex=2;this.style.width=200"' WHERE e_id = 'treeGDE';
-
--- remove frameborder = 0 from switchLocale_noreload
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'switchLocale_noreload';
-
--- add title
-UPDATE gui_element SET e_content = '<select style="font-family: Arial, sans-serif; font-size:12" title="Set background" name="mod_setBackground_list" onchange="mod_setBackground_change(this)"><option value="0"></option></select>' WHERE e_id = 'setBackground';
-
--- remove nobr tag from mapbender
-UPDATE gui_element SET e_content = '<span>Ma</span><span style="color: blue;">P</span><span style="color: red;">b</span><span>ender</span><script type="text/javascript"> mb_registerSubFunctions("mod_mapbender()"); function mod_mapbender(){ document.getElementById("mapbender").style.left = parseInt(document.getElementById("mapframe1").style.left) + parseInt(document.getElementById("mapframe1").style.width) - 90; document.getElementById("mapbender").style.top = parseInt(document.getElementById("mapframe1").style.top) + parseInt(document.getElementById("mapframe1").style.height) -1; } </script>' WHERE e_id = 'mapbender';
-
--- correct URL encoding
-UPDATE gui_element SET e_attributes = E'onclick="printWindow = window.open(\'../print/mod_printPDF.php?target=mapframe1&amp;sessionID&amp;conf=printPDF_b.conf\',\'printWin\',\'width=260, height=380, resizable=yes\');printWindow.focus();"  onmouseover="this.src = this.src.replace(/_off/,\'_over\');" onmouseout="this.src = this.src.replace(/_over/, \'_off\');"' WHERE e_id = 'printPDF';
-
--- added mandatory action attribute
-UPDATE gui_element SET e_attributes = 'action="window.location.href"' WHERE e_id = 'setBackground';
-UPDATE gui_element SET e_attributes = 'action="window.location.href" onsubmit="return mod_scaleText()"' WHERE e_id = 'scaleText';
-UPDATE gui_element SET e_content = '<form id="form_switch_locale" action="window.location.href" name="form_switch_locale" target="parent"><select id="language" name="language" onchange="validate_locale()"></select></form>' WHERE e_id = 'switchLocale_noreload';
-
--- attributes only valid for printPDF button (img)
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'printPDF' AND e_element = 'iframe';
-
-
--- New NavFrame element-vars (color and hoverColor) see http://trac.osgeo.org/mapbender/ticket/540
-INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui','navFrame','backGroundColor','#c6ced6','set the background-color of the NavFrame' ,'php_var');
-INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui','navFrame','backGroundHoverColor','#9cacbc','set the background-hover-color of the NavFrame' ,'php_var');
-
-INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui1','navFrame','backGroundColor','#c6ced6','set the background-color of the NavFrame' ,'php_var');
-INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui1','navFrame','backGroundHoverColor','#9cacbc','set the background-hover-color of the NavFrame' ,'php_var');
-
-
-INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui2','navFrame','backGroundColor','#799FEB','set the background-color of the NavFrame' ,'php_var');
-INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui2','navFrame','backGroundHoverColor','#577dc9','set the background-hover-color of the NavFrame' ,'php_var');
-
-INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui_digitize','navFrame','backGroundColor','#c6ced6','set the background-color of the NavFrame' ,'php_var');
-INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui_digitize','navFrame','backGroundHoverColor','#9cacbc','set the background-hover-color of the NavFrame' ,'php_var');
-
-ALTER TABLE mb_user_wmc ADD COLUMN
-wmc_timestamp_create INTEGER;
-
-
-CREATE TABLE wmc_md_topic_category (
-    fkey_wmc_id character varying(20) NOT NULL,
-    fkey_md_topic_category_id integer NOT NULL
-);
-
-ALTER TABLE ONLY wmc_md_topic_category
-    ADD CONSTRAINT wmc_md_topic_category_fkey_wmc_id_fkey FOREIGN KEY (fkey_wmc_id) REFERENCES mb_user_wmc (wmc_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
--- jQuery UI
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','jq_ui',1,1,'The jQuery UI core','','','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','','../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.ui.core.js','','','');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'jq_ui', 'css', '../extensions/jquery-ui-1.7.2.custom/css/ui-lightness/jquery-ui-1.7.2.custom.css', '' ,'file/css');
-
--- jQuery datatables
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','jq_datatables',1,1,'Includes the jQuery plugin datatables, use like this
-$(selector).datatables(options)','','','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','../plugins/jq_datatables.js','../extensions/dataTables-1.5/media/js/jquery.dataTables.min.js','','','http://www.datatables.net/');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'jq_datatables', 'defaultCss', '../extensions/dataTables-1.5/media/css/demo_table_jui.css', '' ,'file/css');
-
--- jQuery UI tabs
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','jq_ui_tabs',5,1,'horizontal tabs from the jQuery UI framework','','','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','','../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.ui.tabs.js','','jq_ui','');
-
--- jQuery upload
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','jq_upload',1,1,'','','','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','','../plugins/jq_upload.js','','','');
-
--- jQuery CSS in Body
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'body', 'jquery_UI', '../extensions/jquery-ui-1.7.2.custom/css/ui-lightness/jquery-ui-1.7.2.custom.css', '' ,'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'body', 'jquery_datatables', '../extensions/dataTables-1.5/media/css/demo_table_jui.css', '' ,'file/css');
-
-ALTER TABLE mb_user_wmc ADD COLUMN
-wmc_public INTEGER NOT NULL DEFAULT 0;
-
--- loadwmc from session is now a php var. The initial WMC is only created when this is set to 1
-UPDATE gui_element_vars SET var_type = 'php_var' WHERE fkey_e_id = 'loadwmc' AND var_name = 'loadFromSession';
-
--- add jquery ui dialog to gui1
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','jq_ui_dialog',5,1,'Module to manage jQuery UI dialog windows with multiple options for customization.','','div','','',-1,-1,NULL ,NULL ,NULL ,'','','div','../plugins/jq_ui_dialog.js','../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.ui.dialog.js','','jq_ui','');
-
--- overwrite WMC documents if name and user are identical (0 == old behaviour, 1 == overwrite)
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'savewmc', 'overwrite', '0', '' ,'var');
-
-
--- add history to map object
-UPDATE gui_element SET e_mb_mod = '../../lib/history.js,map_obj.js,map.js,wms.js,wfs_obj.js,initWms.php' WHERE e_id = 'mapframe1' OR e_id = 'overview';
-
-ALTER TABLE mb_user_wmc
-		ADD COLUMN abstract TEXT,
-		ADD COLUMN srs CHARACTER VARYING,
-		ADD COLUMN minx DOUBLE PRECISION DEFAULT 0,
-		ADD COLUMN miny DOUBLE PRECISION DEFAULT 0,
-		ADD COLUMN maxx DOUBLE PRECISION DEFAULT 0,
-		ADD COLUMN maxy DOUBLE PRECISION DEFAULT 0;
-
-CREATE TABLE wmc_keyword (
-	fkey_keyword_id	INTEGER REFERENCES keyword(keyword_id) ON DELETE CASCADE ON UPDATE CASCADE,
-	fkey_wmc_id CHARACTER VARYING(20) REFERENCES mb_user_wmc(wmc_id) ON DELETE CASCADE ON UPDATE CASCADE
-);
-ALTER TABLE ONLY wmc_keyword
-     ADD CONSTRAINT pk_wmc_keyword PRIMARY KEY (fkey_wmc_id, fkey_keyword_id);
-
--- disable publish WMC and delete WMC for gui1
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'loadwmc', 'deleteWmc', '0', '' ,'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'loadwmc', 'publishWmc', '0', '' ,'var');
-
--- add publish WMC to admin1
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin1','wmcPublic',3,1,'Publish WMC','Publish WMC','a','','href = "../php/mod_wmc_publish.php?sessionID" target = "AdminFrame" ',8,1180,190,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Publish WMC','a','','','','AdminFrame','');
-
--- add required modules for loadwmc and savewmc
-UPDATE gui_element SET e_requires = 'jq_ui_dialog,jq_ui_tabs,jq_upload,jq_datatables' WHERE e_id = 'loadwmc';
-UPDATE gui_element SET e_requires = 'jq_ui_dialog' WHERE e_id = 'savewmc';
-
-
--- set new element vars for existing gui elements of non-standard guis
-
--- element var skipWmsIfSrsNotSupported for gui element mapframe1
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type)
-SELECT gui_element.fkey_gui_id, 'mapframe1', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var'
-FROM gui_element WHERE gui_element.e_id = 'mapframe1' AND gui_element.fkey_gui_id
-NOT IN (SELECT fkey_gui_id FROM gui_element_vars
-WHERE var_name = 'skipWmsIfSrsNotSupported' AND fkey_e_id = 'mapframe1');
-
--- element var skipWmsIfSrsNotSupported for gui element overview
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type)
-SELECT gui_element.fkey_gui_id, 'overview', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var'
-FROM gui_element WHERE gui_element.e_id = 'overview' AND gui_element.fkey_gui_id
-NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'skipWmsIfSrsNotSupported'
-AND fkey_e_id = 'overview');
-
--- element var backGroundColor for gui element navFrame
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type)
-SELECT gui_element.fkey_gui_id, 'navFrame','backGroundColor','#c6ced6','set the background-color of the NavFrame' ,'php_var'
-FROM gui_element WHERE gui_element.e_id = 'navFrame' AND gui_element.fkey_gui_id
-NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'backGroundColor'
-AND fkey_e_id = 'navFrame');
-
--- element var backGroundHoverColor for gui element navFrame
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type)
-SELECT gui_element.fkey_gui_id, 'navFrame','backGroundHoverColor','#9cacbc','set the background-hover-color of the NavFrame' ,'php_var'
-FROM gui_element WHERE gui_element.e_id = 'navFrame' AND gui_element.fkey_gui_id
-NOT IN (SELECT fkey_gui_id FROM gui_element_vars
-WHERE var_name = 'backGroundHoverColor' AND fkey_e_id = 'navFrame');
-
--- element var overwrite for gui element savewmc
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type)
-SELECT gui_element.fkey_gui_id, 'savewmc', 'overwrite', '0', '' ,'var'
-FROM gui_element WHERE gui_element.e_id = 'savewmc' AND gui_element.fkey_gui_id
-NOT IN (SELECT fkey_gui_id FROM gui_element_vars
-WHERE var_name = 'overwrite' AND fkey_e_id = 'savewmc');
-
--- element var deleteWmc for gui element loadwmc
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type)
-SELECT gui_element.fkey_gui_id, 'loadwmc', 'deleteWmc', '0', '' ,'var'
-FROM gui_element WHERE gui_element.e_id = 'loadwmc'
-AND gui_element.fkey_gui_id
-NOT IN (SELECT fkey_gui_id FROM gui_element_vars
-WHERE var_name = 'deleteWmc' AND fkey_e_id = 'loadwmc');
-
--- element var publishWmc for gui element loadwmc
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type)
-SELECT gui_element.fkey_gui_id, 'loadwmc', 'publishWmc', '0', '' ,'var' FROM gui_element
-WHERE gui_element.e_id = 'loadwmc' AND gui_element.fkey_gui_id
-NOT IN (SELECT fkey_gui_id FROM gui_element_vars
-WHERE var_name = 'publishWmc' AND fkey_e_id = 'loadwmc');
-
--- element var switchwms for gui element treeGDE
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type)
-SELECT gui_element.fkey_gui_id, 'treeGDE', 'switchwms', 'true', 'enables/disables all layer of a wms' ,'var'
-FROM gui_element WHERE gui_element.e_id = 'treeGDE' AND gui_element.fkey_gui_id
-NOT IN (SELECT fkey_gui_id FROM gui_element_vars
-WHERE var_name = 'switchwms' AND fkey_e_id = 'treeGDE');
-
-
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url)
-SELECT DISTINCT fkey_gui_id,'i18n',1,1,'Internationalization module, collects data from all elements and sends them to the server in a single POST request. The strings are translated via gettext only.','Internationalization','div','','','','','div','../plugins/mb_i18n.js','','','','http://www.mapbender.org/Gettext'
-FROM gui_element WHERE gui_element.fkey_gui_id
-NOT IN (SELECT fkey_gui_id FROM gui_element WHERE e_id = 'i18n');
-
--- increase fields for wfs featuretype attributes name
-ALTER TABLE wfs_element ALTER COLUMN element_name TYPE VARCHAR(255);
-
-
--- add georss in gui1
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','addGeoRSS',2,1,'add a GeoRSS Feed to a running application','','img','../img/georss_logo_off.png','onclick=''loadGeoRSSByForm()''  onmouseover=''this.src = this.src.replace(/_off/,"_over");''  onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="GeoRSSFeed hinzuladen"',950,60,24,24,1,'','','','mod_georss.php','popupballon.js,usemap.js,geometry.js,../extensions/wz_jsgraphics.js','mapframe1','','');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'addGeoRSS', 'loadGeorssFromSession', '1', '' ,'php_var');
-
--- element var initializeOnLoad for gazetteerWFS
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'gazetteerWFS', 'initializeOnLoad', '0', 'start gazetteer onload' ,'var' FROM gui_element WHERE gui_element.e_id = 'gazetteerWFS' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'initializeOnLoad' AND fkey_e_id = 'gazetteerWFS');
-
--- element var enableSearchWithoutParams for gazetteerWFS
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'gazetteerWFS', 'enableSearchWithoutParams', '0', 'define that search can be started without any search params' ,'var' FROM gui_element WHERE gui_element.e_id = 'gazetteerWFS' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'enableSearchWithoutParams' AND fkey_e_id = 'gazetteerWFS');
-
-
-UPDATE gui_element SET e_js_file = '../plugins/mb_selectMapsize.js', e_attributes = '' WHERE e_id = 'selectMapsize';
\ No newline at end of file

Copied: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.1_to_2.7rc1_pgsql_UTF-8.sql (from rev 5154, trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6_to_2.7rc1_pgsql_UTF-8.sql)
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.1_to_2.7rc1_pgsql_UTF-8.sql	                        (rev 0)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6.1_to_2.7rc1_pgsql_UTF-8.sql	2009-12-12 11:07:52 UTC (rev 5157)
@@ -0,0 +1,659 @@
+-- remove event handlers, are now in the script
+UPDATE gui_element SET e_attributes = '' WHERE e_id = 'selArea1';
+UPDATE gui_element SET e_attributes = '' WHERE e_id = 'pan1';
+UPDATE gui_element SET e_attributes = '' WHERE e_id = 'featureInfo1';
+UPDATE gui_element SET e_content = '' WHERE e_id = 'navFrame';
+
+
+-- 
+-- new definition of addWMSfromfilteredList_ajax due to i18n
+UPDATE gui_element set e_attributes = '', e_js_file = 'mod_addWmsFromFilteredList_button.php' where e_id = 'addWMSfromfilteredList_ajax';
+
+
+-- 
+-- polish entries for translations table
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Pan', 'Przesuń');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Display complete map', 'Pokaż calą mapę');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Zoom in', 'Powiększ');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Zoom out', 'Pomniejsz');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Back', 'Wróć');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Forward', 'Do przodu');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Coordinates', 'Współrzędne');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Zoom by rectangle', 'Wybierz fragment mapy');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Redraw', 'Załaduj ponownie');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Query', 'Szukaj danych');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Logout', 'Wymelduj');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'WMS preferences', 'Ustawienia WMS');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Adding WMS from filtered list', 'Dodaj WMS z listy');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Set map center', 'Zaznacz środek mapy');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Help', 'Pomoc');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Show WMS infos', 'Informacje WMS');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Save workspace as web map context document', 'Zapisz widok jako web map context dokument');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Resize Mapsize', 'Zmień rozmiar mapy');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Rubber', 'Usuń szkic');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Get Area', 'Oblicz powierzchnię');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Close Polygon', 'Zamknij poligon');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Move back to your GUI list', 'Z powrotem do listy GUI');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Legend', 'Legenda');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Print', 'Drukuj');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Imprint', 'Imprint');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Maps', 'Mapy');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Search', 'Szukaj');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Meetingpoint', 'Miejsce spotkań');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Metadatasearch', 'Wyszukiwanie metadanych');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Adding WMS', 'Dodaj WMS');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Adding WMS from List', 'Dodaj WMS z listy');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Info', 'Informacja');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Change Projection', 'Zmień układ współrzędnych');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Copyright', 'Copyright');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Digitize', 'Dygitalizacja');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Overview', 'Mapa przeglądowa');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Drag Mapsize', 'Powiększ');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Mapframe', 'Okno mapy');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Navigation Frame', 'Pasek narzędzi');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Scale Select', 'Wybierz skalę');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Scale Text', 'Wpisz skalę');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Scalebar', 'Podziałka');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Set Background', 'Wybierz mapę tematyczną jako tło');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Zoom to Coordinates', 'Powiększ według współrzędnych');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Change Password', 'Zmień hasło');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Load a web map context document', 'Załaduj web map context dokument');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Logo', 'Logo');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Measure distance', 'Zmierz odległość');
+INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Set language', 'Wybierz język');
+
+
+--
+-- update wfs conf module
+UPDATE gui_element SET
+e_attributes = 'href = "../php/mod_wfs_conf_client.php" target="AdminFrame"'
+WHERE e_id = 'wfs_conf' AND fkey_gui_id IN ('admin1', 'admin_de_services', 'admin_en_services');
+
+ALTER TABLE wfs_conf ADD COLUMN
+wfs_conf_type int4 NOT NULL DEFAULT 0;
+--
+-- new wfs conf columns
+ALTER TABLE wfs_conf_element ADD COLUMN
+f_helptext text;
+
+ALTER TABLE wfs_conf_element ADD COLUMN
+f_category_name varchar(255) NOT NULL DEFAULT '';
+
+-- reload uses Mapbender API
+UPDATE gui_element SET e_attributes = '' WHERE e_id = 'reload';
+
+-- init event is now triggered by jQuery
+UPDATE gui_element SET e_attributes = '' WHERE e_id = 'body';
+
+-- mapframe layers are now added dynamically by the modules
+UPDATE gui_element SET e_content = '' WHERE e_id = 'mapframe1';
+
+-- file extension is now .js
+UPDATE gui_element SET e_js_file = 'mod_log.js' WHERE e_id = 'log';
+
+-- file extension is now .js
+UPDATE gui_element SET e_js_file = 'mod_resize_mapsize.js' WHERE e_id = 'resizeMapsize';
+
+-- file extension is now .js
+UPDATE gui_element SET e_js_file = 'mod_sandclock.js' WHERE e_id = 'sandclock';
+
+-- init event is now triggered by jQuery
+UPDATE gui_element SET e_attributes = '' WHERE e_id = 'zoomFull';
+
+-- file extension is now .js
+UPDATE gui_element SET e_attributes = '', e_js_file = 'mod_zoomFull.js' WHERE e_id = 'zoomFull';
+
+-- file extension is now .js
+UPDATE gui_element SET e_attributes = '', e_js_file = 'mod_repaint.js' WHERE e_id = 'repaint';
+
+-- file extension is now .js
+UPDATE gui_element SET e_js_file = 'mod_changeEPSG.js' WHERE e_id = 'changeEPSG';
+
+-- file extension is now .js
+UPDATE gui_element SET e_js_file = 'mod_scalebar.js' WHERE e_id = 'scalebar';
+
+-- parameter: skip WMS request if current SRS is not supported
+-- I'm not sure how to insert this dynamically into all applications that have either mapframe1 or overview
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui', 'mapframe1', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui1', 'mapframe1', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui2', 'mapframe1', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui_digitize', 'mapframe1', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui', 'overview', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui1', 'overview', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui2', 'overview', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui_digitize', 'overview', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
+
+
+---------------------------------------------MONITORING BEGIN
+-- Index: idx_mb_monitor_status
+
+-- DROP INDEX idx_mb_monitor_status;
+
+CREATE INDEX idx_mb_monitor_status
+  ON mb_monitor
+  USING btree
+  (status);
+
+-- Index: idx_mb_monitor_upload_id
+
+-- DROP INDEX idx_mb_monitor_upload_id;
+
+CREATE INDEX idx_mb_monitor_upload_id
+  ON mb_monitor
+  USING btree
+  (upload_id);
+
+
+-- Table: mb_wms_availability
+
+-- DROP TABLE mb_wms_availability;
+
+CREATE TABLE mb_wms_availability
+(
+  fkey_wms_id integer,
+  fkey_upload_id character varying,
+  last_status integer,
+  availability real,
+  image integer,
+  status_comment character varying,
+  average_resp_time real,
+  upload_url character varying,
+  map_url character varying,
+  CONSTRAINT mb_wms_availability_fkey_wms_id_wms_id FOREIGN KEY (fkey_wms_id)
+      REFERENCES wms (wms_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE
+)
+WITH OIDS;
+
+-- Function: mb_monitor_after()
+
+-- DROP FUNCTION mb_monitor_after();
+
+CREATE OR REPLACE FUNCTION mb_monitor_after()
+  RETURNS "trigger" AS
+$BODY$DECLARE
+   availability_new REAL;
+   average_res_cap REAL;
+   count_monitors REAL;
+    BEGIN
+     IF TG_OP = 'UPDATE' THEN
+     
+     count_monitors := count(fkey_wms_id) from mb_monitor where fkey_wms_id=NEW.fkey_wms_id;
+      --the following should be adopted if the duration of storing is changed!!!
+      average_res_cap := ((select average_resp_time from mb_wms_availability where fkey_wms_id=NEW.fkey_wms_id)*count_monitors+(NEW.timestamp_end-NEW.timestamp_begin))/(count_monitors+1);
+
+     IF NEW.status > -1 THEN --service gives caps
+      availability_new := round(cast(((select availability from mb_wms_availability where fkey_wms_id=NEW.fkey_wms_id)*count_monitors + 100)/(count_monitors+1) as numeric),2);
+     ELSE --service has problems with caps
+      availability_new := round(cast(((select availability from mb_wms_availability where fkey_wms_id=NEW.fkey_wms_id)*count_monitors)/(count_monitors+1) as numeric),2);
+     END IF;
+
+      UPDATE mb_wms_availability SET average_resp_time=average_res_cap,last_status=NEW.status, availability=availability_new, image=NEW.image, status_comment=NEW.status_comment,upload_url=NEW.upload_url,map_url=NEW.map_url WHERE mb_wms_availability.fkey_wms_id=NEW.fkey_wms_id;
+      RETURN NEW;
+     END IF;
+     IF TG_OP = 'INSERT' THEN
+
+	IF (select count(fkey_wms_id) from mb_wms_availability where fkey_wms_id=NEW.fkey_wms_id) > 0  then -- service is not new
+			UPDATE mb_wms_availability set fkey_upload_id=NEW.upload_id,last_status=NEW.status,status_comment=NEW.status_comment,upload_url=NEW.upload_url where fkey_wms_id=NEW.fkey_wms_id;
+		else --service has not yet been monitored
+			INSERT INTO mb_wms_availability (fkey_upload_id,fkey_wms_id,last_status,status_comment,upload_url,map_url,average_resp_time,availability) VALUES (NEW.upload_id,NEW.fkey_wms_id,NEW.status,NEW.status_comment,NEW.upload_url::text,NEW.map_url,0,100);
+		end if;
+
+      RETURN NEW;
+     END IF;
+    END;
+$BODY$
+  LANGUAGE 'plpgsql' VOLATILE;
+
+
+-- Trigger: mb_monitor_after on mb_monitor
+
+-- DROP TRIGGER mb_monitor_after ON mb_monitor;
+
+CREATE TRIGGER mb_monitor_after
+  AFTER INSERT OR UPDATE
+  ON mb_monitor
+  FOR EACH ROW
+  EXECUTE PROCEDURE mb_monitor_after();
+
+
+-- Table: mb_user_abo_ows
+
+-- DROP TABLE mb_user_abo_ows;
+
+CREATE TABLE mb_user_abo_ows
+(
+  fkey_mb_user_id integer,
+  fkey_wms_id integer,
+  fkey_wfs_id integer,
+  CONSTRAINT mb_user_abo_ows_user_id_fkey FOREIGN KEY (fkey_mb_user_id)
+      REFERENCES mb_user (mb_user_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE,
+  CONSTRAINT mb_user_abo_ows_wfs_fkey FOREIGN KEY (fkey_wfs_id)
+      REFERENCES wfs (wfs_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE,
+  CONSTRAINT mb_user_abo_ows_wms_fkey FOREIGN KEY (fkey_wms_id)
+      REFERENCES wms (wms_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE
+)
+WITHOUT OIDS;  
+
+  
+-- Index: idx_wms_id
+
+-- DROP INDEX idx_wms_id;
+
+CREATE INDEX idx_wms_id
+  ON wms
+  USING btree
+  (wms_id);
+  
+
+
+-- add monitor subscriber notification to admin1
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin1','monitor_abo_show',2,1,'monitoring','Show subscriptions','a','','href = "../php/mod_abo_show.php?sessionID" target = "AdminFrame" ',8,1080,190,20,10,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Manage monitoring subscriptions','a','','','','AdminFrame','http://www.mapbender.org/');
+
+-- add monitor results to admin1
+INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin1','monitor_results',2,1,'monitoring results','Monitoring results','a','','href = "../php/mod_monitorCapabilities_read.php?sessionID" target = "AdminFrame" ',8,1110,190,20,10,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','View monitoring results','a','','','','AdminFrame','http://www.mapbender.org/');
+
+---------------------------------------------MONITORING END
+
+---------------------------
+-- OWS Proxy log
+CREATE TABLE mb_proxy_log (
+    
+    proxy_log_timestamp timestamp default now(),
+    fkey_wms_id integer NOT NULL,
+    fkey_mb_user_id integer NOT NULL,
+    request varchar(4096),
+    pixel bigint,
+    price real
+    
+)
+with oids;
+ALTER TABLE wms ADD COLUMN wms_proxylog integer;
+ALTER TABLE wms ALTER COLUMN wms_proxylog SET STORAGE PLAIN;
+ALTER TABLE wms ADD COLUMN wms_pricevolume integer;
+ALTER TABLE wms ALTER COLUMN wms_pricevolume SET STORAGE PLAIN;
+---------------------------
+
+---------------------------
+-- http auth
+ALTER TABLE wms ADD COLUMN wms_username VARCHAR(255) NOT NULL DEFAULT '';
+ALTER TABLE wms ADD COLUMN wms_password VARCHAR(255) NOT NULL DEFAULT '';
+ALTER TABLE wms ADD COLUMN wms_auth_type VARCHAR(255) NOT NULL DEFAULT '';
+
+-- Column: mb_user_digest
+-- ALTER TABLE mb_user DROP COLUMN mb_user_digest;
+ALTER TABLE mb_user ADD COLUMN mb_user_digest text;
+ALTER TABLE mb_user ALTER COLUMN mb_user_digest SET STORAGE EXTENDED;
+
+--Initial filling with empty strings
+UPDATE mb_user set mb_user_digest='';
+
+--howto set up the http_auth digest hash
+--update mb_user set mb_user_digest=md5(mb_user_name || ';' || mb_user_email || ':' || '<realm_name>' || ':' || 'password') where mb_user_id = <ID>;
+ 
+---------------------------
+-- http://www.mapbender.org/FeatureInfo#considerScalehints --
+-- INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui', 'featureInfo1', 'considerScalehints', '0', '' ,'var');
+-- INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'featureInfo1', 'considerScalehints', '0', '' ,'var');
+-- INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui2', 'featureInfo1', 'considerScalehints', '0', '' ,'var'); 
+-- INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui_digitize', 'featureInfo1', 'considerScalehints', '0', '' ,'var');
+
+
+------------------------------
+-- greek updates for translations table
+update translations set msgstr = 'Περίγραμμα/Κορνίζα πλοήγησης' where msgid = 'Navigation Frame' and locale = 'gr';
+update translations set msgstr = 'Φόρτωση κειμένου διαδυκτιακού χάρτη' where msgid = 'Load a web map context document' and locale = 'gr';
+update translations set msgstr = 'Αποθήκευση χώρου εργασίας με μορφή κείμενου διαδυκτιακού χάρτη' where msgid = 'Save workspace as web map context document' and locale = 'gr';
+
+-- file extension is now .js
+UPDATE gui_element SET e_js_file = 'mod_selArea.js' WHERE e_id = 'selArea1';
+
+-- file extension is now .js
+UPDATE gui_element SET e_js_file = 'mod_zoomIn1.js' WHERE e_id = 'zoomIn1';
+
+-- file extension is now .js
+UPDATE gui_element SET e_js_file = 'mod_overview.js' WHERE e_id = 'overview';
+
+-- file extension is now .js
+UPDATE gui_element SET e_js_file = 'mod_zoomOut1.js' WHERE e_id = 'zoomOut1';
+
+-- set white background to Mapframe1
+UPDATE gui_element set e_more_styles='overflow:hidden;background-color:#ffffff' where e_id='mapframe1'; 
+
+-- background to overview
+UPDATE gui_element set e_more_styles='overflow:hidden;background-color:#ffffff' where e_id='overview'; 
+
+-- file extension is now .js
+UPDATE gui_element SET e_js_file = 'mod_pan.js' WHERE e_id = 'pan1';
+
+-- remove title tag of Mapframe1 because it's displayed  im Map
+UPDATE gui_element SET e_title='' WHERE e_id='mapframe1';
+
+-- remove title tag of Mapframe1 because it's displayed  im Map
+UPDATE gui_element SET e_title='' WHERE e_id='overview';
+
+-- resize admin frame in admin guis
+UPDATE gui_element SET e_width = 1000 WHERE e_id = 'AdminFrame';
+
+
+-- CSW handling add CSW administration to admin2_de , admin2_en, admin1
+-- admin2_en
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_en', 'headline_Configure_CSW', 3, 1, 'Catalog Management', 'Catalog Management', 'div', '', '', 5, 760, 193, 66, 2, '', ' Catalog Management', 'div', '', '', '', '', '');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_en', 'loadCSW', 3, 1, 'Add Catalog', 'Add Catalog', 'a', '', 'href = "../php/mod_loadCatalogCapabilities.php?sessionID" target = "AdminFrame" ', 8, 780, 190, 20, 5, '', 'Add Catalog', 'a', '', '', '', 'AdminFrame', 'http://www.mapbender.org/index.php/newGUI');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_en', 'loadCSWGUI', 3, 1, 'Link Catalog to GUI', 'Link Catalog to GUI', 'a', '', 'href = "../php/mod_loadCatalogToGUI.php?sessionID" target = "AdminFrame" ', 8, 800, 190, 20, 5, '', 'Link Catalog to GUI', 'a', '', '', '', 'AdminFrame', 'http://www.mapbender.org/index.php/newGUI');
+
+-- admin2_de
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_de', 'headline_Configure_CSW', 3, 1, 'Catalog Management', 'Catalog Management', 'div', '', '', 5, 760, 193, 66, 2, '', ' CSW Verwaltung', 'div', '', '', '', '', '');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_de', 'loadCSW', 3, 1, 'CSW laden', 'CSW laden', 'a', '', 'href = "../php/mod_loadCatalogCapabilities.php?sessionID" target = "AdminFrame" ', 8, 780, 190, 20, 5, '', 'Add Catalog', 'a', '', '', '', 'AdminFrame', 'http://www.mapbender.org/index.php/newGUI');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_de', 'loadCSWGUI', 3, 1, 'CSW einer Applikation zuordnen', 'Link Catalog to GUI', 'a', '', 'href = "../php/mod_loadCatalogToGUI.php?sessionID" target = "AdminFrame" ', 8, 800, 190, 20, 5, '', 'Link Catalog to GUI', 'a', '', '', '', 'AdminFrame', 'http://www.mapbender.org/index.php/newGUI');
+
+-- admin1
+INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin1','loadCSW',3,1,'Add Catalog','Add Catalog','a','','href = "../php/mod_loadCatalogCapabilities.php?sessionID" target = "AdminFrame" ',8,1140,190,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Add Catalog','a','','','','AdminFrame','http://www.mapbender.org/index.php/newGUI');
+INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin1','loadCSWGUI',3,1,'Link Catalog to GUI','Link Catalog to GUI','a','','href = "../php/mod_loadCatalogToGUI.php?sessionID" target = "AdminFrame" ',8,1160,190,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Link Catalog to GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/newGUI');
+
+-- add CSW search to gui1
+INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','addCSW',2,1,'search via a CSW Client','Search CSW','img','../img/button_gray/csw_off.png','onclick=''var searchCSWPopup = new mb_popup({title:"Search Catalog",url:"../javascripts/mod_searchCSW_ajax.php?sessionID",width:720, height:600,left:20, top:20});searchCSWPopup.show()''  onmouseover=''this.src = this.src.replace(/_off/,"_over");''  onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Search Catalog"',925,60,24,24,1,'','','','mod_addCSW.php','mod_addWMSgeneralFunctions.js','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/AddCSW');
+
+-- remove event handlers, are now in the script
+UPDATE gui_element SET e_attributes = '' WHERE e_id = 'resizeMapsize';
+
+
+--
+-- CSW Support - new Tables to build up CSW support
+-- 
+CREATE TABLE cat
+(
+  cat_id serial NOT NULL, -- auto generated
+  cat_version character varying(50) NOT NULL DEFAULT ''::character varying, -- get from cat version from xml - service_type_version
+  --cat_name character varying(255), -- ows-service-id:title
+  cat_title character varying(255) NOT NULL DEFAULT ''::character varying, --ows-service-id:title
+  cat_abstract text, --ows-service-id:abstract
+  --cat_keywords do we need them? There maybe a special table? - cs:keywords - another table to hold kw
+  --UploadUrl
+  cat_upload_url character varying(255),
+  fees character varying(50), --servicetype-fees
+  accessconstraints text, -- servicetype-accessconstraints
+  --ServiceProvider 
+  providername character varying(255),
+  providersite character varying(255),
+  --ServiceContact
+  individualname character varying(255),
+  positionname character varying(255),
+  --ContactInfo
+  voice character varying(255), -- Phone
+  facsimile character varying(255),
+  --Address
+  deliverypoint character varying(255),
+  city character varying(255),
+  administrativearea character varying(255),
+  postalcode character varying(255),
+  country character varying(255),
+  electronicmailaddress character varying(255),
+  --Whole Cap-doc
+  cat_getcapabilities_doc text,
+  --Information about Owner
+  cat_owner integer,
+  --Actuality
+  cat_timestamp integer
+);
+
+
+ALTER TABLE ONLY cat
+    ADD CONSTRAINT cat_pkey PRIMARY KEY (cat_id);
+
+CREATE TABLE cat_keyword (
+    fkey_cat_id integer NOT NULL,
+    fkey_keyword_id integer NOT NULL
+);
+
+ALTER TABLE ONLY cat_keyword
+    ADD CONSTRAINT pk_cat_keyword PRIMARY KEY (fkey_cat_id, fkey_keyword_id);
+
+ALTER TABLE ONLY cat_keyword
+    ADD CONSTRAINT fkey_keyword_id_fkey_cat_id FOREIGN KEY (fkey_keyword_id) REFERENCES keyword(keyword_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+ALTER TABLE ONLY cat_keyword
+    ADD CONSTRAINT fkey_cat_id_fkey_keyword_id FOREIGN KEY (fkey_cat_id) REFERENCES cat(cat_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+CREATE TABLE gui_cat
+(
+  fkey_gui_id character varying(50) NOT NULL DEFAULT ''::character varying,
+  fkey_cat_id integer NOT NULL DEFAULT 0,
+  CONSTRAINT fkey_cat_gui_id FOREIGN KEY (fkey_gui_id)
+      REFERENCES gui (gui_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE,
+  CONSTRAINT fkey_cat_cat_id FOREIGN KEY (fkey_cat_id)
+      REFERENCES cat (cat_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE
+);
+
+CREATE TABLE cat_op_conf
+(
+  fk_cat_id integer NOT NULL,
+  param_name character varying(255) NOT NULL,
+  param_value text NOT NULL,
+  param_type character varying(255) NOT NULL,
+  CONSTRAINT pk_con_cat_op PRIMARY KEY (fk_cat_id, param_type, param_name, param_value),
+  CONSTRAINT fk_cat_conf_to_cat FOREIGN KEY (fk_cat_id)
+      REFERENCES cat (cat_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE
+);
+
+-- remove obsolete src from treeGDE (no longer a frame)
+UPDATE gui_element SET e_src = '' WHERE e_id = 'treeGDE';
+
+-- remove frameborder = 0 from treeGDE (no longer a frame)
+UPDATE gui_element SET e_attributes = 'onmouseover="this.style.zIndex=300;this.style.width=350;" onmouseout="this.style.zIndex=2;this.style.width=200"' WHERE e_id = 'treeGDE';
+
+-- remove frameborder = 0 from switchLocale_noreload
+UPDATE gui_element SET e_attributes = '' WHERE e_id = 'switchLocale_noreload';
+
+-- add title
+UPDATE gui_element SET e_content = '<select style="font-family: Arial, sans-serif; font-size:12" title="Set background" name="mod_setBackground_list" onchange="mod_setBackground_change(this)"><option value="0"></option></select>' WHERE e_id = 'setBackground';
+
+-- remove nobr tag from mapbender
+UPDATE gui_element SET e_content = '<span>Ma</span><span style="color: blue;">P</span><span style="color: red;">b</span><span>ender</span><script type="text/javascript"> mb_registerSubFunctions("mod_mapbender()"); function mod_mapbender(){ document.getElementById("mapbender").style.left = parseInt(document.getElementById("mapframe1").style.left) + parseInt(document.getElementById("mapframe1").style.width) - 90; document.getElementById("mapbender").style.top = parseInt(document.getElementById("mapframe1").style.top) + parseInt(document.getElementById("mapframe1").style.height) -1; } </script>' WHERE e_id = 'mapbender';
+
+-- correct URL encoding
+UPDATE gui_element SET e_attributes = E'onclick="printWindow = window.open(\'../print/mod_printPDF.php?target=mapframe1&amp;sessionID&amp;conf=printPDF_b.conf\',\'printWin\',\'width=260, height=380, resizable=yes\');printWindow.focus();"  onmouseover="this.src = this.src.replace(/_off/,\'_over\');" onmouseout="this.src = this.src.replace(/_over/, \'_off\');"' WHERE e_id = 'printPDF';
+
+-- added mandatory action attribute
+UPDATE gui_element SET e_attributes = 'action="window.location.href"' WHERE e_id = 'setBackground';
+UPDATE gui_element SET e_attributes = 'action="window.location.href" onsubmit="return mod_scaleText()"' WHERE e_id = 'scaleText';
+UPDATE gui_element SET e_content = '<form id="form_switch_locale" action="window.location.href" name="form_switch_locale" target="parent"><select id="language" name="language" onchange="validate_locale()"></select></form>' WHERE e_id = 'switchLocale_noreload';
+
+-- attributes only valid for printPDF button (img)
+UPDATE gui_element SET e_attributes = '' WHERE e_id = 'printPDF' AND e_element = 'iframe';
+
+
+-- New NavFrame element-vars (color and hoverColor) see http://trac.osgeo.org/mapbender/ticket/540
+INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui','navFrame','backGroundColor','#c6ced6','set the background-color of the NavFrame' ,'php_var');
+INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui','navFrame','backGroundHoverColor','#9cacbc','set the background-hover-color of the NavFrame' ,'php_var');
+
+INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui1','navFrame','backGroundColor','#c6ced6','set the background-color of the NavFrame' ,'php_var');
+INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui1','navFrame','backGroundHoverColor','#9cacbc','set the background-hover-color of the NavFrame' ,'php_var');
+
+
+INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui2','navFrame','backGroundColor','#799FEB','set the background-color of the NavFrame' ,'php_var');
+INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui2','navFrame','backGroundHoverColor','#577dc9','set the background-hover-color of the NavFrame' ,'php_var');
+
+INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui_digitize','navFrame','backGroundColor','#c6ced6','set the background-color of the NavFrame' ,'php_var');
+INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui_digitize','navFrame','backGroundHoverColor','#9cacbc','set the background-hover-color of the NavFrame' ,'php_var');
+
+ALTER TABLE mb_user_wmc ADD COLUMN
+wmc_timestamp_create INTEGER;
+
+
+CREATE TABLE wmc_md_topic_category (
+    fkey_wmc_id character varying(20) NOT NULL,
+    fkey_md_topic_category_id integer NOT NULL
+);
+
+ALTER TABLE ONLY wmc_md_topic_category
+    ADD CONSTRAINT wmc_md_topic_category_fkey_wmc_id_fkey FOREIGN KEY (fkey_wmc_id) REFERENCES mb_user_wmc (wmc_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+-- jQuery UI
+INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','jq_ui',1,1,'The jQuery UI core','','','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','','../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.ui.core.js','','','');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'jq_ui', 'css', '../extensions/jquery-ui-1.7.2.custom/css/ui-lightness/jquery-ui-1.7.2.custom.css', '' ,'file/css');
+
+-- jQuery datatables
+INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','jq_datatables',1,1,'Includes the jQuery plugin datatables, use like this
+$(selector).datatables(options)','','','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','../plugins/jq_datatables.js','../extensions/dataTables-1.5/media/js/jquery.dataTables.min.js','','','http://www.datatables.net/');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'jq_datatables', 'defaultCss', '../extensions/dataTables-1.5/media/css/demo_table_jui.css', '' ,'file/css');
+
+-- jQuery UI tabs
+INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','jq_ui_tabs',5,1,'horizontal tabs from the jQuery UI framework','','','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','','../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.ui.tabs.js','','jq_ui','');
+
+-- jQuery upload
+INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','jq_upload',1,1,'','','','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','','../plugins/jq_upload.js','','','');
+
+-- jQuery CSS in Body
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'body', 'jquery_UI', '../extensions/jquery-ui-1.7.2.custom/css/ui-lightness/jquery-ui-1.7.2.custom.css', '' ,'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'body', 'jquery_datatables', '../extensions/dataTables-1.5/media/css/demo_table_jui.css', '' ,'file/css');
+
+ALTER TABLE mb_user_wmc ADD COLUMN
+wmc_public INTEGER NOT NULL DEFAULT 0;
+
+-- loadwmc from session is now a php var. The initial WMC is only created when this is set to 1
+UPDATE gui_element_vars SET var_type = 'php_var' WHERE fkey_e_id = 'loadwmc' AND var_name = 'loadFromSession';
+
+-- add jquery ui dialog to gui1
+INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','jq_ui_dialog',5,1,'Module to manage jQuery UI dialog windows with multiple options for customization.','','div','','',-1,-1,NULL ,NULL ,NULL ,'','','div','../plugins/jq_ui_dialog.js','../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.ui.dialog.js','','jq_ui','');
+
+-- overwrite WMC documents if name and user are identical (0 == old behaviour, 1 == overwrite)
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'savewmc', 'overwrite', '0', '' ,'var');
+
+
+-- add history to map object
+UPDATE gui_element SET e_mb_mod = '../../lib/history.js,map_obj.js,map.js,wms.js,wfs_obj.js,initWms.php' WHERE e_id = 'mapframe1' OR e_id = 'overview';
+
+ALTER TABLE mb_user_wmc 
+		ADD COLUMN abstract TEXT,
+		ADD COLUMN srs CHARACTER VARYING,
+		ADD COLUMN minx DOUBLE PRECISION DEFAULT 0,
+		ADD COLUMN miny DOUBLE PRECISION DEFAULT 0,
+		ADD COLUMN maxx DOUBLE PRECISION DEFAULT 0,
+		ADD COLUMN maxy DOUBLE PRECISION DEFAULT 0;
+
+CREATE TABLE wmc_keyword (
+	fkey_keyword_id	INTEGER REFERENCES keyword(keyword_id) ON DELETE CASCADE ON UPDATE CASCADE,
+	fkey_wmc_id CHARACTER VARYING(20) REFERENCES mb_user_wmc(wmc_id) ON DELETE CASCADE ON UPDATE CASCADE
+);
+ALTER TABLE ONLY wmc_keyword
+     ADD CONSTRAINT pk_wmc_keyword PRIMARY KEY (fkey_wmc_id, fkey_keyword_id);
+
+-- disable publish WMC and delete WMC for gui1
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'loadwmc', 'deleteWmc', '0', '' ,'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'loadwmc', 'publishWmc', '0', '' ,'var');
+
+-- add publish WMC to admin1
+INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin1','wmcPublic',3,1,'Publish WMC','Publish WMC','a','','href = "../php/mod_wmc_publish.php?sessionID" target = "AdminFrame" ',8,1180,190,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Publish WMC','a','','','','AdminFrame','');
+
+-- add required modules for loadwmc and savewmc
+UPDATE gui_element SET e_requires = 'jq_ui_dialog,jq_ui_tabs,jq_upload,jq_datatables' WHERE e_id = 'loadwmc';
+UPDATE gui_element SET e_requires = 'jq_ui_dialog' WHERE e_id = 'savewmc';
+
+
+-- set new element vars for existing gui elements of non-standard guis
+
+-- element var showResultInPopup for gui element gazetteerWFS
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'gazetteerWFS', 'showResultInPopup', '1', 'if value is 1 search results will be displayed in popup, otherwise in gazetteer div' ,'var' FROM gui_element WHERE gui_element.e_id = 'gazetteerWFS' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'showResultInPopup' AND fkey_e_id = 'gazetteerWFS'); 
+
+-- element var wfs_spatial_request_conf_filename for gui element gazetteerWFS
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'gazetteerWFS', 'wfs_spatial_request_conf_filename', 'wfs_additional_spatial_search.conf', 'location and name of the WFS configuration file for spatialRequest' ,'php_var' FROM gui_element WHERE gui_element.e_id = 'gazetteerWFS' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'wfs_spatial_request_conf_filename' AND fkey_e_id = 'gazetteerWFS'); 
+
+-- element var popupcss for gui element body
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'body', 'popupcss', '../css/popup.css', 'file css', 'file/css' FROM gui_element WHERE gui_element.e_id = 'body' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'popupcss' AND fkey_e_id = 'body'); 
+
+-- element var tablesortercss for gui element body
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'body', 'tablesortercss', '../css/tablesorter.css', 'file css' ,'file/css' FROM gui_element WHERE gui_element.e_id = 'body' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'tablesortercss' AND fkey_e_id = 'body'); 
+
+-- element var use_load_message for gui element body
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'body', 'use_load_message', 'true', '' ,'php_var' FROM gui_element WHERE gui_element.e_id = 'body' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'use_load_message' AND fkey_e_id = 'body'); 
+
+-- element var includeWhileLoading for gui element body
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'body', 'includeWhileLoading', '../include/gui1_splash.php', '' ,'php_var' FROM gui_element WHERE gui_element.e_id = 'body' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'includeWhileLoading' AND fkey_e_id = 'body'); 
+
+-- element var cssfileAddWMS for gui element addWMSfromfilteredList_ajax
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'addWMSfromfilteredList_ajax', 'cssfileAddWMS', '../css/addwms.css', '' ,'file/css' FROM gui_element WHERE gui_element.e_id = 'addWMSfromfilteredList_ajax' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'cssfileAddWMS' AND fkey_e_id = 'addWMSfromfilteredList_ajax'); 
+
+-- element var capabilitiesInput for gui element addWMSfromfilteredList_ajax
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'addWMSfromfilteredList_ajax', 'capabilitiesInput', '1', 'load wms by capabilities url' ,'var' FROM gui_element WHERE gui_element.e_id = 'addWMSfromfilteredList_ajax' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'capabilitiesInput' AND fkey_e_id = 'addWMSfromfilteredList_ajax'); 
+
+-- element var option_dball for gui element addWMSfromfilteredList_ajax
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'addWMSfromfilteredList_ajax', 'option_dball', '1', '1 enables option "load all configured wms from db"' ,'var' FROM gui_element WHERE gui_element.e_id = 'addWMSfromfilteredList_ajax' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'option_dball' AND fkey_e_id = 'addWMSfromfilteredList_ajax'); 
+
+-- element var option_dbgroup for gui element addWMSfromfilteredList_ajax
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'addWMSfromfilteredList_ajax', 'option_dbgroup', '1', '1 enables option "load configured wms by group"' ,'var' FROM gui_element WHERE gui_element.e_id = 'addWMSfromfilteredList_ajax' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'option_dbgroup' AND fkey_e_id = 'addWMSfromfilteredList_ajax'); 
+
+-- element var option_dbgui for gui element addWMSfromfilteredList_ajax
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'addWMSfromfilteredList_ajax', 'option_dbgui', '1', '1 enables option "load configured wms by gui"' ,'var' FROM gui_element WHERE gui_element.e_id = 'addWMSfromfilteredList_ajax' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'option_dbgui' AND fkey_e_id = 'addWMSfromfilteredList_ajax'); 
+
+-- element var featureInfoLayerPopup for gui element featureInfoTunnel
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'featureInfoTunnel', 'featureInfoLayerPopup', 'false', '' ,'var' FROM gui_element WHERE gui_element.e_id = 'featureInfoTunnel' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'featureInfoLayerPopup' AND fkey_e_id = 'featureInfoTunnel'); 
+
+-- element var featureInfoPopupHeight for gui element featureInfoTunnel
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'featureInfoTunnel', 'featureInfoPopupHeight', '200', '' ,'var' FROM gui_element WHERE gui_element.e_id = 'featureInfoTunnel' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'featureInfoPopupHeight' AND fkey_e_id = 'featureInfoTunnel'); 
+
+-- element var featureInfoPopupWidth for gui element featureInfoTunnel
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'featureInfoTunnel', 'featureInfoPopupWidth', '270', '' ,'var' FROM gui_element WHERE gui_element.e_id = 'featureInfoTunnel' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'featureInfoPopupWidth' AND fkey_e_id = 'featureInfoTunnel'); 
+
+-- element var skipWmsIfSrsNotSupported for gui element mapframe1
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'mapframe1', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var' FROM gui_element WHERE gui_element.e_id = 'mapframe1' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'skipWmsIfSrsNotSupported' AND fkey_e_id = 'mapframe1'); 
+
+-- element var skipWmsIfSrsNotSupported for gui element overview
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'overview', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var' FROM gui_element WHERE gui_element.e_id = 'overview' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'skipWmsIfSrsNotSupported' AND fkey_e_id = 'overview'); 
+
+-- element var backGroundColor for gui element navFrame
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'navFrame','backGroundColor','#c6ced6','set the background-color of the NavFrame' ,'php_var' FROM gui_element WHERE gui_element.e_id = 'navFrame' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'backGroundColor' AND fkey_e_id = 'navFrame'); 
+
+-- element var backGroundHoverColor for gui element navFrame
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'navFrame','backGroundHoverColor','#9cacbc','set the background-hover-color of the NavFrame' ,'php_var' FROM gui_element WHERE gui_element.e_id = 'navFrame' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'backGroundHoverColor' AND fkey_e_id = 'navFrame'); 
+
+-- element var overwrite for gui element savewmc
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'savewmc', 'overwrite', '0', '' ,'var' FROM gui_element WHERE gui_element.e_id = 'savewmc' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'overwrite' AND fkey_e_id = 'savewmc'); 
+
+-- element var deleteWmc for gui element loadwmc
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'loadwmc', 'deleteWmc', '0', '' ,'var' FROM gui_element WHERE gui_element.e_id = 'loadwmc' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'deleteWmc' AND fkey_e_id = 'loadwmc'); 
+
+-- element var publishWmc for gui element loadwmc
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'loadwmc', 'publishWmc', '0', '' ,'var' FROM gui_element WHERE gui_element.e_id = 'loadwmc' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'publishWmc' AND fkey_e_id = 'loadwmc'); 
+
+-- element var tooltip_noResultArray for gui element tooltip
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'tooltip', 'tooltip_noResultArray', E'["Kein Ergebnis.","<body onload=\'javascript:window.close()\'>"]', '', 'var' FROM gui_element WHERE gui_element.e_id = 'tooltip' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'tooltip_noResultArray' AND fkey_e_id = 'tooltip'); 
+
+-- element var tooltip_disableWfs for gui element tooltip
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'tooltip', 'tooltip_disableWfs', '0', 'disable WFS getFeature Request', 'var' FROM gui_element WHERE gui_element.e_id = 'tooltip' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'tooltip_disableWfs' AND fkey_e_id = 'tooltip'); 
+
+-- element var tooltip_disableWms for gui element tooltip
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'tooltip', 'tooltip_disableWms', '1', 'disable WMS getFeatureInfo Request', 'var' FROM gui_element WHERE gui_element.e_id = 'tooltip' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'tooltip_disableWms' AND fkey_e_id = 'tooltip'); 
+
+-- element var switchwms for gui element treeGDE
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'treeGDE', 'switchwms', 'true', 'enables/disables all layer of a wms' ,'var' FROM gui_element WHERE gui_element.e_id = 'treeGDE' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'switchwms' AND fkey_e_id = 'treeGDE'); 
+
+-- element var favicon for gui element body
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'body', 'favicon', '../img/favicon.png', 'favicon' ,'php_var' FROM gui_element WHERE gui_element.e_id = 'body' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'favicon' AND fkey_e_id = 'body'); 
+
+
+INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) SELECT DISTINCT fkey_gui_id,'i18n',1,1,'Internationalization module, collects data from all elements and sends them to the server in a single POST request. The strings are translated via gettext only.','Internationalization','div','','','','','div','../plugins/mb_i18n.js','','','','http://www.mapbender.org/Gettext' FROM gui_element WHERE gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element WHERE e_id = 'i18n');
+
+-- increase fields for wfs featuretype attributes name
+ALTER TABLE wfs_element ALTER COLUMN element_name TYPE VARCHAR(255);
+
+
+-- add georss in gui1
+INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','addGeoRSS',2,1,'add a GeoRSS Feed to a running application','','img','../img/georss_logo_off.png','onclick=''loadGeoRSSByForm()''  onmouseover=''this.src = this.src.replace(/_off/,"_over");''  onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="GeoRSSFeed hinzuladen"',950,60,24,24,1,'','','','mod_georss.php','popupballon.js,usemap.js,geometry.js,../extensions/wz_jsgraphics.js','mapframe1','','');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'addGeoRSS', 'loadGeorssFromSession', '1', '' ,'php_var');
+
+-- element var initializeOnLoad for gazetteerWFS
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'gazetteerWFS', 'initializeOnLoad', '0', 'start gazetteer onload' ,'var' FROM gui_element WHERE gui_element.e_id = 'gazetteerWFS' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'initializeOnLoad' AND fkey_e_id = 'gazetteerWFS');
+
+-- element var enableSearchWithoutParams for gazetteerWFS
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'gazetteerWFS', 'enableSearchWithoutParams', '0', 'define that search can be started without any search params' ,'var' FROM gui_element WHERE gui_element.e_id = 'gazetteerWFS' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'enableSearchWithoutParams' AND fkey_e_id = 'gazetteerWFS');
+
+
+UPDATE gui_element SET e_js_file = '../plugins/mb_selectMapsize.js', e_attributes = '' WHERE e_id = 'selectMapsize';
\ No newline at end of file

Deleted: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6_to_2.7rc1_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6_to_2.7rc1_pgsql_UTF-8.sql	2009-12-12 11:05:58 UTC (rev 5156)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.6_to_2.7rc1_pgsql_UTF-8.sql	2009-12-12 11:07:52 UTC (rev 5157)
@@ -1,659 +0,0 @@
--- remove event handlers, are now in the script
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'selArea1';
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'pan1';
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'featureInfo1';
-UPDATE gui_element SET e_content = '' WHERE e_id = 'navFrame';
-
-
--- 
--- new definition of addWMSfromfilteredList_ajax due to i18n
-UPDATE gui_element set e_attributes = '', e_js_file = 'mod_addWmsFromFilteredList_button.php' where e_id = 'addWMSfromfilteredList_ajax';
-
-
--- 
--- polish entries for translations table
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Pan', 'Przesuń');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Display complete map', 'Pokaż calą mapę');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Zoom in', 'Powiększ');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Zoom out', 'Pomniejsz');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Back', 'Wróć');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Forward', 'Do przodu');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Coordinates', 'Współrzędne');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Zoom by rectangle', 'Wybierz fragment mapy');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Redraw', 'Załaduj ponownie');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Query', 'Szukaj danych');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Logout', 'Wymelduj');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'WMS preferences', 'Ustawienia WMS');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Adding WMS from filtered list', 'Dodaj WMS z listy');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Set map center', 'Zaznacz środek mapy');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Help', 'Pomoc');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Show WMS infos', 'Informacje WMS');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Save workspace as web map context document', 'Zapisz widok jako web map context dokument');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Resize Mapsize', 'Zmień rozmiar mapy');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Rubber', 'Usuń szkic');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Get Area', 'Oblicz powierzchnię');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Close Polygon', 'Zamknij poligon');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Move back to your GUI list', 'Z powrotem do listy GUI');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Legend', 'Legenda');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Print', 'Drukuj');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Imprint', 'Imprint');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Maps', 'Mapy');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Search', 'Szukaj');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Meetingpoint', 'Miejsce spotkań');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Metadatasearch', 'Wyszukiwanie metadanych');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Adding WMS', 'Dodaj WMS');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Adding WMS from List', 'Dodaj WMS z listy');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Info', 'Informacja');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Change Projection', 'Zmień układ współrzędnych');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Copyright', 'Copyright');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Digitize', 'Dygitalizacja');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Overview', 'Mapa przeglądowa');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Drag Mapsize', 'Powiększ');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Mapframe', 'Okno mapy');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Navigation Frame', 'Pasek narzędzi');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Scale Select', 'Wybierz skalę');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Scale Text', 'Wpisz skalę');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Scalebar', 'Podziałka');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Set Background', 'Wybierz mapę tematyczną jako tło');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Zoom to Coordinates', 'Powiększ według współrzędnych');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Change Password', 'Zmień hasło');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Load a web map context document', 'Załaduj web map context dokument');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Logo', 'Logo');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Measure distance', 'Zmierz odległość');
-INSERT INTO translations (locale, msgid, msgstr ) VALUES ('pl', 'Set language', 'Wybierz język');
-
-
---
--- update wfs conf module
-UPDATE gui_element SET
-e_attributes = 'href = "../php/mod_wfs_conf_client.php" target="AdminFrame"'
-WHERE e_id = 'wfs_conf' AND fkey_gui_id IN ('admin1', 'admin_de_services', 'admin_en_services');
-
-ALTER TABLE wfs_conf ADD COLUMN
-wfs_conf_type int4 NOT NULL DEFAULT 0;
---
--- new wfs conf columns
-ALTER TABLE wfs_conf_element ADD COLUMN
-f_helptext text;
-
-ALTER TABLE wfs_conf_element ADD COLUMN
-f_category_name varchar(255) NOT NULL DEFAULT '';
-
--- reload uses Mapbender API
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'reload';
-
--- init event is now triggered by jQuery
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'body';
-
--- mapframe layers are now added dynamically by the modules
-UPDATE gui_element SET e_content = '' WHERE e_id = 'mapframe1';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_log.js' WHERE e_id = 'log';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_resize_mapsize.js' WHERE e_id = 'resizeMapsize';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_sandclock.js' WHERE e_id = 'sandclock';
-
--- init event is now triggered by jQuery
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'zoomFull';
-
--- file extension is now .js
-UPDATE gui_element SET e_attributes = '', e_js_file = 'mod_zoomFull.js' WHERE e_id = 'zoomFull';
-
--- file extension is now .js
-UPDATE gui_element SET e_attributes = '', e_js_file = 'mod_repaint.js' WHERE e_id = 'repaint';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_changeEPSG.js' WHERE e_id = 'changeEPSG';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_scalebar.js' WHERE e_id = 'scalebar';
-
--- parameter: skip WMS request if current SRS is not supported
--- I'm not sure how to insert this dynamically into all applications that have either mapframe1 or overview
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui', 'mapframe1', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui1', 'mapframe1', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui2', 'mapframe1', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui_digitize', 'mapframe1', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui', 'overview', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui1', 'overview', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui2', 'overview', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES( 'gui_digitize', 'overview', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var');
-
-
----------------------------------------------MONITORING BEGIN
--- Index: idx_mb_monitor_status
-
--- DROP INDEX idx_mb_monitor_status;
-
-CREATE INDEX idx_mb_monitor_status
-  ON mb_monitor
-  USING btree
-  (status);
-
--- Index: idx_mb_monitor_upload_id
-
--- DROP INDEX idx_mb_monitor_upload_id;
-
-CREATE INDEX idx_mb_monitor_upload_id
-  ON mb_monitor
-  USING btree
-  (upload_id);
-
-
--- Table: mb_wms_availability
-
--- DROP TABLE mb_wms_availability;
-
-CREATE TABLE mb_wms_availability
-(
-  fkey_wms_id integer,
-  fkey_upload_id character varying,
-  last_status integer,
-  availability real,
-  image integer,
-  status_comment character varying,
-  average_resp_time real,
-  upload_url character varying,
-  map_url character varying,
-  CONSTRAINT mb_wms_availability_fkey_wms_id_wms_id FOREIGN KEY (fkey_wms_id)
-      REFERENCES wms (wms_id) MATCH SIMPLE
-      ON UPDATE CASCADE ON DELETE CASCADE
-)
-WITH OIDS;
-
--- Function: mb_monitor_after()
-
--- DROP FUNCTION mb_monitor_after();
-
-CREATE OR REPLACE FUNCTION mb_monitor_after()
-  RETURNS "trigger" AS
-$BODY$DECLARE
-   availability_new REAL;
-   average_res_cap REAL;
-   count_monitors REAL;
-    BEGIN
-     IF TG_OP = 'UPDATE' THEN
-     
-     count_monitors := count(fkey_wms_id) from mb_monitor where fkey_wms_id=NEW.fkey_wms_id;
-      --the following should be adopted if the duration of storing is changed!!!
-      average_res_cap := ((select average_resp_time from mb_wms_availability where fkey_wms_id=NEW.fkey_wms_id)*count_monitors+(NEW.timestamp_end-NEW.timestamp_begin))/(count_monitors+1);
-
-     IF NEW.status > -1 THEN --service gives caps
-      availability_new := round(cast(((select availability from mb_wms_availability where fkey_wms_id=NEW.fkey_wms_id)*count_monitors + 100)/(count_monitors+1) as numeric),2);
-     ELSE --service has problems with caps
-      availability_new := round(cast(((select availability from mb_wms_availability where fkey_wms_id=NEW.fkey_wms_id)*count_monitors)/(count_monitors+1) as numeric),2);
-     END IF;
-
-      UPDATE mb_wms_availability SET average_resp_time=average_res_cap,last_status=NEW.status, availability=availability_new, image=NEW.image, status_comment=NEW.status_comment,upload_url=NEW.upload_url,map_url=NEW.map_url WHERE mb_wms_availability.fkey_wms_id=NEW.fkey_wms_id;
-      RETURN NEW;
-     END IF;
-     IF TG_OP = 'INSERT' THEN
-
-	IF (select count(fkey_wms_id) from mb_wms_availability where fkey_wms_id=NEW.fkey_wms_id) > 0  then -- service is not new
-			UPDATE mb_wms_availability set fkey_upload_id=NEW.upload_id,last_status=NEW.status,status_comment=NEW.status_comment,upload_url=NEW.upload_url where fkey_wms_id=NEW.fkey_wms_id;
-		else --service has not yet been monitored
-			INSERT INTO mb_wms_availability (fkey_upload_id,fkey_wms_id,last_status,status_comment,upload_url,map_url,average_resp_time,availability) VALUES (NEW.upload_id,NEW.fkey_wms_id,NEW.status,NEW.status_comment,NEW.upload_url::text,NEW.map_url,0,100);
-		end if;
-
-      RETURN NEW;
-     END IF;
-    END;
-$BODY$
-  LANGUAGE 'plpgsql' VOLATILE;
-
-
--- Trigger: mb_monitor_after on mb_monitor
-
--- DROP TRIGGER mb_monitor_after ON mb_monitor;
-
-CREATE TRIGGER mb_monitor_after
-  AFTER INSERT OR UPDATE
-  ON mb_monitor
-  FOR EACH ROW
-  EXECUTE PROCEDURE mb_monitor_after();
-
-
--- Table: mb_user_abo_ows
-
--- DROP TABLE mb_user_abo_ows;
-
-CREATE TABLE mb_user_abo_ows
-(
-  fkey_mb_user_id integer,
-  fkey_wms_id integer,
-  fkey_wfs_id integer,
-  CONSTRAINT mb_user_abo_ows_user_id_fkey FOREIGN KEY (fkey_mb_user_id)
-      REFERENCES mb_user (mb_user_id) MATCH SIMPLE
-      ON UPDATE CASCADE ON DELETE CASCADE,
-  CONSTRAINT mb_user_abo_ows_wfs_fkey FOREIGN KEY (fkey_wfs_id)
-      REFERENCES wfs (wfs_id) MATCH SIMPLE
-      ON UPDATE CASCADE ON DELETE CASCADE,
-  CONSTRAINT mb_user_abo_ows_wms_fkey FOREIGN KEY (fkey_wms_id)
-      REFERENCES wms (wms_id) MATCH SIMPLE
-      ON UPDATE CASCADE ON DELETE CASCADE
-)
-WITHOUT OIDS;  
-
-  
--- Index: idx_wms_id
-
--- DROP INDEX idx_wms_id;
-
-CREATE INDEX idx_wms_id
-  ON wms
-  USING btree
-  (wms_id);
-  
-
-
--- add monitor subscriber notification to admin1
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin1','monitor_abo_show',2,1,'monitoring','Show subscriptions','a','','href = "../php/mod_abo_show.php?sessionID" target = "AdminFrame" ',8,1080,190,20,10,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Manage monitoring subscriptions','a','','','','AdminFrame','http://www.mapbender.org/');
-
--- add monitor results to admin1
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin1','monitor_results',2,1,'monitoring results','Monitoring results','a','','href = "../php/mod_monitorCapabilities_read.php?sessionID" target = "AdminFrame" ',8,1110,190,20,10,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','View monitoring results','a','','','','AdminFrame','http://www.mapbender.org/');
-
----------------------------------------------MONITORING END
-
----------------------------
--- OWS Proxy log
-CREATE TABLE mb_proxy_log (
-    
-    proxy_log_timestamp timestamp default now(),
-    fkey_wms_id integer NOT NULL,
-    fkey_mb_user_id integer NOT NULL,
-    request varchar(4096),
-    pixel bigint,
-    price real
-    
-)
-with oids;
-ALTER TABLE wms ADD COLUMN wms_proxylog integer;
-ALTER TABLE wms ALTER COLUMN wms_proxylog SET STORAGE PLAIN;
-ALTER TABLE wms ADD COLUMN wms_pricevolume integer;
-ALTER TABLE wms ALTER COLUMN wms_pricevolume SET STORAGE PLAIN;
----------------------------
-
----------------------------
--- http auth
-ALTER TABLE wms ADD COLUMN wms_username VARCHAR(255) NOT NULL DEFAULT '';
-ALTER TABLE wms ADD COLUMN wms_password VARCHAR(255) NOT NULL DEFAULT '';
-ALTER TABLE wms ADD COLUMN wms_auth_type VARCHAR(255) NOT NULL DEFAULT '';
-
--- Column: mb_user_digest
--- ALTER TABLE mb_user DROP COLUMN mb_user_digest;
-ALTER TABLE mb_user ADD COLUMN mb_user_digest text;
-ALTER TABLE mb_user ALTER COLUMN mb_user_digest SET STORAGE EXTENDED;
-
---Initial filling with empty strings
-UPDATE mb_user set mb_user_digest='';
-
---howto set up the http_auth digest hash
---update mb_user set mb_user_digest=md5(mb_user_name || ';' || mb_user_email || ':' || '<realm_name>' || ':' || 'password') where mb_user_id = <ID>;
- 
----------------------------
--- http://www.mapbender.org/FeatureInfo#considerScalehints --
--- INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui', 'featureInfo1', 'considerScalehints', '0', '' ,'var');
--- INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'featureInfo1', 'considerScalehints', '0', '' ,'var');
--- INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui2', 'featureInfo1', 'considerScalehints', '0', '' ,'var'); 
--- INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui_digitize', 'featureInfo1', 'considerScalehints', '0', '' ,'var');
-
-
-------------------------------
--- greek updates for translations table
-update translations set msgstr = 'Περίγραμμα/Κορνίζα πλοήγησης' where msgid = 'Navigation Frame' and locale = 'gr';
-update translations set msgstr = 'Φόρτωση κειμένου διαδυκτιακού χάρτη' where msgid = 'Load a web map context document' and locale = 'gr';
-update translations set msgstr = 'Αποθήκευση χώρου εργασίας με μορφή κείμενου διαδυκτιακού χάρτη' where msgid = 'Save workspace as web map context document' and locale = 'gr';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_selArea.js' WHERE e_id = 'selArea1';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_zoomIn1.js' WHERE e_id = 'zoomIn1';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_overview.js' WHERE e_id = 'overview';
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_zoomOut1.js' WHERE e_id = 'zoomOut1';
-
--- set white background to Mapframe1
-UPDATE gui_element set e_more_styles='overflow:hidden;background-color:#ffffff' where e_id='mapframe1'; 
-
--- background to overview
-UPDATE gui_element set e_more_styles='overflow:hidden;background-color:#ffffff' where e_id='overview'; 
-
--- file extension is now .js
-UPDATE gui_element SET e_js_file = 'mod_pan.js' WHERE e_id = 'pan1';
-
--- remove title tag of Mapframe1 because it's displayed  im Map
-UPDATE gui_element SET e_title='' WHERE e_id='mapframe1';
-
--- remove title tag of Mapframe1 because it's displayed  im Map
-UPDATE gui_element SET e_title='' WHERE e_id='overview';
-
--- resize admin frame in admin guis
-UPDATE gui_element SET e_width = 1000 WHERE e_id = 'AdminFrame';
-
-
--- CSW handling add CSW administration to admin2_de , admin2_en, admin1
--- admin2_en
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_en', 'headline_Configure_CSW', 3, 1, 'Catalog Management', 'Catalog Management', 'div', '', '', 5, 760, 193, 66, 2, '', ' Catalog Management', 'div', '', '', '', '', '');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_en', 'loadCSW', 3, 1, 'Add Catalog', 'Add Catalog', 'a', '', 'href = "../php/mod_loadCatalogCapabilities.php?sessionID" target = "AdminFrame" ', 8, 780, 190, 20, 5, '', 'Add Catalog', 'a', '', '', '', 'AdminFrame', 'http://www.mapbender.org/index.php/newGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_en', 'loadCSWGUI', 3, 1, 'Link Catalog to GUI', 'Link Catalog to GUI', 'a', '', 'href = "../php/mod_loadCatalogToGUI.php?sessionID" target = "AdminFrame" ', 8, 800, 190, 20, 5, '', 'Link Catalog to GUI', 'a', '', '', '', 'AdminFrame', 'http://www.mapbender.org/index.php/newGUI');
-
--- admin2_de
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_de', 'headline_Configure_CSW', 3, 1, 'Catalog Management', 'Catalog Management', 'div', '', '', 5, 760, 193, 66, 2, '', ' CSW Verwaltung', 'div', '', '', '', '', '');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_de', 'loadCSW', 3, 1, 'CSW laden', 'CSW laden', 'a', '', 'href = "../php/mod_loadCatalogCapabilities.php?sessionID" target = "AdminFrame" ', 8, 780, 190, 20, 5, '', 'Add Catalog', 'a', '', '', '', 'AdminFrame', 'http://www.mapbender.org/index.php/newGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES ('admin2_de', 'loadCSWGUI', 3, 1, 'CSW einer Applikation zuordnen', 'Link Catalog to GUI', 'a', '', 'href = "../php/mod_loadCatalogToGUI.php?sessionID" target = "AdminFrame" ', 8, 800, 190, 20, 5, '', 'Link Catalog to GUI', 'a', '', '', '', 'AdminFrame', 'http://www.mapbender.org/index.php/newGUI');
-
--- admin1
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin1','loadCSW',3,1,'Add Catalog','Add Catalog','a','','href = "../php/mod_loadCatalogCapabilities.php?sessionID" target = "AdminFrame" ',8,1140,190,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Add Catalog','a','','','','AdminFrame','http://www.mapbender.org/index.php/newGUI');
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin1','loadCSWGUI',3,1,'Link Catalog to GUI','Link Catalog to GUI','a','','href = "../php/mod_loadCatalogToGUI.php?sessionID" target = "AdminFrame" ',8,1160,190,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Link Catalog to GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/newGUI');
-
--- add CSW search to gui1
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','addCSW',2,1,'search via a CSW Client','Search CSW','img','../img/button_gray/csw_off.png','onclick=''var searchCSWPopup = new mb_popup({title:"Search Catalog",url:"../javascripts/mod_searchCSW_ajax.php?sessionID",width:720, height:600,left:20, top:20});searchCSWPopup.show()''  onmouseover=''this.src = this.src.replace(/_off/,"_over");''  onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Search Catalog"',925,60,24,24,1,'','','','mod_addCSW.php','mod_addWMSgeneralFunctions.js','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/AddCSW');
-
--- remove event handlers, are now in the script
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'resizeMapsize';
-
-
---
--- CSW Support - new Tables to build up CSW support
--- 
-CREATE TABLE cat
-(
-  cat_id serial NOT NULL, -- auto generated
-  cat_version character varying(50) NOT NULL DEFAULT ''::character varying, -- get from cat version from xml - service_type_version
-  --cat_name character varying(255), -- ows-service-id:title
-  cat_title character varying(255) NOT NULL DEFAULT ''::character varying, --ows-service-id:title
-  cat_abstract text, --ows-service-id:abstract
-  --cat_keywords do we need them? There maybe a special table? - cs:keywords - another table to hold kw
-  --UploadUrl
-  cat_upload_url character varying(255),
-  fees character varying(50), --servicetype-fees
-  accessconstraints text, -- servicetype-accessconstraints
-  --ServiceProvider 
-  providername character varying(255),
-  providersite character varying(255),
-  --ServiceContact
-  individualname character varying(255),
-  positionname character varying(255),
-  --ContactInfo
-  voice character varying(255), -- Phone
-  facsimile character varying(255),
-  --Address
-  deliverypoint character varying(255),
-  city character varying(255),
-  administrativearea character varying(255),
-  postalcode character varying(255),
-  country character varying(255),
-  electronicmailaddress character varying(255),
-  --Whole Cap-doc
-  cat_getcapabilities_doc text,
-  --Information about Owner
-  cat_owner integer,
-  --Actuality
-  cat_timestamp integer
-);
-
-
-ALTER TABLE ONLY cat
-    ADD CONSTRAINT cat_pkey PRIMARY KEY (cat_id);
-
-CREATE TABLE cat_keyword (
-    fkey_cat_id integer NOT NULL,
-    fkey_keyword_id integer NOT NULL
-);
-
-ALTER TABLE ONLY cat_keyword
-    ADD CONSTRAINT pk_cat_keyword PRIMARY KEY (fkey_cat_id, fkey_keyword_id);
-
-ALTER TABLE ONLY cat_keyword
-    ADD CONSTRAINT fkey_keyword_id_fkey_cat_id FOREIGN KEY (fkey_keyword_id) REFERENCES keyword(keyword_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-ALTER TABLE ONLY cat_keyword
-    ADD CONSTRAINT fkey_cat_id_fkey_keyword_id FOREIGN KEY (fkey_cat_id) REFERENCES cat(cat_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
-CREATE TABLE gui_cat
-(
-  fkey_gui_id character varying(50) NOT NULL DEFAULT ''::character varying,
-  fkey_cat_id integer NOT NULL DEFAULT 0,
-  CONSTRAINT fkey_cat_gui_id FOREIGN KEY (fkey_gui_id)
-      REFERENCES gui (gui_id) MATCH SIMPLE
-      ON UPDATE CASCADE ON DELETE CASCADE,
-  CONSTRAINT fkey_cat_cat_id FOREIGN KEY (fkey_cat_id)
-      REFERENCES cat (cat_id) MATCH SIMPLE
-      ON UPDATE CASCADE ON DELETE CASCADE
-);
-
-CREATE TABLE cat_op_conf
-(
-  fk_cat_id integer NOT NULL,
-  param_name character varying(255) NOT NULL,
-  param_value text NOT NULL,
-  param_type character varying(255) NOT NULL,
-  CONSTRAINT pk_con_cat_op PRIMARY KEY (fk_cat_id, param_type, param_name, param_value),
-  CONSTRAINT fk_cat_conf_to_cat FOREIGN KEY (fk_cat_id)
-      REFERENCES cat (cat_id) MATCH SIMPLE
-      ON UPDATE CASCADE ON DELETE CASCADE
-);
-
--- remove obsolete src from treeGDE (no longer a frame)
-UPDATE gui_element SET e_src = '' WHERE e_id = 'treeGDE';
-
--- remove frameborder = 0 from treeGDE (no longer a frame)
-UPDATE gui_element SET e_attributes = 'onmouseover="this.style.zIndex=300;this.style.width=350;" onmouseout="this.style.zIndex=2;this.style.width=200"' WHERE e_id = 'treeGDE';
-
--- remove frameborder = 0 from switchLocale_noreload
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'switchLocale_noreload';
-
--- add title
-UPDATE gui_element SET e_content = '<select style="font-family: Arial, sans-serif; font-size:12" title="Set background" name="mod_setBackground_list" onchange="mod_setBackground_change(this)"><option value="0"></option></select>' WHERE e_id = 'setBackground';
-
--- remove nobr tag from mapbender
-UPDATE gui_element SET e_content = '<span>Ma</span><span style="color: blue;">P</span><span style="color: red;">b</span><span>ender</span><script type="text/javascript"> mb_registerSubFunctions("mod_mapbender()"); function mod_mapbender(){ document.getElementById("mapbender").style.left = parseInt(document.getElementById("mapframe1").style.left) + parseInt(document.getElementById("mapframe1").style.width) - 90; document.getElementById("mapbender").style.top = parseInt(document.getElementById("mapframe1").style.top) + parseInt(document.getElementById("mapframe1").style.height) -1; } </script>' WHERE e_id = 'mapbender';
-
--- correct URL encoding
-UPDATE gui_element SET e_attributes = E'onclick="printWindow = window.open(\'../print/mod_printPDF.php?target=mapframe1&amp;sessionID&amp;conf=printPDF_b.conf\',\'printWin\',\'width=260, height=380, resizable=yes\');printWindow.focus();"  onmouseover="this.src = this.src.replace(/_off/,\'_over\');" onmouseout="this.src = this.src.replace(/_over/, \'_off\');"' WHERE e_id = 'printPDF';
-
--- added mandatory action attribute
-UPDATE gui_element SET e_attributes = 'action="window.location.href"' WHERE e_id = 'setBackground';
-UPDATE gui_element SET e_attributes = 'action="window.location.href" onsubmit="return mod_scaleText()"' WHERE e_id = 'scaleText';
-UPDATE gui_element SET e_content = '<form id="form_switch_locale" action="window.location.href" name="form_switch_locale" target="parent"><select id="language" name="language" onchange="validate_locale()"></select></form>' WHERE e_id = 'switchLocale_noreload';
-
--- attributes only valid for printPDF button (img)
-UPDATE gui_element SET e_attributes = '' WHERE e_id = 'printPDF' AND e_element = 'iframe';
-
-
--- New NavFrame element-vars (color and hoverColor) see http://trac.osgeo.org/mapbender/ticket/540
-INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui','navFrame','backGroundColor','#c6ced6','set the background-color of the NavFrame' ,'php_var');
-INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui','navFrame','backGroundHoverColor','#9cacbc','set the background-hover-color of the NavFrame' ,'php_var');
-
-INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui1','navFrame','backGroundColor','#c6ced6','set the background-color of the NavFrame' ,'php_var');
-INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui1','navFrame','backGroundHoverColor','#9cacbc','set the background-hover-color of the NavFrame' ,'php_var');
-
-
-INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui2','navFrame','backGroundColor','#799FEB','set the background-color of the NavFrame' ,'php_var');
-INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui2','navFrame','backGroundHoverColor','#577dc9','set the background-hover-color of the NavFrame' ,'php_var');
-
-INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui_digitize','navFrame','backGroundColor','#c6ced6','set the background-color of the NavFrame' ,'php_var');
-INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) VALUES('gui_digitize','navFrame','backGroundHoverColor','#9cacbc','set the background-hover-color of the NavFrame' ,'php_var');
-
-ALTER TABLE mb_user_wmc ADD COLUMN
-wmc_timestamp_create INTEGER;
-
-
-CREATE TABLE wmc_md_topic_category (
-    fkey_wmc_id character varying(20) NOT NULL,
-    fkey_md_topic_category_id integer NOT NULL
-);
-
-ALTER TABLE ONLY wmc_md_topic_category
-    ADD CONSTRAINT wmc_md_topic_category_fkey_wmc_id_fkey FOREIGN KEY (fkey_wmc_id) REFERENCES mb_user_wmc (wmc_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
--- jQuery UI
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','jq_ui',1,1,'The jQuery UI core','','','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','','../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.ui.core.js','','','');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'jq_ui', 'css', '../extensions/jquery-ui-1.7.2.custom/css/ui-lightness/jquery-ui-1.7.2.custom.css', '' ,'file/css');
-
--- jQuery datatables
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','jq_datatables',1,1,'Includes the jQuery plugin datatables, use like this
-$(selector).datatables(options)','','','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','../plugins/jq_datatables.js','../extensions/dataTables-1.5/media/js/jquery.dataTables.min.js','','','http://www.datatables.net/');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'jq_datatables', 'defaultCss', '../extensions/dataTables-1.5/media/css/demo_table_jui.css', '' ,'file/css');
-
--- jQuery UI tabs
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','jq_ui_tabs',5,1,'horizontal tabs from the jQuery UI framework','','','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','','../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.ui.tabs.js','','jq_ui','');
-
--- jQuery upload
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','jq_upload',1,1,'','','','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','','../plugins/jq_upload.js','','','');
-
--- jQuery CSS in Body
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'body', 'jquery_UI', '../extensions/jquery-ui-1.7.2.custom/css/ui-lightness/jquery-ui-1.7.2.custom.css', '' ,'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'body', 'jquery_datatables', '../extensions/dataTables-1.5/media/css/demo_table_jui.css', '' ,'file/css');
-
-ALTER TABLE mb_user_wmc ADD COLUMN
-wmc_public INTEGER NOT NULL DEFAULT 0;
-
--- loadwmc from session is now a php var. The initial WMC is only created when this is set to 1
-UPDATE gui_element_vars SET var_type = 'php_var' WHERE fkey_e_id = 'loadwmc' AND var_name = 'loadFromSession';
-
--- add jquery ui dialog to gui1
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','jq_ui_dialog',5,1,'Module to manage jQuery UI dialog windows with multiple options for customization.','','div','','',-1,-1,NULL ,NULL ,NULL ,'','','div','../plugins/jq_ui_dialog.js','../extensions/jquery-ui-1.7.2.custom/development-bundle/ui/min.ui.dialog.js','','jq_ui','');
-
--- overwrite WMC documents if name and user are identical (0 == old behaviour, 1 == overwrite)
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'savewmc', 'overwrite', '0', '' ,'var');
-
-
--- add history to map object
-UPDATE gui_element SET e_mb_mod = '../../lib/history.js,map_obj.js,map.js,wms.js,wfs_obj.js,initWms.php' WHERE e_id = 'mapframe1' OR e_id = 'overview';
-
-ALTER TABLE mb_user_wmc 
-		ADD COLUMN abstract TEXT,
-		ADD COLUMN srs CHARACTER VARYING,
-		ADD COLUMN minx DOUBLE PRECISION DEFAULT 0,
-		ADD COLUMN miny DOUBLE PRECISION DEFAULT 0,
-		ADD COLUMN maxx DOUBLE PRECISION DEFAULT 0,
-		ADD COLUMN maxy DOUBLE PRECISION DEFAULT 0;
-
-CREATE TABLE wmc_keyword (
-	fkey_keyword_id	INTEGER REFERENCES keyword(keyword_id) ON DELETE CASCADE ON UPDATE CASCADE,
-	fkey_wmc_id CHARACTER VARYING(20) REFERENCES mb_user_wmc(wmc_id) ON DELETE CASCADE ON UPDATE CASCADE
-);
-ALTER TABLE ONLY wmc_keyword
-     ADD CONSTRAINT pk_wmc_keyword PRIMARY KEY (fkey_wmc_id, fkey_keyword_id);
-
--- disable publish WMC and delete WMC for gui1
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'loadwmc', 'deleteWmc', '0', '' ,'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'loadwmc', 'publishWmc', '0', '' ,'var');
-
--- add publish WMC to admin1
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin1','wmcPublic',3,1,'Publish WMC','Publish WMC','a','','href = "../php/mod_wmc_publish.php?sessionID" target = "AdminFrame" ',8,1180,190,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','Publish WMC','a','','','','AdminFrame','');
-
--- add required modules for loadwmc and savewmc
-UPDATE gui_element SET e_requires = 'jq_ui_dialog,jq_ui_tabs,jq_upload,jq_datatables' WHERE e_id = 'loadwmc';
-UPDATE gui_element SET e_requires = 'jq_ui_dialog' WHERE e_id = 'savewmc';
-
-
--- set new element vars for existing gui elements of non-standard guis
-
--- element var showResultInPopup for gui element gazetteerWFS
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'gazetteerWFS', 'showResultInPopup', '1', 'if value is 1 search results will be displayed in popup, otherwise in gazetteer div' ,'var' FROM gui_element WHERE gui_element.e_id = 'gazetteerWFS' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'showResultInPopup' AND fkey_e_id = 'gazetteerWFS'); 
-
--- element var wfs_spatial_request_conf_filename for gui element gazetteerWFS
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'gazetteerWFS', 'wfs_spatial_request_conf_filename', 'wfs_additional_spatial_search.conf', 'location and name of the WFS configuration file for spatialRequest' ,'php_var' FROM gui_element WHERE gui_element.e_id = 'gazetteerWFS' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'wfs_spatial_request_conf_filename' AND fkey_e_id = 'gazetteerWFS'); 
-
--- element var popupcss for gui element body
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'body', 'popupcss', '../css/popup.css', 'file css', 'file/css' FROM gui_element WHERE gui_element.e_id = 'body' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'popupcss' AND fkey_e_id = 'body'); 
-
--- element var tablesortercss for gui element body
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'body', 'tablesortercss', '../css/tablesorter.css', 'file css' ,'file/css' FROM gui_element WHERE gui_element.e_id = 'body' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'tablesortercss' AND fkey_e_id = 'body'); 
-
--- element var use_load_message for gui element body
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'body', 'use_load_message', 'true', '' ,'php_var' FROM gui_element WHERE gui_element.e_id = 'body' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'use_load_message' AND fkey_e_id = 'body'); 
-
--- element var includeWhileLoading for gui element body
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'body', 'includeWhileLoading', '../include/gui1_splash.php', '' ,'php_var' FROM gui_element WHERE gui_element.e_id = 'body' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'includeWhileLoading' AND fkey_e_id = 'body'); 
-
--- element var cssfileAddWMS for gui element addWMSfromfilteredList_ajax
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'addWMSfromfilteredList_ajax', 'cssfileAddWMS', '../css/addwms.css', '' ,'file/css' FROM gui_element WHERE gui_element.e_id = 'addWMSfromfilteredList_ajax' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'cssfileAddWMS' AND fkey_e_id = 'addWMSfromfilteredList_ajax'); 
-
--- element var capabilitiesInput for gui element addWMSfromfilteredList_ajax
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'addWMSfromfilteredList_ajax', 'capabilitiesInput', '1', 'load wms by capabilities url' ,'var' FROM gui_element WHERE gui_element.e_id = 'addWMSfromfilteredList_ajax' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'capabilitiesInput' AND fkey_e_id = 'addWMSfromfilteredList_ajax'); 
-
--- element var option_dball for gui element addWMSfromfilteredList_ajax
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'addWMSfromfilteredList_ajax', 'option_dball', '1', '1 enables option "load all configured wms from db"' ,'var' FROM gui_element WHERE gui_element.e_id = 'addWMSfromfilteredList_ajax' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'option_dball' AND fkey_e_id = 'addWMSfromfilteredList_ajax'); 
-
--- element var option_dbgroup for gui element addWMSfromfilteredList_ajax
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'addWMSfromfilteredList_ajax', 'option_dbgroup', '1', '1 enables option "load configured wms by group"' ,'var' FROM gui_element WHERE gui_element.e_id = 'addWMSfromfilteredList_ajax' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'option_dbgroup' AND fkey_e_id = 'addWMSfromfilteredList_ajax'); 
-
--- element var option_dbgui for gui element addWMSfromfilteredList_ajax
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'addWMSfromfilteredList_ajax', 'option_dbgui', '1', '1 enables option "load configured wms by gui"' ,'var' FROM gui_element WHERE gui_element.e_id = 'addWMSfromfilteredList_ajax' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'option_dbgui' AND fkey_e_id = 'addWMSfromfilteredList_ajax'); 
-
--- element var featureInfoLayerPopup for gui element featureInfoTunnel
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'featureInfoTunnel', 'featureInfoLayerPopup', 'false', '' ,'var' FROM gui_element WHERE gui_element.e_id = 'featureInfoTunnel' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'featureInfoLayerPopup' AND fkey_e_id = 'featureInfoTunnel'); 
-
--- element var featureInfoPopupHeight for gui element featureInfoTunnel
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'featureInfoTunnel', 'featureInfoPopupHeight', '200', '' ,'var' FROM gui_element WHERE gui_element.e_id = 'featureInfoTunnel' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'featureInfoPopupHeight' AND fkey_e_id = 'featureInfoTunnel'); 
-
--- element var featureInfoPopupWidth for gui element featureInfoTunnel
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'featureInfoTunnel', 'featureInfoPopupWidth', '270', '' ,'var' FROM gui_element WHERE gui_element.e_id = 'featureInfoTunnel' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'featureInfoPopupWidth' AND fkey_e_id = 'featureInfoTunnel'); 
-
--- element var skipWmsIfSrsNotSupported for gui element mapframe1
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'mapframe1', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var' FROM gui_element WHERE gui_element.e_id = 'mapframe1' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'skipWmsIfSrsNotSupported' AND fkey_e_id = 'mapframe1'); 
-
--- element var skipWmsIfSrsNotSupported for gui element overview
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'overview', 'skipWmsIfSrsNotSupported', '0', 'if set to 1, it skips the WMS request if the current SRS is not supported by the WMS; if set to 0, the WMS is always queried. Default is 0, because of backwards compatibility' ,'var' FROM gui_element WHERE gui_element.e_id = 'overview' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'skipWmsIfSrsNotSupported' AND fkey_e_id = 'overview'); 
-
--- element var backGroundColor for gui element navFrame
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'navFrame','backGroundColor','#c6ced6','set the background-color of the NavFrame' ,'php_var' FROM gui_element WHERE gui_element.e_id = 'navFrame' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'backGroundColor' AND fkey_e_id = 'navFrame'); 
-
--- element var backGroundHoverColor for gui element navFrame
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'navFrame','backGroundHoverColor','#9cacbc','set the background-hover-color of the NavFrame' ,'php_var' FROM gui_element WHERE gui_element.e_id = 'navFrame' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'backGroundHoverColor' AND fkey_e_id = 'navFrame'); 
-
--- element var overwrite for gui element savewmc
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'savewmc', 'overwrite', '0', '' ,'var' FROM gui_element WHERE gui_element.e_id = 'savewmc' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'overwrite' AND fkey_e_id = 'savewmc'); 
-
--- element var deleteWmc for gui element loadwmc
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'loadwmc', 'deleteWmc', '0', '' ,'var' FROM gui_element WHERE gui_element.e_id = 'loadwmc' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'deleteWmc' AND fkey_e_id = 'loadwmc'); 
-
--- element var publishWmc for gui element loadwmc
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'loadwmc', 'publishWmc', '0', '' ,'var' FROM gui_element WHERE gui_element.e_id = 'loadwmc' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'publishWmc' AND fkey_e_id = 'loadwmc'); 
-
--- element var tooltip_noResultArray for gui element tooltip
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'tooltip', 'tooltip_noResultArray', E'["Kein Ergebnis.","<body onload=\'javascript:window.close()\'>"]', '', 'var' FROM gui_element WHERE gui_element.e_id = 'tooltip' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'tooltip_noResultArray' AND fkey_e_id = 'tooltip'); 
-
--- element var tooltip_disableWfs for gui element tooltip
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'tooltip', 'tooltip_disableWfs', '0', 'disable WFS getFeature Request', 'var' FROM gui_element WHERE gui_element.e_id = 'tooltip' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'tooltip_disableWfs' AND fkey_e_id = 'tooltip'); 
-
--- element var tooltip_disableWms for gui element tooltip
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'tooltip', 'tooltip_disableWms', '1', 'disable WMS getFeatureInfo Request', 'var' FROM gui_element WHERE gui_element.e_id = 'tooltip' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'tooltip_disableWms' AND fkey_e_id = 'tooltip'); 
-
--- element var switchwms for gui element treeGDE
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'treeGDE', 'switchwms', 'true', 'enables/disables all layer of a wms' ,'var' FROM gui_element WHERE gui_element.e_id = 'treeGDE' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'switchwms' AND fkey_e_id = 'treeGDE'); 
-
--- element var favicon for gui element body
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'body', 'favicon', '../img/favicon.png', 'favicon' ,'php_var' FROM gui_element WHERE gui_element.e_id = 'body' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'favicon' AND fkey_e_id = 'body'); 
-
-
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) SELECT DISTINCT fkey_gui_id,'i18n',1,1,'Internationalization module, collects data from all elements and sends them to the server in a single POST request. The strings are translated via gettext only.','Internationalization','div','','','','','div','../plugins/mb_i18n.js','','','','http://www.mapbender.org/Gettext' FROM gui_element WHERE gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element WHERE e_id = 'i18n');
-
--- increase fields for wfs featuretype attributes name
-ALTER TABLE wfs_element ALTER COLUMN element_name TYPE VARCHAR(255);
-
-
--- add georss in gui1
-INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('gui1','addGeoRSS',2,1,'add a GeoRSS Feed to a running application','','img','../img/georss_logo_off.png','onclick=''loadGeoRSSByForm()''  onmouseover=''this.src = this.src.replace(/_off/,"_over");''  onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="GeoRSSFeed hinzuladen"',950,60,24,24,1,'','','','mod_georss.php','popupballon.js,usemap.js,geometry.js,../extensions/wz_jsgraphics.js','mapframe1','','');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('gui1', 'addGeoRSS', 'loadGeorssFromSession', '1', '' ,'php_var');
-
--- element var initializeOnLoad for gazetteerWFS
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'gazetteerWFS', 'initializeOnLoad', '0', 'start gazetteer onload' ,'var' FROM gui_element WHERE gui_element.e_id = 'gazetteerWFS' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'initializeOnLoad' AND fkey_e_id = 'gazetteerWFS');
-
--- element var enableSearchWithoutParams for gazetteerWFS
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) SELECT gui_element.fkey_gui_id, 'gazetteerWFS', 'enableSearchWithoutParams', '0', 'define that search can be started without any search params' ,'var' FROM gui_element WHERE gui_element.e_id = 'gazetteerWFS' AND gui_element.fkey_gui_id NOT IN (SELECT fkey_gui_id FROM gui_element_vars WHERE var_name = 'enableSearchWithoutParams' AND fkey_e_id = 'gazetteerWFS');
-
-
-UPDATE gui_element SET e_js_file = '../plugins/mb_selectMapsize.js', e_attributes = '' WHERE e_id = 'selectMapsize';
\ No newline at end of file



More information about the Mapbender_commits mailing list