back to latest head
authoridfx <idfx>
Sat, 6 Nov 2004 15:54:28 +0000 (15:54 +0000)
committeridfx <idfx>
Sat, 6 Nov 2004 15:54:28 +0000 (15:54 +0000)
60 files changed:
bundles/admin_ro.properties [new file with mode: 0755]
dbscripts/conversion/mir_oid.pl [deleted file]
dbscripts/dupetrigger/INSTALL [deleted file]
dbscripts/dupetrigger/Makefile-dist [deleted file]
dbscripts/dupetrigger/README [deleted file]
dbscripts/dupetrigger/dupetrigger.c [deleted file]
dbscripts/dupetrigger/postgresql.sript [deleted file]
dbscripts/hibernate_schema.sql [new file with mode: 0755]
dbscripts/lib/codec.pl [deleted file]
dbscripts/lib/convert.pl [deleted file]
dbscripts/lib/log.pl [deleted file]
dbscripts/lib/property.pl [deleted file]
dbscripts/lib/subst.pl [deleted file]
dbscripts/pg_imageimport.pl [deleted file]
dbscripts/update_database_01.sql [deleted file]
dbscripts/updates/update20030704.sql [deleted file]
dbscripts/updates/update20030920.sql [deleted file]
dbscripts/updates/update20031005.sql [deleted file]
dbscripts/updates/update20031122.sql [new file with mode: 0755]
dbscripts/updates/update20031124.sql [new file with mode: 0755]
dbscripts/updates/update20031125.sql [new file with mode: 0755]
dbscripts/updates/update20031212.sql [new file with mode: 0755]
dbscripts/wiz_templates/show.template [deleted file]
dbscripts/wizard.pl [deleted file]
doc/LOCALIZER.HOWTO [new file with mode: 0755]
etc/content-types.properties [deleted file]
etc/hibernate.cfg.xml [deleted file]
etc/server.xml [deleted file]
etc/struts-config-admin.xml [deleted file]
etc/struts-config.xml [deleted file]
etc/web.xml [deleted file]
source/mircoders/media/AbstractMediaHandler.java [new file with mode: 0755]
source/mircoders/media/MediaHandlerOgg.java [new file with mode: 0755]
source/mircoders/media/MediaHelper.java [new file with mode: 0755]
source/mircoders/media/URLMediaHandler.java [new file with mode: 0755]
web/admin/index.html [deleted file]
web/produced/img/arrow_down.gif [deleted file]
web/produced/img/audio_big.gif [deleted file]
web/produced/img/audio_small.gif [deleted file]
web/produced/img/bashcomp2.gif [deleted file]
web/produced/img/cleft.gif [deleted file]
web/produced/img/dot.gif [deleted file]
web/produced/img/extlink.gif [deleted file]
web/produced/img/help.gif [deleted file]
web/produced/img/intlink.gif [deleted file]
web/produced/img/link_small.gif [deleted file]
web/produced/img/logo_small.gif [deleted file]
web/produced/img/mail_small.gif [deleted file]
web/produced/img/maillink.gif [deleted file]
web/produced/img/photo_big.gif [deleted file]
web/produced/img/photo_small.gif [deleted file]
web/produced/img/pointgris.gif [deleted file]
web/produced/img/search_icon.gif [deleted file]
web/produced/img/sp.gif [deleted file]
web/produced/img/text_big.gif [deleted file]
web/produced/img/text_small.gif [deleted file]
web/produced/img/video_big.gif [deleted file]
web/produced/img/video_small.gif [deleted file]
web/produced/style/formate.css [deleted file]
web/produced/style/mir.css [deleted file]

diff --git a/bundles/admin_ro.properties b/bundles/admin_ro.properties
new file mode 100755 (executable)
index 0000000..e059655
--- /dev/null
@@ -0,0 +1,530 @@
+########## admin ##########
+# language: romanian
+# $Id: admin_ro.properties,v 1.1 2004/11/06 15:59:50 idfx Exp $
+
+languagename=Romana
+
+# general
+yes=da
+no=nu
+dontcare=nuconteaza
+all=tot
+month=luna
+year=an
+file=fisier
+new=nou
+by=de
+help=ajutor
+
+
+# actions
+insert=insert
+save=salveaza
+edit=redacteaza
+delete=sterge
+add=adauga
+filter=filtreaza
+attach=ataseaza
+list=browse
+back=inapoi
+cancel=canceleaza
+preview=preview
+reset=reset
+administer=administreaza
+search=cauta
+
+
+# special
+fileedit=redactareFisier
+
+
+# records
+records=entries
+show_from_to=arata de la {0} la {1}
+no_matches_found=No matching entries!
+list.next=urmatorul
+list.previous=precedentul
+
+
+# media - used by image, audio, video and other media
+media.created=creat
+media.changed=ultima modificare
+media.published=publicat
+media.format=format
+media.rights=statut copyright
+media.type=tip
+media.mediafolder=dosar Media
+media.title=titlu
+media.size=marime
+media.description=descriere
+media.date=data
+media.location=loc
+media.creator=autor
+media.keywords=keywords
+media.comment=remarci (pentru us intern)
+media.source=sursa
+media.is_published=publicat
+media.icon=icon
+media.nr_of_media=Number of Media Items (max 20)
+media.nr_of_media.submit=define number
+media.comments=Comentarii
+media.articles=Articole
+
+medialist.search_text_in=Cauta text in
+
+
+# image
+image.htmltitle=Imagine
+imagelist.htmltitle=Images overview
+
+
+# audio
+audio.htmltitle=Audio
+audiolist.htmltitle=Audio overview
+
+
+# video
+video.htmltitle=Video
+videolist.htmltitle=Video overview
+
+
+# other
+other_media.htmltitle=Alta media
+other_medialist.htmltitle=Other media overview
+
+
+# breaking
+breaking.htmltitle=Ultimile stiri
+breaking.textinfo=(max. 5 linii / 250 caractere)
+breaking.id = id
+breaking.text=text
+breaking.date=data
+
+breakinglist.htmltitle=Breaking news overview
+
+
+# comment
+comment.htmltitle=Comment
+comment.date=Data
+comment.title=Titlu
+comment.published=Publicat
+comment.text=Comenteaza textul
+comment.address=Adresa
+comment.phone=Telefon
+comment.email=Email 
+comment.url=Url
+comment.creator=Autor
+comment.article=Articol
+comment.html=HTML 
+comment.status=Statut
+comment.language=Limba
+comment.allcomments=Toate comentariile
+
+comment.operation.hide=ascunde
+comment.operation.unhide=neascunde
+
+
+#commentlist
+commentlist.htmltitle=comentarii
+commentlist.published=publicat
+commentlist.hidden=ascuns
+commentlist.allcomments=Toate comentariile despre acest articol
+commentlist.search=go!
+commentlist.activate = activeaza schimbarile
+commentlist.order = ordoneaza
+commentlist.order.datedesc= data (desc.)
+commentlist.order.dateasc= data (asc.)
+commentlist.order.articletitle= titlul articolui
+
+commentsearch.field = Cauta 
+commentsearch.field.title = Titlu
+commentsearch.field.creator = Autor
+commentsearch.field.main_url = Url
+commentsearch.field.email = Email
+commentsearch.field.description = Descriere
+commentsearch.value = Value 
+
+commentsearch.publishedstate = Statut publicat
+commentsearch.publishedstate.hidden = Ascuns
+commentsearch.publishedstate.published = Publicat
+
+commentsearch.status = Statut
+
+commentsearch.order = Ordine
+commentsearch.order.datedesc= data (desc.)
+commentsearch.order.dateasc= data (asc.)
+commentsearch.order.articletitle= titlul articolui
+
+commentsearch.searchbutton = Cauta
+
+
+# confirm
+confirm.htmltitle=confirmare de stergere
+confirm.really_delete=Esti sigur ca vrei sa stergi acest articol?
+confirm.text=Aceasta operatiune este ireversibila.
+
+
+# content
+content.htmltitle=Articol 
+content.owner=Proprietar
+content.language=Limba 
+content.articletype=Tip de articol
+content.topic=Subiect
+content.title=Titlul Lung
+content.subtitle=Titlul scurt
+content.edittitle=Titlul de context
+content.location=Loc
+content.creator=Autor
+content.creator.email=E-mail
+content.creator.url=Web address
+content.creator.address=Adresa
+content.creator.telephone=Telefon
+content.abstract=Abstract
+content.content=Continut
+content.html=HTML
+content.comment=Comentar intern
+content.internal=(intern)
+
+content.attachments=Atasamente
+content.images=Imagini
+content.audio=Audio
+content.video=Video
+content.other=Alta media
+content.media=Media 
+content.addimage=adauga imagine
+content.uploadimage=incaraca imagine
+content.addaudio=adauga audio
+content.uploadaudio=incarca audio
+content.addvideo=adauga video
+content.uploadvideo=incarca video
+content.addother=adauga alta media
+content.uploadother=incarca alta media
+
+content.creationdate=data 
+content.modificationdate=ultima schimbare
+content.status=Statut
+content.type=Tip de articol
+content.import_date=Data de importare
+content.lastchange_date=Ultima modificare
+content.create_date=Data
+content.published=publicat
+content.comments=comentarii
+
+content.family=Copii si Parinti
+content.children=Copii
+content.viewchildren=view 
+content.parent=Parinte
+content.viewparent=view
+content.clearparent=de-selecteaza
+content.selectparent=selecteaza
+
+content.operation.hide=ascunde
+content.operation.unhide=ne-ascunde
+content.operation.newswire=newswire 
+
+contentsearch.value = cauta
+contentsearch.field = field
+contentsearch.field.title = Titlu
+contentsearch.field.creator = Autor
+contentsearch.field.contents=Continut
+contentsearch.field.creator_email = Email
+contentsearch.field.creator_main_url = Web address
+
+contentsearch.publishedstate = statut de publicare
+contentsearch.publishedstate.hidden=ascuns
+contentsearch.publishedstate.published=publicat
+
+contentsearch.articletype = tip de articol
+
+contentsearch.order = in ordine de
+contentsearch.order.datedesc=cel mai nou primul
+contentsearch.order.dateasc=cel mai vechi primul
+contentsearch.order.title=Titlu
+contentsearch.order.creator=Aautor
+contentsearch.searchbutton=Cauta
+
+
+#contentlist
+contentlist.htmltitle=Articole
+contentlist.comments=Comentarii
+contentlist.select=Selecteaza
+
+
+# language
+language.htmltitle=Llimba
+language.id=Id 
+language.name=Limba
+language.code=Limbaj cod
+
+languagelist.htmltitle=Limbi
+
+# login
+login.htmltitle=login
+login.info=Aceasta parte este accesibila doar celor care sint autorizati. Daca doresti sa participi in grupul editorial, contacteaza-ne la {0}. 
+login.title=login
+login.name=Login
+login.password=Parola
+login.language=Limba
+login.submit=  OK
+
+
+# mediafolder
+mediafolder.htmltitle=dosarmedia
+mediafolder.id=id
+mediafolder.date=data
+mediafolder.name=nume
+mediafolder.location=loc
+mediafolder.keywords=keywords
+mediafolder.comment=comentariu
+
+mediafolderlist.htmltitle=media folder list
+
+
+# message
+message.htmltitle=messages
+message.id=id
+message.date=data
+message.title=titlu
+message.creator=autor
+message.text=text
+message.textinfo=(max. 5 linii / 250 caractere)
+
+messagelist.htmltitle=lista de mesaje
+
+# admin start page
+start.htmltitle=admin
+
+start.content.new=articol nou
+start.show=arata
+start.comment.open_by_id=open comment #
+start.content.open_by_id=open article #
+
+start.content.hidden=arata toate articolele ascunse
+start.content.not_published=articole inca nepublicate
+start.content.with_media=cu media
+start.content.last_changes=ultimele schimbari
+start.content.with_comments=cu comentarii interne
+start.content.all=toate articolele
+start.content.search=cauta
+
+start.allarticlesoftype={0}
+start.allcommentswithstatus={0}
+
+start.producers.title=GENEREAZA MANUAL
+start.producers.produceAllNew=genereaza totul nou
+start.producers.recipe.allnew=genereaza totul nou
+
+start.producers.advanced=pagina avansata (utilizati cu grija!)
+
+start.administer.title=ADMINISTREAZA
+start.administer.comments=comentarii
+
+start.comments.title=COMENTARII
+
+start.breaking.title=ultimele stiri
+start.articles.title=ARTICOLE
+start.fileedit.includes.title=edit include files
+start.addandedit.title=ADD / EDIT
+start.extra.title=EXTRA
+start.search.title=SEARCH
+start.other_media.title=alta media
+start.images.title=poze
+start.video.title=video
+start.audio.title=audio
+start.media.title=MEDIA
+start.mediafolder.title=dosarmedia
+start.languages.title=LIMBI
+start.imcs.title=IMCS
+start.messageboard.title=MESSAGEBOARD
+start.messageboard.no_messages=no messages
+
+start.superusermenu=super-user functions (use with care!)
+
+
+# topic
+
+topic.htmltitle=topic
+
+topic.id=id
+topic.title=nume
+topic.description=descriere
+topic.filename=numefisier
+topic.main_url=main infopage
+topic.archive_url=url arhiva
+
+topiclist.htmltitle=topiclist
+
+
+# users
+user.htmltitle=User
+user.login=Login
+user.ownpassword=Your own password
+user.oldpassword=Old password
+user.password=Password
+user.password2=Password (confirmation)
+user.admin=Admin
+
+userlist.htmltitle=Users
+
+
+#articletype
+articletype.htmltitle=Tip de articol
+articletype.id=id
+articletype.name=Name
+
+articletypelist.htmltitle=Tipuri de articole
+
+
+
+#commentstatus
+commentstatus.htmltitle=Statut comentar
+commentstatus.id=id
+commentstatus.name=Nume
+
+commentstatuslist.htmltitle=Comment status values
+
+
+
+#file editing
+fileedit.htmltitle = Editeza fisier
+fileedit.filename = Numefisier
+fileedit.subdirectory = Subdirectory
+
+fileeditlist.htmltitle = Fisier cu posibilitate de editare
+fileeditlist.filename = Filename
+fileeditlist.dirname = Subdirectory
+
+
+#producers
+producer.producer = Producer name
+producer.verb.name = Task name
+producer.verb.description = Task description
+producer.verb.enqueue = enqueue
+
+producer.job.name = Job
+producer.job.status = Statut
+producer.job.date = Ultima schimbare
+producer.job.empty = Queue is empty
+producer.job.runningtime = Running time
+
+producer.jobqueue.canceljobs = Cancel selected jobs
+producer.jobqueue.cancelalljobs = Cancel all pending jobs
+producer.jobqueue.title = Current jobs
+producer.jobqueue.refresh = refresh
+producer.producerlist.title = Add a new job
+
+producerqueue.htmltitle = Genereaza manual
+
+
+#superusermenu
+superusermenu.htmltitle = Super-user functions
+superusermenu.manage = MANAGE
+superusermenu.topics = subiecte
+superusermenu.articletypes =  tipuri de articole
+superusermenu.comment_statuses =  comment status values
+superusermenu.users =  users
+superusermenu.languages =  
+superusermenu.abuse = apply anti-abuse measures
+superusermenu.imcs =  IMCS (obsolete)
+
+
+#abuse
+abuse.htmltitle = anti-abuse measures
+
+abuse.setting = Setting
+abuse.value = Value
+
+abuse.disableopenpostings=Turn off open posting
+abuse.openpostingpassword=Require a password for open postings
+abuse.logpostings=Log IPs for open postings
+abuse.logsize=Logging buffer size
+abuse.cookies=Use cookies for blocked users
+abuse.articleaction=Action for blocked article
+abuse.commentaction=Action for blocked comment
+
+abuse.showlog=Show the IP log
+abuse.showfilters=Manage filters
+
+abuse.log.time=Time
+abuse.log.address=IP number
+abuse.log.object=Object
+abuse.log.browser=Browser
+abuse.log.filtertype=Filter type
+abuse.log.filterexpression=Expression
+
+abuse.filters = Filters
+abuse.filters.movedown = move down
+abuse.filters.moveup = move up
+
+abuse.filter.type = Type
+abuse.filter.expression = Expression
+abuse.filter.articleaction = Article 
+abuse.filter.commentaction = Comment 
+abuse.filter.comments = Comments (internal usage)
+abuse.filter.lasthit = Last hit
+abuse.filter.htmltitle = Edit filter
+
+abuse.filtertype.ip = IP Number
+abuse.filtertype.regexp = Regular expression
+
+abuse.filtererror.title = Error:
+abuse.filtererror.invalidtype = Invalid filter type
+abuse.filtererror.invalidexpression = Invalid expression for this type
+
+abuse.filters.htmltitle = Anti-abuse filter rules
+abuse.log.htmltitle = Anti-abuse open posting log
+
+# head
+head.start=start
+head.logout=logout
+head.changepassword=password
+head.help=help
+head.search=search
+head.logged_in=logged in
+
+# foot
+foot.top=top
+
+
+########## dynamic values ##########
+
+# (users can add new types, how to translate these)
+# suggestion if not in bundle use value as Text
+
+
+# Article types
+articletypes.openposting=Open posting
+articletypes.newswire=Newswire
+articletypes.feature=Feature
+articletypes.topicspecial=Topic-special
+articletypes.startspecial=Startpage-special
+
+# Comment status values
+commentstatus.normal=normal
+
+
+
+########## error ##########
+error.htmltitle=the system caused an error
+error.title=The system caused an error
+error.text=This can happen. Even if the following error message is not be comprehensible for you, <br>it might be helpful to <a href="mailto:{0}">{1}</a>:
+error.text2=So please send an e-mail with the <font color="Red">red text</font> and detailed information regarding the events that led to this error to <a href="mailto:{0}">{1}</a>. Thanks!
+
+usererror.htmltitle=Input error
+usererror.title=Input error
+usererror.text=Your input caused the following error:
+usererror.what_to_do=Please press the back button and try it again
+
+media.error.unsupportedformat=The format of the media you uploaded is not supported
+user.error.missingpasswords=The new password must be entered twice
+user.error.passwordmismatch=The passwords are not equal
+user.error.missingpassword=A password must be entered
+user.error.incorrectpassword= Incorrect password
+
+
+
+
+########## infomessages ##########
+infomessage.htmltitle = Information
+infomessage.recipeAddedToQueue = Your request has been added to the queue.
+
diff --git a/dbscripts/conversion/mir_oid.pl b/dbscripts/conversion/mir_oid.pl
deleted file mode 100755 (executable)
index 6fa27a3..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/perl -w
-use Pg;
-
-#if (!defined($ARGV[0])) {
-#        print "Usage: $0 name_of_filelist_file\n";
-#        exit 1;
-#}
-
-#$dump="$ARGV[0]";
-
-my $conn = Pg::connectdb("dbname=indy3 user=postgres 
-host=localhost");
-( PGRES_CONNECTION_OK eq $conn->status )
-    and print "Pg::connectdb ........... ok\n"
-    or  die   "Pg::connectdb ........... not ok: ", $conn->errorMessage;
-
-
-    #open(DUMP,"$dump") || die "can't open dump file $dump";
-
-    #$basedir="/cdrom";
-
-Pg::doQuery($conn, "select content_data from content", \@ary);
-
-for $i ( 0 .. $#ary ) {
-    for $j ( 0 .. $#{$ary[$i]} ) {
-        print "$ary[$i][$j]\t";
-    }
-    print "\n";
-}
-
-#while(<DUMP>) {
-#        chomp;
-#        next if (/^$/ || /^\s*$/);
-#
-#              # exception liste einlesen...
-#
-#
-#                              # hier insert:
-#
-#                              $conn->exec("BEGIN");
-#                              $oid= $conn->lo_import("$filename");
-#                              print $conn->errorMessage."\n";
-#                              print "trying to insert icon\n";
-#                              $ioid= $conn->lo_import("/tmp/iconblob.jpg");
-#                              print $conn->errorMessage."\n";
-#                              $sql="INSERT INTO images 
-#(title,date,place,author,to_img_layout,to_img_type,is_classified,to_media_f
-#older,to_img_color,comment,webdb_create,img_width,img_height,image_data,ico
-#n_data) ".
-#                                       "VALUES ('".$titel."','20010108','".$ort.
-#                                       "','Hoch die Kampf 
-#dem','".$layout."','1','0','2','2','".$comment."',now(),'".$img_width."','"
-#.$img_height.
-#                                       "','".$oid."','".$ioid."')";
-#                              print $sql."\n";
-#                              $conn->exec( $sql );
-#                              print $conn->errorMessage."\n";
-#                              $conn->exec("END");
-#
-#
-#
-#}
-## end of while
-#
-
-
-
diff --git a/dbscripts/dupetrigger/INSTALL b/dbscripts/dupetrigger/INSTALL
deleted file mode 100755 (executable)
index e07b3e9..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-The dupetrigger
-
-MOTIVATION
-
-Often, users commit their comments and articles multiple times if they
-don't believe the comment has been inserted into the databases. This is
-clearly one of the disadvantages of the otherwise clever caching strategy
-used by Mir. Without proper handling, this duplicate content will enlarge
-the database and make the appearance of the generated web pages be less
-satisfactory. 
-
-
-SOLUTIONS
-
-There are two approaches to get rid of these duplicate entries
-(hereafter called "dupes"). The first approach is the dupetrigger that 
-ensures that no entries in a given table are the same. This is the approach
-currently pursued in Mir. If this trigger cannot be compiled or doesn't work
-for any reason, you may work-around this problem by issuing the following
-commands on your psql prompt:
-
-CREATE UNIQUE INDEX idx_content_dupe ON content (title, subtitle, creator, description, content_data);
-CREATE UNIQUE INDEX idx_comment_dupe ON comment (creator, to_media, description, title);
-
-Please note that this approach will work but the implications on the Mir 
-software have not been tested, yet. Maybe Mir will respond with an error 
-or with other unexpected behaviour, but it should do no harm to the
-database. The dupetrigger has been tested with Mir and is currently being 
-operated on de.indymedia.org.
-
-
-HOW TO INSTALL THE DUPE TRIGGER
-
-To install the trigger do the following:
-
-# cp Makefile-dist Makefile
-
-# edit Makefile
-(and change pathnames and PGVERSION if neccessary).
-
-# make
-(This makes the trigger binary and places it in INSTALLDIR with permissions 644)
-
-# edit postgresql.script
-(And change the path to dupetrigger.so to INSTALLDIR)
-
-# psql -Upostgres -f postgresql.script Mir 
-(This installs the the trigger binary and creates a new trigger.)
diff --git a/dbscripts/dupetrigger/Makefile-dist b/dbscripts/dupetrigger/Makefile-dist
deleted file mode 100755 (executable)
index aa3cd0d..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-# Makefile
-
-# Set the following directory so that it contains spi.h and trigger.h
-PGINC=/usr/include/postgresql/server
-
-#PGVERSION=-DPG70
-#PGVERSION=-DPG71
-PGVERSION=-DPG72
-
-# If changed, also change postgresql.script
-INSTALLDIR=/var/lib/postgres/data
-
-
-
-CC=gcc
-CFLAGS=-I$(PGINC) $(PGVERSION)
-
-install: dupetrigger.so
-       cp dupetrigger.so $(INSTALLDIR)
-       chmod 644 $(INSTALLDIR)/dupetrigger.so
-       #
-       # Now, change the path to dupetrigger.so in postgresql.script to the
-       # absolute path where dupetrigger.so is installed (${INSTALLDIR})
-
-dupetrigger.so: dupetrigger.o
-       $(CC) -shared -dynamic -o dupetrigger.so dupetrigger.o
-
-clean:
-       rm -rf dupetrigger.o dupetrigger.so
-
-
-tidy: clean
-       rm -rf *~
-       
\ No newline at end of file
diff --git a/dbscripts/dupetrigger/README b/dbscripts/dupetrigger/README
deleted file mode 100755 (executable)
index a506867..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-Dupe check Trigger
-by Matthias "Trigger Hippy" Jordan <mjordan@code-fu.de>
-
-The files in this directory are needed to create a PostgreSQL trigger that
-is used to ensure that no comment and no article is posted twice. This
-happens very often by accident and is very disturbing so we have to prevent
-this somehow. Because Indymedia databases will hopefully grow big very fast,
-we want to do this check as fast as possible. 
-
-So Mir simply issues the INSERT. By this INSERT statement, a trigger gets,
-well, triggered that calculates a CRC-32 checksum of the comment and
-searches for rows with the same checksum. If it finds the checksum, the
-INSERT gets aborted. If the checksum isn't found, it is appended to the row
-and the INSERT is executed.
-
-The trigger works for INSERTs and UPDATEs.
diff --git a/dbscripts/dupetrigger/dupetrigger.c b/dbscripts/dupetrigger/dupetrigger.c
deleted file mode 100755 (executable)
index ef823fa..0000000
+++ /dev/null
@@ -1,298 +0,0 @@
-//
-//
-// This File contructs a PostgreSQL trigger.
-//
-// USAGE:
-// dupecheck(debug, column1, column2, ...);
-//
-// debug:   if "yes" dupecheck generates debug output
-// columns: the names of the columns that are used to calculate the
-//          checksum
-//
-//
-// The trigger is normally fired BEFORE an INSERT or UPDATE of an
-// article or comment. It first calculates a CRC-32 checksum of the
-// specified columns of the row to be inserted or updated and
-// checks whether there exists already another row with the same
-// checksum. In this case, the trigger returns NULL and thus,
-// aborts the SQL command.
-//
-// Author: Matthias Jordan <mjordan@code-fu.de>
-//
-
-
-#include "executor/spi.h"
-#include "commands/trigger.h"
-#include "string.h"
-
-
-
-#ifndef PG70
-       extern Datum dupecheck(PG_FUNCTION_ARGS);
-       PG_FUNCTION_INFO_V1(dupecheck);
-#else
-       extern Datum dupecheck(void);
-#endif
-
-
-
-
-
-//
-//
-// CRC32 stuff
-//
-
-// crc32 table based on the following polynom
-#define CRC32_POLY 0x04c11db7     /* AUTODIN II, Ethernet, & FDDI */
-
-u_long crc32_table[256] = 
-       {0x0000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
-       0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
-       0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7,
-       0x4593e01e, 0x4152fda9, 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75,
-       0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3,
-       0x709f7b7a, 0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
-       0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58, 0xbaea46ef,
-       0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d,
-       0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49, 0xc7361b4c, 0xc3f706fb,
-       0xceb42022, 0xca753d95, 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1,
-       0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0,
-       0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072,
-       0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, 0x018aeb13, 0x54bf6a4,
-       0x0808d07d, 0x0cc9cdca, 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde,
-       0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08,
-       0x571d7dd1, 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
-       0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b, 0xbb60adfc,
-       0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6,
-       0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a, 0xe0b41de7, 0xe4750050,
-       0xe9362689, 0xedf73b3e, 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2,
-       0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34,
-       0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637,
-       0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, 0x4f040d56, 0x4bc510e1,
-       0x46863638, 0x42472b8f, 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53,
-       0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5,
-       0x3f9b762c, 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0xe56f0ff,
-       0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e, 0xf5ee4bb9,
-       0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b,
-       0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd,
-       0xcda1f604, 0xc960ebb3, 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7,
-       0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71,
-       0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3,
-       0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, 0x4e8ee645, 0x4a4ffbf2,
-       0x470cdd2b, 0x43cdc09c, 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8,
-       0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e,
-       0x18197087, 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0xfdc1bec,
-       0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d, 0x2056cd3a,
-       0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0,
-       0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c, 0xe3a1cbc1, 0xe760d676,
-       0xea23f0af, 0xeee2ed18, 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4,
-       0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662,
-       0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
-       0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4};
-
-
-static u_long crc32(u_char *buf, unsigned len)
-{
-        u_char *p;
-        u_long  crc;
-
-        crc = 0xffffffff;       /* preload shift register, per CRC-32 spec */
-        for (p = buf; len > 0; ++p, --len)
-        {
-                crc = (crc << 8) ^ crc32_table[(crc >> 24) ^ *p];
-        }
-        return ~crc;            /* transmit complement, per CRC-32 spec */
-} /* crc32 */
-
-
-
-
-
-//
-//
-// Trigger stuff
-//
-
-
-
-
-#ifndef PG70
-Datum dupecheck(PG_FUNCTION_ARGS)
-{
-       TriggerData *trigdata = (TriggerData *) fcinfo->context;
-#else
-Datum dupecheck(void)
-{
-       TriggerData *trigdata = CurrentTriggerData;
-#endif
-       TupleDesc       tupdesc;
-       HeapTuple       rettuple;
-       bool            isnull,
-                               debug_on;
-       int                     ret = 0, i, fnumber;
-       u_long rowstrlen = 0,
-               crc;
-       char **items, // will point to a malloc'ed array
-               *rowstring,
-               *query,
-               **args,
-               *relation;
-       int num,
-               nargs,
-               nitems;
-       
-       /* Make sure trigdata is pointing at what I expect */
-#ifdef PG70
-       if (!CurrentTriggerData)
-#else          
-       if (!CALLED_AS_TRIGGER(fcinfo))
-#endif 
-               elog(ERROR, "dupecheck: not fired by trigger manager");
-       /* tuple to return to Executor */
-       if (TRIGGER_FIRED_BY_UPDATE(trigdata->tg_event))
-               rettuple = trigdata->tg_newtuple;
-       else
-               rettuple = trigdata->tg_trigtuple;
-       
-       if (TRIGGER_FIRED_BY_DELETE(trigdata->tg_event))
-               return PointerGetDatum(NULL);
-
-
-       // Initialize arguments and see whether the arguments are ok.
-       args = trigdata->tg_trigger->tgargs;
-       nargs = trigdata->tg_trigger->tgnargs;
-
-       if (nargs < 2)
-       {
-               elog(DEBUG, "dupecheck: USAGE: dupeckeck(debug, col1, col2, ...)");
-               return PointerGetDatum(NULL);
-       }
-
-       debug_on = !strcmp("yes", args[0]);
-
-       tupdesc = trigdata->tg_relation->rd_att;
-       
-       /* Connect to SPI manager */
-       if ((ret = SPI_connect()) != SPI_OK_CONNECT)
-       {
-               elog(NOTICE, "dupecheck: SPI_connect returned error %d", ret);
-       }
-
-       // Now we are connected to the database's SPI manager
-       // We will now construct a string of some important row values. 
-       // First, we determine how long the string will be to allocate memory
-       // To include an additional item, add another SPI_getvalue line and
-       // increase maxitems above by 1
-       
-
-       // Allocate array for the argument pointers
-       nitems = nargs - 1; // don't take the debug parameter as a row name;
-       items = (char **) malloc(sizeof(char*) * nitems);
-       if (items == NULL)
-       {
-               SPI_finish();
-               return PointerGetDatum(NULL);
-       }
-
-       // Collect arguments
-       for (i = 1; (i < nargs); i++)
-       {
-               items[i-1] = SPI_getvalue(rettuple, tupdesc, SPI_fnumber(tupdesc, args[i]));
-               if (debug_on)
-               {
-                       elog(DEBUG, "dupecheck: Argument %d: row %s -> %s\n", i, args[i], items[i-1]);
-               }
-       }
-       
-
-       // Find out length of row string to be constructed
-       for (i=0; (i < nitems); i++)
-       {
-               if (items[i] != NULL)
-               {
-                       rowstrlen += strlen(items[i]);
-               }
-       }
-       
-       rowstring = malloc(rowstrlen+1); // add space for 0-terminator
-       if (rowstring == NULL)
-       {
-               free(items);
-               SPI_finish();
-               return PointerGetDatum(NULL);
-       }
-
-       // Construct row string
-       *rowstring = 0;
-       for (i=0; (i < nitems); i++)
-       {
-               if (items[i] != NULL)
-               {
-                       strcat(rowstring, items[i]);
-               }
-       }
-
-       // rowstring now contains the data of the maxitems important
-       // items of the table record. Now we calculate the CRC-32 checksum
-       // of the rowstring
-
-       crc = crc32(rowstring, rowstrlen); 
-
-       // Now we allocate some space and construct the SQL query
-       relation = SPI_getrelname(trigdata->tg_relation);
-       query = malloc(40 + strlen(relation) + 11 + 2 + 1); // SELECT part + relation + crc32 + "';" + 0-term
-       if (query == NULL)
-       {
-               // Big problem
-               free(items);
-               free(rowstring);
-               SPI_finish();
-               return PointerGetDatum(NULL);
-       }
-       
-       sprintf(query, "SELECT count(*) FROM %s WHERE checksum='%ld';", relation, crc);
-       if (debug_on)
-       {
-               elog(DEBUG, "dupecheck: %s", query);
-       }
-       ret = SPI_exec(query, 2);
-       
-       if ((ret == SPI_OK_SELECT) && (SPI_processed > 0))
-       {
-#ifdef PG72
-               num = (int) DatumGetInt64(SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, &isnull));
-#else          
-               num = SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, &isnull);
-#endif 
-       }
-
-       if ((ret == SPI_OK_SELECT) && (num > 0) && !(TRIGGER_FIRED_BY_UPDATE(trigdata->tg_event)))
-       {
-               elog(NOTICE, "dupecheck: UBD in %s detected, dupe dropped", relation);
-               rettuple = NULL; // reject operation
-       }
-       else
-       {
-               // The checksum wasn't found. So we modify the tuple to be 
-               // inserted and add the fresh checksum.
-               int attnum;
-               Datum value;
-               char nulls = 0;
-               
-               if (debug_on)
-               {               
-                       elog(NOTICE, "dupecheck: Adding checksum to row");
-               }
-               attnum = SPI_fnumber(tupdesc, "checksum");
-               value = (Datum) crc;
-               rettuple = SPI_modifytuple(trigdata->tg_relation, rettuple, 1, &attnum, &value, &nulls);
-       }
-
-       free(items);
-       free(rowstring);
-       free(query);
-       SPI_finish();
-       return PointerGetDatum(rettuple);
-}
-    
diff --git a/dbscripts/dupetrigger/postgresql.sript b/dbscripts/dupetrigger/postgresql.sript
deleted file mode 100755 (executable)
index 9e526fc..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-DROP TRIGGER commdupetrigger ON comment;
-DROP TRIGGER contentdupetrigger ON content;
-DROP FUNCTION dupecheck();
-CREATE FUNCTION dupecheck() RETURNS OPAQUE AS '/var/lib/postgres/data/dupetrigger.so' LANGUAGE 'C';
-CREATE TRIGGER contentdupetrigger BEFORE INSERT OR UPDATE ON content FOR EACH ROW EXECUTE PROCEDURE dupecheck("no", "title", "subtitle", "creator", "description", "content_data");
-CREATE TRIGGER commdupetrigger BEFORE INSERT OR UPDATE ON comment FOR EACH ROW EXECUTE PROCEDURE dupecheck("no", "creator", "to_media", "description", "title");
diff --git a/dbscripts/hibernate_schema.sql b/dbscripts/hibernate_schema.sql
new file mode 100755 (executable)
index 0000000..8babd3b
--- /dev/null
@@ -0,0 +1,244 @@
+alter table role_x_rights drop constraint fk_right_role;
+alter table role_x_rights drop constraint fk_role_right;
+alter table category drop constraint fk_category_categorytype;
+alter table category drop constraint fk_category_parentcategory;
+alter table category drop constraint fk_topic_childcategories;
+alter table media drop constraint fk_media_user;
+alter table media_x_media drop constraint fk_mediaxmedia_sourcemedia;
+alter table media_x_media drop constraint fk_mediaxmedia_relatedmedia;
+alter table media_x_media drop constraint fk_mediaxmedia_mediarelationtype;
+alter table uploaded_media drop constraint fk_uploadedmedia_mediafolder;
+alter table uploaded_media drop constraint fk_uploadedmedia_mediatype;
+alter table uploaded_media drop constraint fk_uploadedmedia_media;
+alter table article drop constraint fk_article_language;
+alter table article drop constraint fk_article_articlestatus;
+alter table article drop constraint fk_article_media;
+alter table article drop constraint fk_article_lockinguser;
+alter table article_x_category drop constraint fk_article_category_2;
+alter table article_x_category drop constraint fk_articlexcategory_category;
+alter table article_x_category drop constraint fk_article_category;
+alter table article_x_category drop constraint fk_category_article;
+alter table article_x_category drop constraint fk_articlexcategory_article_type;
+alter table article_x_category drop constraint fk_articlexcategory;
+alter table users drop constraint fk_user_role;
+alter table users drop constraint fk_role_user;
+drop table role_x_rights;
+drop table category_type;
+drop table media_type;
+drop table rights;
+drop table category;
+drop table media;
+drop table roles;
+drop table article_type;
+drop table media_x_media;
+drop table language;
+drop table uploaded_media;
+drop table article;
+drop table media_relation_type;
+drop table article_x_category;
+drop table breaking_news_items;
+drop table comment_status;
+drop table users;
+drop table media_folder;
+drop table messages;
+drop sequence language_id_seq;
+drop sequence users_id_seq;
+drop sequence media_relation_type_id_seq;
+drop sequence category_type_id_seq;
+drop sequence breaking_id_seq;
+drop sequence media_type_id_seq;
+drop sequence article_type_id_seq;
+drop sequence right_id_seq;
+drop sequence comment_status_id_seq;
+drop sequence media_folder_id_seq;
+drop sequence media_id_seq;
+drop sequence category_id_seq;
+drop sequence role_id_seq;
+create table role_x_rights (
+   role_id int4 not null,
+   right_id int4 not null,
+   primary key (role_id, right_id)
+);
+create table category_type (
+   id int4 not null,
+   name varchar(40) not null,
+   primary key (id)
+);
+create table media_type (
+   id int4 not null,
+   name varchar(80) not null,
+   mime_type varchar(40) not null,
+   classname varchar(80) not null,
+   tablename varchar(80) not null,
+   dcname varchar(20),
+   primary key (id)
+);
+create table rights (
+   id int4 not null,
+   name varchar(80) not null,
+   description varchar(255),
+   primary key (id)
+);
+create table category (
+   id int4 not null,
+   title varchar(80) not null,
+   description varchar(255),
+   filename varchar(20) not null,
+   category_type int4,
+   parent_id int4,
+   primary key (id)
+);
+create table media (
+   id int4 not null,
+   title varchar(255),
+   description text,
+   creator varchar(80),
+   creator_main_url varchar(255),
+   creator_email varchar(80),
+   creator_address varchar(80),
+   creator_phone varchar(80),
+   internal_comment varchar(255),
+   is_produced bool not null,
+   creation_date timestamp not null,
+   last_change timestamp,
+   to_publisher int4,
+   primary key (id)
+);
+create table roles (
+   id int4 not null,
+   name varchar(16) not null unique,
+   description varchar(255) not null,
+   primary key (id)
+);
+create table article_type (
+   id int4 not null,
+   name varchar(40) not null,
+   primary key (id)
+);
+create table media_x_media (
+   source_media_id int4 not null,
+   media_relation_type_id int4 not null,
+   related_media_id int4 not null,
+   primary key (source_media_id, related_media_id)
+);
+create table language (
+   id int4 not null,
+   name varchar(40) not null,
+   code varchar(2) not null,
+   primary key (id)
+);
+create table uploaded_media (
+   media_id int4 not null,
+   publish_server varchar(255),
+   publish_path varchar(255),
+   storage_path varchar(255),
+   icon_produced bool not null,
+   icon_path varchar(255),
+   size int4,
+   to_media_folder int4,
+   to_media_type int4,
+   primary key (media_id)
+);
+create table article (
+   media_id int4 not null,
+   date varchar(8) not null,
+   subtitle varchar(255),
+   edittitle varchar(255),
+   content text not null,
+   is_html bool not null,
+   to_article_status int4,
+   to_locking_user int4,
+   to_language int4,
+   primary key (media_id)
+);
+create table media_relation_type (
+   id int4 not null,
+   name varchar(255),
+   primary key (id)
+);
+create table article_x_category (
+   article_type_id int4 not null,
+   category_id int4 not null,
+   article_id int4 not null,
+   primary key (category_id, article_id)
+);
+create table breaking_news_items (
+   id int4 not null,
+   text varchar(255) not null,
+   creationDate timestamp not null,
+   primary key (id)
+);
+create table comment_status (
+   id int4 not null,
+   name varchar(40) not null,
+   primary key (id)
+);
+create table users (
+   id int4 not null,
+   login varchar(16) not null unique,
+   password varchar(255) not null,
+   internal_comment varchar(255),
+   is_disabled bool not null,
+   email varchar(255) not null,
+   profile varchar(255),
+   creationDate timestamp not null,
+   lastlogin timestamp,
+   to_role int4,
+   primary key (id)
+);
+create table media_folder (
+   id int4 not null,
+   name varchar(255) not null,
+   date varchar(8) not null,
+   place varchar(80),
+   keywords varchar(255),
+   internal_comment varchar(255),
+   creationDate timestamp not null,
+   last_change timestamp,
+   primary key (id)
+);
+create table messages (
+   id int4 not null,
+   title varchar(30),
+   description varchar(255) not null,
+   creator varchar(30) not null,
+   creation_date timestamp not null,
+   primary key (id)
+);
+alter table role_x_rights add constraint fk_right_role foreign key (right_id) references rights;
+alter table role_x_rights add constraint fk_role_right foreign key (role_id) references roles;
+alter table category add constraint fk_category_categorytype foreign key (category_type) references category_type;
+alter table category add constraint fk_category_parentcategory foreign key (parent_id) references category;
+alter table category add constraint fk_topic_childcategories foreign key (parent_id) references category;
+alter table media add constraint fk_media_user foreign key (to_publisher) references users;
+alter table media_x_media add constraint fk_mediaxmedia_sourcemedia foreign key (source_media_id) references media;
+alter table media_x_media add constraint fk_mediaxmedia_relatedmedia foreign key (related_media_id) references media;
+alter table media_x_media add constraint fk_mediaxmedia_mediarelationtype foreign key (media_relation_type_id) references media_relation_type;
+alter table uploaded_media add constraint fk_uploadedmedia_mediafolder foreign key (to_media_folder) references media_folder;
+alter table uploaded_media add constraint fk_uploadedmedia_mediatype foreign key (to_media_type) references media_type;
+alter table uploaded_media add constraint fk_uploadedmedia_media foreign key (media_id) references media;
+alter table article add constraint fk_article_language foreign key (to_language) references language;
+alter table article add constraint fk_article_articlestatus foreign key (to_article_status) references comment_status;
+alter table article add constraint fk_article_media foreign key (media_id) references media;
+alter table article add constraint fk_article_lockinguser foreign key (to_locking_user) references users;
+alter table article_x_category add constraint fk_article_category_2 foreign key (article_id) references article;
+alter table article_x_category add constraint fk_articlexcategory_category foreign key (category_id) references category;
+alter table article_x_category add constraint fk_article_category foreign key (article_id) references article;
+alter table article_x_category add constraint fk_category_article foreign key (category_id) references category;
+alter table article_x_category add constraint fk_articlexcategory_article_type foreign key (article_type_id) references article_type;
+alter table article_x_category add constraint fk_articlexcategory foreign key (article_type_id, category_id) references article_x_category;
+alter table users add constraint fk_user_role foreign key (to_role) references roles;
+alter table users add constraint fk_role_user foreign key (to_role) references roles;
+create sequence language_id_seq;
+create sequence users_id_seq;
+create sequence media_relation_type_id_seq;
+create sequence category_type_id_seq;
+create sequence breaking_id_seq;
+create sequence media_type_id_seq;
+create sequence article_type_id_seq;
+create sequence right_id_seq;
+create sequence comment_status_id_seq;
+create sequence media_folder_id_seq;
+create sequence media_id_seq;
+create sequence category_id_seq;
+create sequence role_id_seq;
diff --git a/dbscripts/lib/codec.pl b/dbscripts/lib/codec.pl
deleted file mode 100755 (executable)
index 9fb09d7..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-#!/usr/bin/perl
-
-################################################################
-###    codec
-###
-### $VER: 2.1 (8bit,quoted-printable,perlish)$
-### USAGE: $codec=&Codec::new('perlish');
-###             $encoded=$codec->encode($clear);
-###             $clear=$codec->decode($encoded);       
-
-package Codec;
-
-
-$VERSION="1.1";
-
-sub new {
-       my($type)=shift;
-       my($res);
-       
-       return undef unless (defined $encode{$type});
-       
-       $$res{'encode'}=$encode{$type};
-       $$res{'decode'}=$decode{$type};
-       $$res{'type'}=$type;
-               
-       bless $res, "Codec";
-       
-       return $res;
-       }
-
-sub reset {
-       }
-
-sub encode {
-       my($obj,$str)=@_;
-       return &{$$obj{'encode'}}($str);
-       }
-       
-sub decode {   
-       my($obj,$str)=@_;
-       return &{$$obj{'decode'}}($str);
-       }
-
-sub name {
-       my($obj)=shift;
-       return $$obj{'type'};
-       }
-       
-################################################################
-###    local
-
-$crlf=pack("CC",13,10);
-
-################################################################
-###    id
-
-$encode{'8bit'}=sub { return $_[0]; };
-$decode{'8bit'}=sub { return $_[0]; };
-
-################################################################
-###    perlish
-
-sub quote_perlish {
-       my($str)=@_;
-       
-       $str=~s/\\/\\\\/g;
-       
-       $str=~s/\"/\\042/g;
-       $str=~s/\'/\\047/g;
-
-       $str=~s/\@/\\@/g;
-       $str=~s/([\x80-\xFF])/sprintf("\\x%02x",ord($1))/eg;
-       $str=~s/([\x00-\x20])/sprintf("\\x%02x",ord($1))/eg;
-       return $str;
-       }
-
-sub convert_perlish {
-       my($item)=shift;
-       my($type,$key,$value,@res,$entry);
-       
-       $type=ref($item);
-       
-       if ((!defined $type)||($type eq "")) {
-               return "\042".&quote_perlish($item)."\042";
-               }
-       else {
-               if ($type eq "HASH") {
-                       while (($key,$value)=each %$item) {
-                               $entry="\042".&quote_perlish($key)."\042";
-                               $entry.="=>";
-                               $entry.=&convert_perlish($value);
-                               push(@res,$entry);
-                               }
-                       return "{".join(",",@res)."}";  
-                       }
-               if ($type eq "ARRAY") {
-                       foreach $value (@$item) {
-                               push(@res,&convert_perlish($value));    
-                               }
-                       return "[".join(",",@res)."]";
-                       }
-               if ($type eq "SCALAR") {
-                       return "\042".&quote_perlish($item)."\042";
-                       }       
-               return "";
-               }
-       };
-       
-$encode{'perlish'}=\&convert_perlish;
-
-$decode{'perlish'}=sub {
-       my($str)=shift;
-       my($res);
-       
-       return eval($str);
-       };
-
-################################################################
-###    quoted-printable
-
-$encode{'quoted-printable'}=sub {
-       my($str)=shift;
-       my(@lines,$item);
-       
-       
-       $str=~s/=/=3D/g;
-       $str=~s/([\x00-\x1F\x80-\xFF])/sprintf("=%02X",ord($1))/eg;
-       
-       if (length($str)>75) {
-               while (length($str)>75) {
-                       if (substr($str,73,1) eq "=") {
-                               push(@lines,substr($str,0,73)."=");     ### soft break
-                               $str=substr($str,73);
-                               }
-                       elsif (substr($str,74,1) eq "=") {
-                               push(@lines,substr($str,0,74)."=");     ### soft break
-                               $str=substr($str,74);
-                               }
-                       else {
-                               push(@lines,substr($str,0,75)."=");     ### soft break
-                               $str=substr($str,75);
-                               }
-                       }
-               push(@lines,$str);      
-               $str=join($HTTP::crlf,@lines);
-               }
-               
-       return $str;    
-       };
-
-$decode{'quoted-printable'}=sub {
-       $_[0]=~s/=([0-9a-fA-F][0-9a-fA-F])/pack("C", hex($1))/eg;
-       $_[0]=~s/=$crlf//g;
-       return $_[0];
-       };
-1;
diff --git a/dbscripts/lib/convert.pl b/dbscripts/lib/convert.pl
deleted file mode 100755 (executable)
index 5da5c63..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# convert.pl
-#
-
-sub mk_workfile {
-       my($props)=shift;
-       local(*HANLDE);
-       my($now,$count,$dir,$prefix);
-
-       $dir=$$props{'convert'}{'work_dir'};
-       $prefix=$$props{'convert'}{'work_prefix'};
-       $now=time;
-       $count=0;
-       
-       while (-f $dir.$prefix.$now.".".$count) { $count++; }
-
-       ## fast touch
-       if (sysopen(HANDLE,$dir.$prefix.$now.".".$count,O_CREATE|O_RDWR)) { close(HANDLE); }
-
-       return $dir.$prefix.$now.".".$count;
-       }
-
-sub html_to_text {
-       my($props,$text)=@_;
-       local(*HANDLE);
-       my($file,$result);
-
-       $file=&mk_workfile($props);
-       if (open(HANDLE,">".$file)) {
-               print HANDLE $text;
-               close(HANDLE);
-               }
-       else {
-               ## error - do not convert
-               return $text;
-               }
-       if (open(HANDLE,$$props{'bin'}{'html_to_text'}.$file."|")) {
-               while (<HANDLE>) {
-                       $result.=$_;    
-                       }
-               close(HANDLE);  
-               unlink($file);
-               return $result;
-               }       
-       else {
-               unlink($file);
-               return $text;
-               }
-       }
-
-1;
diff --git a/dbscripts/lib/log.pl b/dbscripts/lib/log.pl
deleted file mode 100755 (executable)
index 279ff81..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/perl
-
-#
-#      Logfile Module (3.6.1998)       
-#
-#      USAGE: tie *HANDLE, 'Logfile', '<filename>', '<modulename';
-#
-#      $VER: 1.1$
-#
-
-package Logfile;
-
-$LOCK_EX=2;
-$LOCK_UN=8;
-
-sub mkname {
-       my($name)=shift;
-       my @timestr=localtime(time);
-       
-       $name=~s/\%d/$timestr[3]/eg;
-       $name=~s/\%m/$timestr[4]+1/eg;
-       $name=~s/\%y/$timestr[5]+1900/eg;
-       
-       return $name;
-       }
-
-# no reading from logfile
-sub READLINE { return undef; } 
-sub READ { return undef; }
-sub GETC { return undef; }
-
-sub PRINT {
-       my $obj=shift;
-       my @text=@_;
-       my @timestr=localtime(time);
-       
-       local(*OUT);
-       
-       if ((scalar(@text)>1) && ($text[0]=~/^\d+$/)) {
-               my($level)=shift(@text);
-               return if ($level<$$obj{'loglevel'});
-               }
-               
-       if (open(OUT,">>".$$obj{'filename'})) {
-               flock(OUT,$LOCK_EX);
-               seek(OUT,0,2);
-               printf OUT ("%02d.%02d.%s %02d:%02d:%02d [%d] %s: %s",
-                ($timestr[3]),
-                ($timestr[4]+1),
-                ($timestr[5]+1900),
-                $timestr[2],$timestr[1],$timestr[0],
-                $$,$$obj{'module'},
-                join("",@text));
-               flock(OUT,$LOCK_UN);
-               close(OUT);
-               }
-       }
-       
-sub TIEHANDLE {
-       my $obj;
-       shift;
-       $$obj{'filename'}=&mkname(shift);
-       $$obj{'module'}=shift;
-       $$obj{'loglevel'}=(shift || 0);
-        
-       bless $obj, 'Logfile';
-       
-       return $obj;
-       }       
-1;
diff --git a/dbscripts/lib/property.pl b/dbscripts/lib/property.pl
deleted file mode 100755 (executable)
index 8ddbabf..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/perl
-
-###########################################################
-### property module
-###
-### $VER: 2.1$ 
-
-package Property;
-
-sub compile {
-       my ($value)=shift;
-       $value=~s/\$\((\w+)\)/$ENV{$1}/e;
-       return $value;
-       }
-
-sub append {
-       my($hash,$file)=@_;
-       local(*FH);
-       my($line,$cat,$slot,$key,$value,$from,$to);
-       
-       $cat="public";
-       if (open(FH,$file)) {
-               while (<FH>) {
-                       s/[\r\n]+//g;
-                       next if /^\s*$/;
-                       next if /^#/;
-               
-                       if (/^\[(\w+)\]/) {
-                               $cat=$1;
-                               $$hash{$cat}{'_'}=$cat;
-                               next;
-                               }
-                       if (/^\[(\w+)\]\s*=\>\s*\[(\w+)\]$/) {
-                               $$hash{$2}=$$hash{$1};
-                               next;
-                               }
-                       if (/([^=\s]+)\s*=\s*(.*?)\s*$/) {
-                               $$hash{$cat}{$1}=$2;    
-                               next;
-                               }
-                       if (/([^=\s]+)\s*:\s*(.*)/) {
-                               $key=$1; $value=$2;
-                               $value=&compile($value);
-                               $$hash{$cat}{$key}=$value;      
-                               next;
-                               }
-                       if (/([^\<\s]+)\s*\<\<\s*(.*)/) {
-                               $slot=$1;
-                               undef @collect;
-                               while (<FH>) {
-                                       last if substr($_,0,2) eq "<<";
-                                       push(@collect,$_);
-                                       }
-                               $$hash{$cat}{$slot}=join("\n",@collect);        
-                               }
-                       }
-               close(FH);
-               }
-       else { print "CANNOT OPEN $file --- $!\n"; }
-       }
-       
-sub read { 
-       my($file)=shift;
-       my($hash)={}; 
-       
-       &append($hash,$file); 
-       return $hash; 
-       }       
-
-1;     
diff --git a/dbscripts/lib/subst.pl b/dbscripts/lib/subst.pl
deleted file mode 100755 (executable)
index c45d74c..0000000
+++ /dev/null
@@ -1,446 +0,0 @@
-#!/usr/bin/perl
-
-################################################################
-###    Preprocessor
-###
-### m
-###
-### $VER: 3.1.1 (% notation)$
-
-require "codec.pl";
-
-###########################################################    
-### token stuff
-
-package TokenStream;
-
-sub new {
-       local(*IN,$intro,$outro)=@_;
-       
-       $$stream{'handle'}=*IN;
-       $$stream{'buffer'}=[];
-       $$stream{'intro'}=$intro;
-       $$stream{'outro'}=$outro;
-       
-       bless $stream, "TokenStream";
-       
-       return $stream;
-       }
-       
-sub fetch {
-       my($stream)=shift;
-       my($token,$old);
-       local(*IN);
-       
-       if (defined ($token=shift(@{$$stream{'buffer'}}))) {
-               return $token;
-               }
-       else {
-               $old=$/;
-               $/=$$stream{'outro'};
-               *IN=$$stream{'handle'};
-               
-               $token=<IN>;
-               
-               if (($index=index($token,$$stream{'intro'}))>0) {
-                       push(@{$$stream{'buffer'}},substr($token,$index));
-                       $token=substr($token,0,$index);
-                       }
-               
-               $/=$old;
-               
-               return $token;
-               }       
-       }       
-
-sub feed {
-       my($stream,$value)=@_;
-       
-       if (ref $value) {
-               unshift(@{$$stream{'buffer'}},@$value);
-               }
-       else {
-               unshift(@{$$stream{'buffer'}},$value);  
-               }
-       }
-       
-###########################################################    
-### prepro stuff
-
-package Subst;
-       
-###########################################################    
-### local fun :-)
-       
-$localfun{'store'}=sub {
-       my($args,$env,$stream)=@_;
-       my($token,$field,$count);
-       
-       # print  "STORE $$args[1]\n";
-       
-       $field=$$args[1];
-       $count=0;
-       
-       $$env{$field}{'_data'}=[];
-       while (($token=$stream->fetch) && ($token ne "<%/store%>")) {
-               push(@{$$env{$field}{'_data'}},$token);
-               $count++;
-               }
-       $$env{$field}{'_pos'}=0;
-       $$env{$field}{'_size'}=$count;  
-       }; 
-       
-$localfun{'reset'}=sub {
-       my($args)=shift;
-       
-       $$env{$$args[1]}{'_pos'}=0;
-       };      
-       
-$localfun{'insert'}=sub {
-       my($args,$env,$stream)=@_;
-       
-       #print main::DEBUG "INSERT $$args[1] size=",scalar(@{$$env{$$args[1]}{'_data'}})," time=$$env{$$args[1]}{'_pos'}\n";
-       
-       $stream->feed($$env{$$args[1]}{'_data'});
-       $$env{$$args[1]}{'_pos'}++;
-       };      
-
-$localfun{'loop'}=sub {
-       my($args,$env,$stream)=@_;
-       my($token,@loop,$count);
-       
-       
-       $count=$$args[1];
-       #print "LOOP $count\n";
-       while (($token=$stream->fetch) && ($token ne "<%/loop%>")) {
-               push(@loop,$token);
-               }
-       while ($count--) {
-               $stream->feed(\@loop);
-               }       
-       };
-
-sub clone {
-       my(@data)=@_;
-       return \@data;
-       }
-       
-$localfun{'load'}=sub {
-       my($args,$env,$stream)=@_;
-       my(@temp,$count);
-       
-       # print "<!-- LOAD: $$args[2] into $$args[1] -->";
-       
-       $$env{$$args[1]}{'_data'}=[];
-       $count=0;
-       if (open(LOAD,$$args[2])) {
-               while (<LOAD>) {
-                       chomp;
-                       #print "ROW: $_\n";
-                       @temp=split(/\t/);
-                       push(@{$$env{$$args[1]}{'_data'}},&clone(@temp));
-                       undef @temp;
-                       $count++;
-                       }
-               close(LOAD);
-               }
-       $$env{$$args[1]}{'_size'}=$count;
-       $$env{$$args[1]}{'_pos'}=0;
-       
-       # print "LOAD $$args[2] into $$args[1] ($count)\n";
-       };
-
-$localfun{'loadvalues'}=sub {
-       my($args,$env,$stream)=@_;
-       local(*LOAD);
-       my($cat)="public";
-       my($slot,$key,$value,@collect);
-       
-       if (open(LOAD,$$args[1])) {
-               while (<LOAD>) {
-                       s/[\r\n]+//g;
-                       next if /^\s*$/;
-                       next if /^#/;
-                       
-                       if (/^\[(\w+)\]/) {
-                               $cat=$1;
-                               next;
-                               }
-                       if (/^\[(\w+)\]\s*=\>\s*\[(\w+)\]$/) {
-                               $$env{$2}=$$env{$1};
-                               next;
-                               }
-                       if (/([^=\s]+)\s*=\s*(.*?)\s*$/) {
-                               $$env{$cat}{$1}=$2;     
-                               next;
-                               }
-                       if (/([^=\s]+)\s*:\s*(.*)/) {
-                               $key=$1; $value=$2;
-                               $value=~s/\$\((\w+)\)/$ENV{$value}/e;
-                               $$env{$cat}{$key}=$value;       
-                               next;
-                               }
-                       if (/([^\<\s]+)\s*\<\<\s*(.*)/) {
-                               $slot=$1;
-                               undef @collect;
-                               while (<LOAD>) {
-                                       last if substr($_,0,2) eq "<<";
-                                       push(@collect,$_);
-                                       }
-                               $$env{$cat}{$slot}=join("\n",@collect); 
-                               }
-                       }
-               close(LOAD);    
-               }
-       else {
-               print "Cannot loadvalues ".$$args[1]."\n";
-               }
-       };
-       
-$localfun{'bind'}=sub {
-       my($args,$env,$stream)=@_;
-       my($temp,$name,$var,$t,$item);
-
-       shift(@$args);  # function name
-       $name=shift(@$args);
-       $var=shift(@$args);
-       
-       #print "BIND from $name [$$env{$name}{'_pos'}] to $var : ";
-       
-       if ($$env{$name}{'_pos'}<$$env{$name}{'_size'}) {
-               $t=0;
-               $temp=$$env{$name}{'_data'}[$$env{$name}{'_pos'}];
-               foreach $item (@$args) {
-                       #print "\t$item=$$temp[$t]\n";
-                       $$env{$var}{$item}=$$temp[$t++];
-                       }
-               $$env{$name}{'_pos'}++;
-               }
-       else {
-               undef $$env{$var};
-               }       
-       };      
-
-### version 3.1 functions
-
-$localfun{'incr'}=sub {
-       my($args)=shift;
-       
-       #print main::DEBUG "INCR $$args[1]\n";
-       
-       $$env{$$args[1]}{'_pos'}++;
-       };      
-
-$localfun{'alias'}=sub {
-       my($args,$env,$stream)=@_;
-       my($temp,$name,$var,$t,$item);
-
-       shift(@$args);  # function name
-       $name=shift(@$args);
-       $var=shift(@$args);
-       
-       #print main::DEBUG "ALIAS from $name [$$env{$name}{'_pos'}] to $var\n";
-       
-       if ($$env{$name}{'_pos'}<$$env{$name}{'_size'}) {
-               $$env{$var}=$$env{$name}{'_data'}[$$env{$name}{'_pos'}];
-               }
-       else {
-               undef $$env{$var};
-               }       
-       };      
-
-$localfun{'keyvalue'}=sub {
-       my($args,$env,$stream)=@_;
-       my($from,$to,@buffer,$key,$value);
-
-       shift(@$args);  # function name
-       $from=shift(@$args);
-       $to=shift(@$args);
-       
-       
-       while (($key,$value)=each %{$$env{$from}}) {
-               push(@buffer,{'key' => $key, 'value' => $value});
-               }
-       $$env{$to}{'_data'}=\@buffer;
-       $$env{$to}{'_pos'}=0;
-       $$env{$to}{'_size'}=scalar(@buffer);    
-       
-       #print main::DEBUG "keyvalue $from into $to ",scalar(@buffer),"\n";
-       };
-       
-$localfun{'set'}=sub {
-       my($args,$env,$stream)=@_;
-       my($name,$value);
-
-       shift(@$args);  # function name
-       $name=shift(@$args);
-       $value=shift(@$args);
-       
-       $$env{'_flags'}{$name}=$value;
-       };      
-       
-###########################################################    
-### if fun ??
-
-$iffun{'ifdef'}=sub {
-       my($args,$env)=@_;
-       return ((defined (&getvalue($env,$$args[1]))) ? 0 : 1);
-       };
-
-$iffun{'ifnz'}=sub {
-       my($args,$env)=@_;
-       return (&getvalue($env,$$args[1]) ? 0 : 1);
-       };
-       
-$iffun{'ifequal'}=sub {
-       my($args,$env)=@_;
-       return ((&getvalue($env,$$args[1]) eq $$args[2]) ? 0 : 1);
-       };      
-               
-$iffun{'ifmember'}=sub {
-       my($args,$env)=@_;
-       return ((index($$args[1],$$args[2])<0) ? 1 : 0);
-       };      
-               
-$iffun{'ifdecr'}=sub {
-       my($args,$env)=@_;
-       
-       if ($$args[1]=~/(\S+)\.(\S+)/) {
-               return (($$env{$1}{$2}-- > 0) ? 0 : 1);
-               }               
-       else { 
-               return (($$env{$$args[1]}-- > 0) ? 0 : 1);
-               }
-       };
-       
-$iffun{'ifiter'}=sub {
-       my($args,$env)=@_;
-       
-       if ($$args[2]=~/(\d+)\.(\d+)/) {
-               return (($$env{$$args[1]}{'_pos'} % $1) != $2);
-               }               
-       else { 
-               return (($$env{$$args[1]}{'_pos'} % $$argv[2]) != 0);
-               }
-       };
-
-
-### version 3.1 functions
-
-$iffun{'ifplus'}=sub {
-       my($args,$env)=@_;
-       return ((&getvalue($env,$$args[1])>0) ? 0 : 1);
-       };
-
-$iffun{'ifminus'}=sub {
-       my($args,$env)=@_;
-       return ((&getvalue($env,$$args[1])<0) ? 0 : 1);
-       };
-
-$iffun{'ifpluszero'}=sub {
-       my($args,$env)=@_;
-       return ((&getvalue($env,$$args[1])>=0) ? 0 : 1);
-       };
-       
-$iffun{'ifminuszero'}=sub {
-       my($args,$env)=@_;
-       return ((&getvalue($env,$$args[1])<=0) ? 0 : 1);
-       };
-
-       
-###########################################################    
-### process
-
-sub process {
-       local(*IN,*OUT,$env,$post)=@_;
-       my($token,$ignore,@temp,$templine,$stream);
-       
-       $logfile=$$env{'logfile'};
-       
-       $stream=&TokenStream::new(*IN,"<%","%>");
-       
-       return undef unless defined $stream;
-       
-       #if (!defined $post) { $post=sub { print OUT $_[0] unless $_[0]=~/^\s*$/; }; }
-       if (!defined $post) { $post=sub { print OUT $_[0]; }; }
-       
-       $ignore=0;
-       
-       while ($token=$stream->fetch) {
-               # if-endif
-               if      ($token eq "<%endif%>") {
-                       $ignore-- if $ignore>0; 
-                       next; 
-                       }
-
-               if (($ignore>0) && (substr($token,0,4) eq "<%if")) {
-                       $ignore++;
-                       next;
-                       }
-                       
-               if ($token eq "<%else%>") {
-                       ($ignore == 0) && ($ignore=1, next);
-                       ($ignore == 1) && ($ignore=0, next);
-                       }
-                               
-               next if $ignore;
-               
-               #$token=~s/\^(\'?[\w.]+)(\\)?/&getvalue($env,$1)/eg;
-               #$token=~s/\^(\[\w+\])?([\w.]+)(\\)?/&getvalue($env,$2,$1)/eg;
-               $token=~s/\^(\[\w+\])?([\w\x5b\x5d.]+)(\\)?/&getvalue($env,$2,$1)/eg;
-               
-               # handle none-special case
-               if (substr($token,0,2) ne "<%") {
-                       &$post($token);
-                       next;
-                       }
-               
-               @temp=split(/\s+/,substr($token,2,-2));
-               
-               if (defined $iffun{$temp[0]}) {
-                       $ignore=&{$iffun{$temp[0]}}(\@temp,$env);
-                       next;
-                       }
-                       
-               if (defined $localfun{$temp[0]}) {
-                       &{$localfun{$temp[0]}}(\@temp,$env,$stream);
-                       next;
-                       }
-               
-               &$post($token);
-               }       
-       }
-
-###########################################################
-### binding
-
-$perlish=&Codec::new('perlish');
-
-$convert{'[perl]'}=sub { return $perlish->encode(@_); };
-
-$convert{'[scalar]'}=sub { return scalar($_[0]); };
-
-$convert{'[javastyle]'}=sub {
-       my($value)=shift;
-       $value=lc($value);
-       substr($value,0,1)=uc(substr($value,0,1));
-       return $value;
-       };
-       
-sub getvalue {
-       my($env,$key,$fun)=@_;
-       my($convert,$value);
-       
-#      $key=~s/\./\'\}\{\'/g;
-#      $value=eval "\$\$env{'$key'}";
-       
-       $key=~s/\./\'\}\{\'/g;
-       $key="{'".$key."'}";
-       $key=~s/(\[\d+\])\'\}/\'\}$1/g;
-       $value=eval "\$\$env$key";
-
-       if ((defined $fun) && (defined $convert{$fun})) { return &{$convert{$fun}}($value); }
-       else              { return $value; }
-       }
-
-1;
diff --git a/dbscripts/pg_imageimport.pl b/dbscripts/pg_imageimport.pl
deleted file mode 100755 (executable)
index d87e15a..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/local/bin/perl -w
-use Pg;
-
-if (!defined($ARGV[0])) {
-        print "Usage: $0 name_of_filelist_file\n";
-        exit 1;
-}
-
-$dump="$ARGV[0]";
-
-my $conn = Pg::connectdb("dbname=indy user=indy host=192.168.4.8");
-( PGRES_CONNECTION_OK eq $conn->status )
-    and print "Pg::connectdb ........... ok\n"
-    or  die   "Pg::connectdb ........... not ok: ", $conn->errorMessage;
-
-
-open(DUMP,"$dump") || die "can't open dump file $dump";
-
-$basedir="";
-
-while(<DUMP>) {
-        chomp;
-        next if (/^$/ || /^\s*$/);
-
-               # exception liste einlesen...
-                               $filename=$basedir.$_;
-                               $comment=$filename;
-                               $titel="unklassifiziert";
-                               $ort="unklassifiziert"; 
-                       
-                               $_ = `/usr/X11R6/bin/identify $filename`;
-                               /(\d+)x(\d+)/;
-                               $img_width=$1;
-                               $img_height=$2;
-                               
-                               $layout=0;                                              # undefined
-                               if ( $img_width>$img_height ) {$layout=1;}              # querformat
-                               if ( $img_width<$img_height ) {$layout=2;}              # hochformat
-                               if ( $img_width==$img_height) {$layout=3;}    # quadratisch
-
-                               # hier insert:
-                               print "making icon: $filename \n";
-                               `cp $filename /tmp/iconblob.jpg`;
-                               `/usr/X11R6/bin/mogrify -geometry 120x120 /tmp/iconblob.jpg`;
-                               
-                               print "trying to insert: $filename \n";
-                               
-                               $conn->exec("BEGIN");
-                               $oid= $conn->lo_import("$filename");
-                               print $conn->errorMessage."\n";
-                               print "trying to insert icon\n";
-                               $ioid= $conn->lo_import("/tmp/iconblob.jpg");
-                               print $conn->errorMessage."\n";
-                               $sql="INSERT INTO images (title,date,place,author,to_img_layout,to_img_type,is_classified,to_media_folder,to_img_color,comment,webdb_create,img_width,img_height,image_data,icon_data) ".
-                                        "VALUES ('".$titel."','20010109','".$ort.
-                                        "','huh','".$layout."','1','0','3','2','".$comment."',now(),'".$img_width."','".$img_height.
-                                        "','".$oid."','".$ioid."')";
-                               print $sql."\n";
-                               $conn->exec( $sql );
-                               print $conn->errorMessage."\n";
-                               $conn->exec("END");
-       
-                       
-
-}
-# end of while
diff --git a/dbscripts/update_database_01.sql b/dbscripts/update_database_01.sql
deleted file mode 100755 (executable)
index 96469e4..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-\connect - postgres
-
-CREATE SEQUENCE "media_type_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1  cache 1 ;
-
-DROP TABLE "media_type";
-
-CREATE TABLE "media_type" (
-       "id" integer DEFAULT nextval('media_type_id_seq'::text) NOT NULL,
-       "name" character varying(80) NOT NULL,
-       "mime_type" character varying(40) NOT NULL,
-       "classname" character varying(80) NOT NULL,
-       "tablename" character varying(80) NOT NULL,
-       "dcname" character varying(20)
-);
-
-
-CREATE TABLE "uploaded_media" (
-) INHERITS ("media");
-
diff --git a/dbscripts/updates/update20030704.sql b/dbscripts/updates/update20030704.sql
deleted file mode 100755 (executable)
index ddd1e2c..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
--- update script 2003-07-04 by Zapata
--- * makes the password field longer in webdb_users
--- * adds a comments field to webdb_users;
--- This script will terminate with an error the second time it's run,
---   so running this script when it isn't needed can't do any harm.
---
-
-BEGIN TRANSACTION;
-
-ALTER TABLE "webdb_users" RENAME TO "webdb_users_old";
-DROP INDEX "webdb_users_pkey";
-DROP INDEX "idx_webdb_user_log_pas";
-  
-CREATE TABLE "webdb_users" (
-       "id" integer DEFAULT nextval('webdb_users_id_seq'::text) NOT NULL,
-       "login" character varying(16) NOT NULL,
-       "password" character varying(255) NOT NULL,
-       "is_admin" boolean DEFAULT '0' NOT NULL,
-       "comment" text,
-       Constraint "webdb_users_pkey" Primary Key ("id")
-);
-
-INSERT INTO "webdb_users" (
-  "id", 
-  "login", 
-  "password",
-  "is_admin"
-)
-SELECT
-  "id", 
-  "login", 
-  "password",
-  "is_admin"
-FROM "webdb_users_old";
-
-UPDATE  pg_class
-SET
-  relowner = (SELECT relowner FROM pg_class WHERE relname='webdb_users_old'),
-  relacl =   (SELECT relacl FROM pg_class WHERE relname='webdb_users_old')
-WHERE 
-  relname = 'webdb_users';
-
-DROP TABLE "webdb_users_old";
-
-DROP INDEX "idx_webdb_user_log_pas_is_admin" on "webdb_users" using btree ( "login" "varchar_ops", "password" "varchar_ops", "is_admin" "bool_ops" );
-  
--- that's it!
-  
-COMMIT TRANSACTION;
diff --git a/dbscripts/updates/update20030920.sql b/dbscripts/updates/update20030920.sql
deleted file mode 100755 (executable)
index 503687d..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
--- parent_id should not NOT NULL and should not have a DEFAULT 
-
-ALTER TABLE topic ALTER parent_id DROP NOT NULL;
-ALTER TABLE topic ALTER parent_id DROP DEFAULT;
-
diff --git a/dbscripts/updates/update20031005.sql b/dbscripts/updates/update20031005.sql
deleted file mode 100755 (executable)
index 16b3cfc..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-
-ALTER TABLE media* ALTER to_feature DROP NOT NULL;
-ALTER TABLE media* ALTER to_feature DROP DEFAULT;
-
-ALTER TABLE media* ALTER to_media_folder DROP NOT NULL; 
-ALTER TABLE media* ALTER to_media_folder DROP DEFAULT; 
-
-ALTER TABLE media* ALTER to_media_type DROP NOT NULL; 
-ALTER TABLE media* ALTER to_media_type DROP DEFAULT; 
-
-ALTER TABLE media* ALTER to_creator DROP NOT NULL; 
-ALTER TABLE media* ALTER to_creator DROP DEFAULT; 
-
-ALTER TABLE media* ALTER to_language DROP DEFAULT;
-ALTER TABLE media* ALTER to_rights DROP DEFAULT;
-
-UPDATE media* SET to_feature=null WHERE to_feature=0;
-UPDATE media* SET to_media_folder=null WHERE to_media_folder=0;
-UPDATE media* SET to_media_type=null WHERE to_media_type=0;
-UPDATE media* SET to_creator=null WHERE to_creator=0;
diff --git a/dbscripts/updates/update20031122.sql b/dbscripts/updates/update20031122.sql
new file mode 100755 (executable)
index 0000000..02a9d3f
--- /dev/null
@@ -0,0 +1,67 @@
+-- update script 2003-11-22 by Zapata
+-- * added a bunch of fields to webdb_user: is_disabled, email, profile, creation date,
+--     last login date
+-- This script will terminate with an error the second time it's run,
+--   so running this script when it isn't needed can't do any harm.
+--
+
+BEGIN TRANSACTION;
+
+ALTER TABLE "webdb_users" RENAME TO "webdb_users_old";
+DROP INDEX "webdb_users_pkey";
+  
+CREATE TABLE "webdb_users" (
+       "id" integer DEFAULT nextval('webdb_users_id_seq'::text) NOT NULL,
+       "login" character varying(16) NOT NULL,
+       "password" character varying(255) NOT NULL,
+       "is_admin" boolean DEFAULT '0' NOT NULL,
+       "comment" text,
+       "is_disabled" boolean DEFAULT '0' NOT NULL,
+        "email" character varying(255) DEFAULT '' NOT NULL,
+        "profile" text,
+        "webdb_create"  timestamp with time zone NOT NULL,
+        "lastlogin"  timestamp with time zone,
+        CONSTRAINT "webdb_users_pkey" Primary Key ("id")
+);
+
+INSERT INTO "webdb_users" (
+  "id", 
+  "login", 
+  "password",
+  "is_admin",
+  "comment",
+  "is_disabled",
+  "email",
+  "profile",
+  "webdb_create",
+  "lastlogin"
+)
+SELECT
+  "id", 
+  "login", 
+  "password",
+  "is_admin",
+  '',
+  'f',
+  '',
+  '',
+  now(),
+  null
+FROM "webdb_users_old";
+
+UPDATE  pg_class
+SET
+  relowner = (SELECT relowner FROM pg_class WHERE relname='webdb_users_old'),
+  relacl =   (SELECT relacl FROM pg_class WHERE relname='webdb_users_old')
+WHERE 
+  relname = 'webdb_users';
+
+
+-- to prevent this script from being run successfully for a second time
+INSERT INTO webdb_users_old(login, password, is_admin) values('','','t');
+
+DROP TABLE "webdb_users_old";
+
+-- that's it!
+  
+COMMIT TRANSACTION;
diff --git a/dbscripts/updates/update20031124.sql b/dbscripts/updates/update20031124.sql
new file mode 100755 (executable)
index 0000000..99645ec
--- /dev/null
@@ -0,0 +1,97 @@
+-- update script 2003-11-25 by Zapata
+-- * Clean up comments 
+-- * added a comment field for internal comments
+-- This script will terminate with an error the second time it's run,
+--   so running this script when it isn't needed is prevented from doing do any harm.
+
+BEGIN TRANSACTION;
+
+----------------------
+-- COMMENT changes
+----------------------
+
+ALTER TABLE "comment" RENAME TO "comment_old";
+DROP INDEX comment_pkey;
+DROP INDEX comment_checksum_index;
+DROP INDEX idx_comment_to_media;
+DROP INDEX idx_comment_webdb_create;
+DROP INDEX idx_comment_tomedia_ispublished;
+DROP INDEX idx_comment_id;
+  
+CREATE TABLE "comment" (
+  "id" integer DEFAULT nextval('comment_id_seq'::text) NOT NULL,
+  "title" character varying(80) NOT NULL,
+  "creator" character varying(80) NOT NULL,
+  "description" text NOT NULL,
+  "main_url" character varying(255),
+  "email" character varying(80),
+  "address" character varying(80),
+  "phone" character varying(20),
+  "webdb_create" timestamp with time zone NOT NULL,
+  "webdb_lastchange" timestamp with time zone,
+  "is_published" boolean DEFAULT '1' NOT NULL,
+  "to_language" integer DEFAULT '0' NOT NULL,
+  "to_media" integer NOT NULL,
+  "to_comment_status" smallint,
+       "comment" text,
+  "is_html" boolean DEFAULT '0' NOT NULL,
+  Constraint "comment_pkey" Primary Key ("id")
+);
+
+CREATE        INDEX "idx_comment_to_media"            on "comment" using btree ( "to_media" "int4_ops" );
+CREATE        INDEX idx_comment_webdb_create          on  comment(webdb_create);
+CREATE        INDEX "idx_comment_tomedia_ispublished" on "comment" using btree ( "to_media" "int4_ops", "is_published" "bool_ops" );
+CREATE UNIQUE INDEX "idx_comment_id"                  on "comment" using btree ( "id" "int4_ops" );
+
+INSERT INTO "comment" (
+  "id",
+  "title",
+  "creator",
+  "description",
+  "main_url",
+  "email",
+  "address",
+  "phone",
+  "webdb_create",
+  "webdb_lastchange",
+  "is_published",
+  "to_language",
+  "to_media",
+  "to_comment_status",
+  "is_html",
+       "comment")
+select
+  "id",
+  "title",
+  "creator",
+  "description",
+  "main_url",
+  "email",
+  "address",
+  "phone",
+  "webdb_create",
+  "webdb_lastchange",
+  "is_published",
+  "to_language",
+  "to_media",
+  "to_comment_status",
+  "is_html",
+       ''
+from comment_old;      
+
+
+UPDATE  pg_class
+SET
+  relowner = (SELECT relowner FROM pg_class WHERE relname='comment_old'),
+  relacl =   (SELECT relacl FROM pg_class WHERE relname='comment_old')
+WHERE 
+  relname = 'comment';
+  
+-- to prevent this script from being run successfully for a second time
+INSERT INTO comment_old(to_media, description, checksum, title, creator, webdb_create) values(1, '', 1, '', '', now());
+
+DROP TABLE comment_old;
+
+-- thats it!
+  
+COMMIT TRANSACTION;
diff --git a/dbscripts/updates/update20031125.sql b/dbscripts/updates/update20031125.sql
new file mode 100755 (executable)
index 0000000..c5e2f4b
--- /dev/null
@@ -0,0 +1,550 @@
+-- update script 2003-11-25 by Zapata
+-- * Removal of media (uploaded_media and content are now independently)
+-- * Clean up of content
+-- * Added a field for content-locking
+-- * Added a keywords field for content
+-- This script will terminate with an error the second time it's run,
+--   so running this script when it isn't needed is prevented from doing do any harm.
+
+DROP INDEX idx_content_webdb_create;
+DROP INDEX idx_othermedia_is_published_produced;
+DROP INDEX idx_othermedia_id;
+DROP INDEX idx_video_id;
+
+BEGIN TRANSACTION;
+
+----------------------
+-- CONTENT changes
+----------------------
+
+ALTER TABLE "content" RENAME TO "content_old";
+
+DROP INDEX "content_checksum_index";
+DROP INDEX "idx_content_to_article_type";
+DROP INDEX "idx_content_is_produced";
+DROP INDEX "idx_content_is_published__to_ar";
+DROP INDEX "idx_content_is_published__id";
+DROP INDEX "idx_content_is_pub__to_art__to_";
+DROP INDEX "idx_content_id";
+DROP INDEX "idx_content_is_published";
+
+CREATE TABLE "content" (
+       "id" integer DEFAULT nextval('media_id_seq'::text) NOT NULL,
+       "title" character varying(255),
+       "subtitle" character varying(255),
+       "edittitle" character varying(255),
+       "date" character(8) NOT NULL,
+       "creator" character varying(80),
+       "creator_main_url" character varying(255),
+       "creator_email" character varying(80),
+       "creator_address" character varying(80),
+       "creator_phone" character varying(80),
+       "description" text,
+       "comment" text,
+       "source" character varying(255),
+       "is_published" boolean DEFAULT '0' NOT NULL,
+       "is_produced" boolean DEFAULT '0' NOT NULL,
+       "to_publisher" integer NOT NULL,
+       "to_language" integer DEFAULT '0',
+       "to_rights" integer DEFAULT '0',
+       "webdb_create" timestamp with time zone NOT NULL,
+       "webdb_lastchange" timestamp with time zone,
+       "content_data" text,
+       "is_html" boolean DEFAULT '0' NOT NULL,
+       "to_article_type" smallint DEFAULT '0' NOT NULL,
+       "to_content" integer,
+       "keywords" text,
+       "to_locking_user" integer,
+  Constraint "content_pkey" Primary Key ("id")
+);
+
+
+CREATE        INDEX "idx_content_to_article_type" on "content" using btree ( "to_article_type" "int2_ops" );
+CREATE        INDEX "idx_content_is_produced" on "content" using btree ( "is_produced" "bool_ops" );
+CREATE        INDEX "idx_content_is_published__to_ar" on "content" using btree ( "is_published" "bool_ops", "to_article_type" "int2_ops" );
+CREATE        INDEX "idx_content_is_published__id" on "content" using btree ( "is_published" "bool_ops", "id" "int4_ops" );
+CREATE        INDEX "idx_content_is_pub__to_art__to_" on "content" using btree ( "is_published" "bool_ops", "to_article_type" "int2_ops", "id" "int4_ops" );
+CREATE UNIQUE INDEX "idx_content_id" on "content" using btree ( "id" "int4_ops" );
+CREATE        INDEX "idx_content_is_published" on "content" using btree ( "is_published" "bool_ops" );
+  
+INSERT INTO "content" (
+       "id",
+       "title",
+       "subtitle",
+       "edittitle",
+       "date",
+       "creator",
+       "creator_main_url",
+       "creator_email",
+       "creator_address",
+       "creator_phone",
+       "description",
+       "comment",
+       "source",
+       "is_published",
+       "is_produced",
+       "to_publisher",
+       "to_language",
+       "to_rights",
+       "webdb_create",
+       "webdb_lastchange",
+       "content_data",
+       "is_html",
+       "to_article_type",
+       "to_content",
+       "keywords")
+select
+       "id",
+       "title",
+       "subtitle",
+       "edittitle",
+       "date",
+       "creator",
+       "creator_main_url",
+       "creator_email",
+       "creator_address",
+       "creator_phone",
+       "description",
+       "comment",
+       "source",
+       "is_published",
+       "is_produced",
+       "to_publisher",
+       "to_language",
+       "to_rights",
+       "webdb_create",
+       "webdb_lastchange",
+       "content_data",
+       "is_html",
+       "to_article_type",
+       "to_content",
+       ''
+from content_old;      
+
+UPDATE  pg_class
+SET
+  relowner = (SELECT relowner FROM pg_class WHERE relname='content_old'),
+  relacl =   (SELECT relacl FROM pg_class WHERE relname='content_old')
+WHERE 
+  relname = 'content';
+  
+DROP table content_old;
+
+--
+-- uploaded_media
+--
+
+ALTER TABLE "uploaded_media" RENAME TO "uploaded_media_old";
+DROP INDEX "idx_uploaded_media_id";
+DROP INDEX "idx_uploaded_media_is_published";
+
+CREATE TABLE "uploaded_media" (
+       "id" integer DEFAULT nextval('media_id_seq'::text) NOT NULL,
+       "title" character varying(255),
+       "subtitle" character varying(255),
+       "edittitle" character varying(255),
+       "date" character(8) NOT NULL,
+       "creator" character varying(80),
+       "creator_main_url" character varying(255),
+       "creator_email" character varying(80),
+       "creator_address" character varying(80),
+       "creator_phone" character varying(20),
+       "description" text,
+       "comment" text,
+       "source" character varying(255),
+       "publish_server" character varying(255),
+       "publish_path" character varying(255),
+       "is_published" boolean DEFAULT '0' NOT NULL,
+       "is_produced" boolean DEFAULT '0' NOT NULL,
+       "to_media_folder" integer DEFAULT '0' NOT NULL,
+       "to_media_type" smallint DEFAULT '0' NOT NULL,
+       "to_publisher" integer NOT NULL,
+       "to_language" integer DEFAULT '0',
+       "to_rights" integer DEFAULT '0',
+       "webdb_create" timestamp with time zone NOT NULL,
+       "webdb_lastchange" timestamp with time zone,
+       "icon_is_produced" boolean DEFAULT '0' NOT NULL,
+       "icon_path" character varying(255),
+       "size" integer,
+  Constraint "uploaded_media_pkey" Primary Key ("id")
+);
+
+CREATE UNIQUE INDEX "idx_uploaded_media_id" on "uploaded_media" using btree ( "id" "int4_ops" );
+CREATE UNIQUE INDEX "idx_uploaded_media_is_published" on "uploaded_media" using btree ( "id" "int4_ops", "is_published" "bool_ops" );
+
+--
+-- images
+--
+
+ALTER TABLE "images" RENAME TO "images_old";
+DROP INDEX "idx_images_is_published__icon_i";
+DROP INDEX "idx_images_id";
+
+
+CREATE TABLE "images" (
+       "image_data" oid,
+       "icon_data" oid,
+       "year" character varying(40),
+       "img_width" smallint,
+       "img_height" smallint,
+       "to_img_format" smallint DEFAULT '0' NOT NULL,
+       "to_img_layout" smallint DEFAULT '0' NOT NULL,
+       "to_img_type" smallint DEFAULT '0' NOT NULL,
+       "to_img_color" smallint DEFAULT '0' NOT NULL,
+       "icon_width" smallint,
+       "icon_height" smallint
+)
+INHERITS ("uploaded_media");
+
+CREATE        INDEX "idx_images_is_published" on "images" using btree ( "is_published" "bool_ops", "icon_is_produced" "bool_ops" );
+CREATE UNIQUE INDEX "idx_images_id" on "images" using btree ( "id" "int4_ops" );
+
+INSERT INTO images(
+       "id",
+       "title",
+       "subtitle",
+       "edittitle",
+       "date",
+       "creator",
+       "creator_main_url",
+       "creator_email",
+       "creator_address",
+       "creator_phone",
+       "description",
+       "comment",
+       "source",
+       "publish_server",
+       "publish_path",
+       "is_published",
+       "is_produced",
+       "to_media_folder",
+       "to_media_type",
+       "to_publisher",
+       "to_language",
+       "to_rights",
+       "webdb_create",
+       "webdb_lastchange",
+       "icon_is_produced",
+       "icon_path",
+       "size",
+       "image_data",
+       "icon_data",
+       "year",
+       "img_width",
+       "img_height",
+       "to_img_format",
+       "to_img_layout",
+       "to_img_type",
+       "to_img_color",
+       "icon_width",
+       "icon_height"
+)
+SELECT
+       "id",
+       "title",
+       "subtitle",
+       "edittitle",
+       "date",
+       "creator",
+       "creator_main_url",
+       "creator_email",
+       "creator_address",
+       "creator_phone",
+       "description",
+       "comment",
+       "source",
+       "publish_server",
+       "publish_path",
+       "is_published",
+       "is_produced",
+       "to_media_folder",
+       "to_media_type",
+       "to_publisher",
+       "to_language",
+       "to_rights",
+       "webdb_create",
+       "webdb_lastchange",
+       "icon_is_produced",
+       "icon_path",
+       "size",
+       "image_data",
+       "icon_data",
+       "year",
+       "img_width",
+       "img_height",
+       "to_img_format",
+       "to_img_layout",
+       "to_img_type",
+       "to_img_color",
+       "icon_width",
+       "icon_height"
+FROM images_old;
+
+UPDATE  pg_class
+SET
+  relowner = (SELECT relowner FROM pg_class WHERE relname='images_old'),
+  relacl =   (SELECT relacl FROM pg_class WHERE relname='images_old')
+WHERE 
+  relname = 'images';
+  
+DROP table images_old;
+
+--
+-- audio
+--
+
+ALTER TABLE "audio" RENAME TO "audio_old";
+DROP INDEX "idx_audio_is_published_produced";
+DROP INDEX "idx_audio_id";
+
+CREATE TABLE "audio" (
+  "kbits" smallint
+)
+INHERITS ("uploaded_media");
+
+CREATE        INDEX "idx_audio_is_published_produced" on "audio" using btree ( "is_published" "bool_ops", "is_produced" "bool_ops" );
+CREATE UNIQUE INDEX "idx_audio_id" on "audio" using btree ( "id" "int4_ops" );
+
+INSERT INTO audio(
+       "id",
+       "title",
+       "subtitle",
+       "edittitle",
+       "date",
+       "creator",
+       "creator_main_url",
+       "creator_email",
+       "creator_address",
+       "creator_phone",
+       "description",
+       "comment",
+       "source",
+       "publish_server",
+       "publish_path",
+       "is_published",
+       "is_produced",
+       "to_media_folder",
+       "to_media_type",
+       "to_publisher",
+       "to_language",
+       "to_rights",
+       "webdb_create",
+       "webdb_lastchange",
+       "icon_is_produced",
+       "icon_path",
+       "size",
+  "kbits"
+)
+SELECT
+       "id",
+       "title",
+       "subtitle",
+       "edittitle",
+       "date",
+       "creator",
+       "creator_main_url",
+       "creator_email",
+       "creator_address",
+       "creator_phone",
+       "description",
+       "comment",
+       "source",
+       "publish_server",
+       "publish_path",
+       "is_published",
+       "is_produced",
+       "to_media_folder",
+       "to_media_type",
+       "to_publisher",
+       "to_language",
+       "to_rights",
+       "webdb_create",
+       "webdb_lastchange",
+       "icon_is_produced",
+       "icon_path",
+       "size",
+       "kbits"
+FROM audio_old;
+
+UPDATE  pg_class
+SET
+  relowner = (SELECT relowner FROM pg_class WHERE relname='audio_old'),
+  relacl =   (SELECT relacl FROM pg_class WHERE relname='audio_old')
+WHERE 
+  relname = 'audio';
+  
+DROP table audio_old;
+
+--
+-- video
+--
+
+DROP INDEX "idx_video_is_published_produced";
+ALTER TABLE "video" RENAME TO "video_old";
+
+CREATE TABLE "video" (
+)
+INHERITS ("uploaded_media");
+
+CREATE        INDEX "idx_video_is_published_produced" on "video" using btree ( "is_published" "bool_ops", "is_produced" "bool_ops" );
+
+INSERT INTO video(
+       "id",
+       "title",
+       "subtitle",
+       "edittitle",
+       "date",
+       "creator",
+       "creator_main_url",
+       "creator_email",
+       "creator_address",
+       "creator_phone",
+       "description",
+       "comment",
+       "source",
+       "publish_server",
+       "publish_path",
+       "is_published",
+       "is_produced",
+       "to_media_folder",
+       "to_media_type",
+       "to_publisher",
+       "to_language",
+       "to_rights",
+       "webdb_create",
+       "webdb_lastchange",
+       "icon_is_produced",
+       "icon_path",
+       "size"
+)
+SELECT
+       "id",
+       "title",
+       "subtitle",
+       "edittitle",
+       "date",
+       "creator",
+       "creator_main_url",
+       "creator_email",
+       "creator_address",
+       "creator_phone",
+       "description",
+       "comment",
+       "source",
+       "publish_server",
+       "publish_path",
+       "is_published",
+       "is_produced",
+       "to_media_folder",
+       "to_media_type",
+       "to_publisher",
+       "to_language",
+       "to_rights",
+       "webdb_create",
+       "webdb_lastchange",
+       "icon_is_produced",
+       "icon_path",
+       "size"
+FROM video_old;
+
+UPDATE  pg_class
+SET
+  relowner = (SELECT relowner FROM pg_class WHERE relname='video_old'),
+  relacl =   (SELECT relacl FROM pg_class WHERE relname='video_old')
+WHERE 
+  relname = 'video';
+  
+DROP table video_old;
+
+
+--
+-- other_media
+--
+
+ALTER TABLE "other_media" RENAME TO "other_media_old";
+
+CREATE TABLE "other_media" (
+)
+INHERITS ("uploaded_media");
+
+INSERT INTO other_media(
+       "id",
+       "title",
+       "subtitle",
+       "edittitle",
+       "date",
+       "creator",
+       "creator_main_url",
+       "creator_email",
+       "creator_address",
+       "creator_phone",
+       "description",
+       "comment",
+       "source",
+       "publish_server",
+       "publish_path",
+       "is_published",
+       "is_produced",
+       "to_media_folder",
+       "to_media_type",
+       "to_publisher",
+       "to_language",
+       "to_rights",
+       "webdb_create",
+       "webdb_lastchange",
+       "icon_is_produced",
+       "icon_path",
+       "size"
+)
+SELECT
+       "id",
+       "title",
+       "subtitle",
+       "edittitle",
+       "date",
+       "creator",
+       "creator_main_url",
+       "creator_email",
+       "creator_address",
+       "creator_phone",
+       "description",
+       "comment",
+       "source",
+       "publish_server",
+       "publish_path",
+       "is_published",
+       "is_produced",
+       "to_media_folder",
+       "to_media_type",
+       "to_publisher",
+       "to_language",
+       "to_rights",
+       "webdb_create",
+       "webdb_lastchange",
+       "icon_is_produced",
+       "icon_path",
+       "size"
+FROM other_media_old;
+
+UPDATE  pg_class
+SET
+  relowner = (SELECT relowner FROM pg_class WHERE relname='other_media_old'),
+  relacl =   (SELECT relacl FROM pg_class WHERE relname='other_media_old')
+WHERE 
+  relname = 'other_media';
+  
+DROP table other_media_old;
+
+DROP table uploaded_media_old;
+DROP table media;
+  
+-- that's it!
+  
+COMMIT TRANSACTION;
+
+CREATE INDEX idx_content_webdb_create on content(webdb_create);
+CREATE        INDEX "idx_othermedia_is_published_produced" on "other_media" using btree ( "is_published" "bool_ops", "is_produced" "bool_ops" );
+CREATE UNIQUE INDEX "idx_othermedia_id" on "other_media" using btree ( "id" "int4_ops" );
+CREATE UNIQUE INDEX "idx_video_id" on "video" using btree ( "id" "int4_ops" );
+
+
diff --git a/dbscripts/updates/update20031212.sql b/dbscripts/updates/update20031212.sql
new file mode 100755 (executable)
index 0000000..89ac22a
--- /dev/null
@@ -0,0 +1,56 @@
+-- update script 2003-12-12 by rk
+--
+-- * makes login unique on webdb_users
+
+-- * drops unnecessary index on webdb_users
+-- * inserts a line for ogg support in media_types
+-- * drop "- deprecated -" from media_types
+-- * drop redundant index on id of topic
+-- * drop redundant index on id of comment
+-- * recreate indexes on content_x_media
+-- 
+-- Application of this scripts requires tomcat restart
+-- because media_type is cached
+--
+-- This script will terminate with an error the second time it's run,
+--   so running this script when it isn't needed can't do any harm.
+--
+
+BEGIN TRANSACTION;
+
+ALTER TABLE "webdb_users" ADD CONSTRAINT "webdb_users_login_key" UNIQUE (login);
+
+--
+-- ogg format support
+-- 
+
+DELETE FROM "media_type" WHERE mime_type='- deprecated -';
+DELETE FROM "media_type" WHERE mime_type='application/x-ogg';
+INSERT INTO "media_type" ("name", "mime_type", "classname","tablename")
+VALUES ('ogg', 'application/x-ogg', 'Ogg', 'Audio');
+
+--
+-- topic index double
+--
+DROP INDEX "idx_topic_id";
+
+--
+-- comment index double
+--
+DROP INDEX "idx_comment_id";
+
+
+--
+-- recreate indexes on cxm
+--
+DROP INDEX "idx_content_media";
+DROP INDEX "idx_media_content";
+CREATE INDEX "idx_cxm_content" ON "content_x_media" using btree ( "content_id" "int4_ops" );
+CREATE INDEX "idx_cxm_media" ON "content_x_media" using btree ( "media_id" "int4_ops" );
+
+--
+-- that's it!
+  
+COMMIT TRANSACTION;
+ANALYZE "content_x_media";
+
diff --git a/dbscripts/wiz_templates/show.template b/dbscripts/wiz_templates/show.template
deleted file mode 100755 (executable)
index c0c613e..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<html>
-<head>
-<title>
-^tablename
-</title>
-<head>
-
-<body bgcolor="#FFFFFF">
-<include "head.template">
-<form method="post" action="${actionRoot}">
-       <input type=hidden name=module value=^tablename_javastyle>
-       <input type="hidden" name="id" value="${id}">
-       <if new>
-               <input type="hidden" name="do" value="insert">
-       <else>
-               <input type="hidden" name="do" value="update">
-       </if>
-<table border="0">
-
-
-<!list metadata>
-  <tr> 
-    <td align="right" bgcolor="#000000"><font color="#ffffff"><B>^metadata.name :</B></font></td>
-    <td>
-      <input type="text" size="40" name="^metadata.name" value="${^metadata.name}">
-    </td>
-  </tr>
-<end-list>
-  
-  
-  <tr> 
-    <td colspan="2" align="right"> <font color="#ffffff"><if new> 
-      <input type="submit" name="save" value="einfügen">
-    <else> 
-    <input type="submit" name="save" value="speichern">
-    </if> </font></form></font>
-    </td>
-  <tr>
-</table>
-<include "foot.template">
-</body>
-</html>
diff --git a/dbscripts/wizard.pl b/dbscripts/wizard.pl
deleted file mode 100755 (executable)
index adfe77f..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/usr/bin/perl
-
-#
-# wizard
-#
-
-use DBI;
-
-$0=~m#[^/]+$#;
-$cmdpath=$`;
-if ($cmdpath eq "") { $cmdpath="./"; }
-unshift(@INC,$cmdpath."lib");
-
-require "codec.pl";
-require "subst.pl";
-
-sub USAGE {
-       print "USAGE: wizard.pl dsn user passwd table dir\n";
-       exit(0);
-       }
-
-$dsn=shift(@ARGV) || &USAGE;
-if (($dsn eq "-h") || ($dsn eq "--help")) { &USAGE; }
-$user=shift(@ARGV) || &USAGE;
-$passwd=shift(@ARGV) || &USAGE;
-if ($passwd eq "-") { $passwd=""; }
-$table=shift(@ARGV) || &USAGE;
-$dir=shift(@ARGV) || &USAGE;
-
-$dbh=DBI->connect($dsn,$user,$passwd);
-if (!defined $dsn) {
-       print "Error: cannot connect $dsn\n";
-       &USAGE;
-       }
-
-$tables=$dbh->table_info;
-while ($hash=$tables->fetchrow_hashref) {
-       #print $$hash{'TABLE_NAME'}."\n";
-
-       if ($$hash{'TABLE_NAME'} eq $table) {
-
-               $sth=$dbh->prepare("show fields from ".$$hash{'TABLE_NAME'});
-               $sth->execute;
-               while ($fieldhash=$sth->fetchrow_hashref) {
-                       #print "\t".$$fieldhash{'Field'}.":".$$fieldhash{'Type'}."\n";
-                       push(@data,[$$fieldhash{'Field'},$$fieldhash{'Type'}]);
-                       }
-               $sth->finish;   
-               }
-       }
-
-$$env{'fields'}{'_data'}=\@data;
-$$env{'fields'}{'_pos'}=0;
-$$env{'fields'}{'_size'}=scalar(@data);
-
-$$env{'tablename'}=$table;
-
-print "prosessing files in $dir\n";
-
-chdir $dir;
-
-if (opendir(DIR,".")) {
-       while ($file=readdir(DIR)) {
-               next unless (-f $file);
-               if ($file=~/\.template$/) {
-                       $newfile=$`;
-                       print "\t$file -> $newfile\n";
-                       if (open(IN,$file)) {
-                               if (open(OUT,">$newfile")) {
-                                       &Subst::process(*IN,*OUT,$env);
-                                       close(OUT);
-                                       }
-                               close(IN);      
-                               }
-                       }
-               }
-       closedir(DIR);
-       }                       
-
-
-
-       
-
diff --git a/doc/LOCALIZER.HOWTO b/doc/LOCALIZER.HOWTO
new file mode 100755 (executable)
index 0000000..c0a0fcf
--- /dev/null
@@ -0,0 +1,20 @@
+Version: $Date: 2004/11/06 16:01:25 $
+
+This is the HOWTO of the Localization infrastructure 
+which allows easy low-level customization of Mir.
+
+
+1. Mir.Localizer
+
+In the file config.properties-dist 
+Mir.Localizer=mircoders.localizer.basic.MirBasicLocalizer
+
+JUST NOTES:
+
+-Document how to enable your own CVS tree
+-Localizer code must be in etc/extrasource
+-build.xml is aware of etc/extrasource
+-contents of etc can be stored in extra cvs
+-which of etc is known to ant?
+-outside of etc nothing should be altered!
+-producers can be configured in config.properties
diff --git a/etc/content-types.properties b/etc/content-types.properties
deleted file mode 100755 (executable)
index e3c4407..0000000
+++ /dev/null
@@ -1,285 +0,0 @@
-#sun.net.www MIME content-types table; version 1.6, 05/04/99
-#
-# Property fields:
-#
-#   <description> ::= 'description' '=' <descriptive string>
-#    <extensions> ::= 'file_extensions' '=' <comma-delimited list, include '.'>
-#         <image> ::= 'icon' '=' <filename of icon image>
-#        <action> ::= 'browser' | 'application' | 'save' | 'unknown'
-#   <application> ::= 'application' '=' <command line template>
-#
-
-#
-# The "we don't know anything about this data" type(s).
-# Used internally to mark unrecognized types.
-#
-content/unknown: description=Unknown Content
-unknown/unknown: description=Unknown Data Type
-
-#
-# The template we should use for temporary files when launching an application
-# to view a document of given type.
-#
-temp.file.template: /tmp/%s
-
-#
-# The "real" types.
-#
-application/octet-stream: \
-       description=Generic Binary Stream;\
-       file_extensions=.saveme,.dump,.hqx,.arc,.o,.a,.bin,.exe,.z,.gz
-
-application/oda: \
-       description=ODA Document;\
-       file_extensions=.oda
-
-application/pdf: \
-       description=Adobe PDF Format;\
-       file_extensions=.pdf
-
-application/postscript: \
-       description=Postscript File;\
-       file_extensions=.eps,.ai,.ps;\
-       icon=ps;\
-       action=application;\
-       application=imagetool %s
-
-application/x-dvi: \
-       description=TeX DVI File;\
-       file_extensions=.dvi;\
-       action=application;\
-       application=xdvi %s
-
-application/x-hdf: \
-       description=Hierarchical Data Format;\
-       file_extensions=.hdf;\
-       action=save
-
-application/x-latex: \
-       description=LaTeX Source;\
-       file_extensions=.latex
-
-application/x-netcdf: \
-       description=Unidata netCDF Data Format;\
-       file_extensions=.nc,.cdf;\
-       action=save
-
-application/x-tex: \
-       description=TeX Source;\
-       file_extensions=.tex
-
-application/x-texinfo: \
-       description=Gnu Texinfo;\
-       file_extensions=.texinfo,.texi
-
-application/x-troff: \
-       description=Troff Source;\
-       file_extensions=.t,.tr,.roff;\
-       action=application;\
-       application=xterm -title troff -e sh -c \"nroff %s | col | more -w\"
-
-application/x-troff-man: \
-       description=Troff Manpage Source;\
-       file_extensions=.man;\
-       action=application;\
-       application=xterm -title troff -e sh -c \"nroff -man %s | col | more -w\"
-
-application/x-troff-me: \
-       description=Troff ME Macros;\
-       file_extensions=.me;\
-       action=application;\
-       application=xterm -title troff -e sh -c \"nroff -me %s | col | more -w\"
-
-application/x-troff-ms: \
-       description=Troff MS Macros;\
-       file_extensions=.ms;\
-       action=application;\
-       application=xterm -title troff -e sh -c \"nroff -ms %s | col | more -w\"
-
-application/x-wais-source: \
-       description=Wais Source;\
-       file_extensions=.src,.wsrc
-
-application/zip: \
-       description=Zip File;\
-       file_extensions=.zip;\
-       icon=zip;\
-       action=save
-
-application/x-bcpio: \
-       description=Old Binary CPIO Archive;\
-       file_extensions=.bcpio; action=save
-
-application/x-cpio: \
-       description=Unix CPIO Archive;\
-       file_extensions=.cpio; action=save
-
-application/x-gtar: \
-       description=Gnu Tar Archive;\
-       file_extensions=.gtar;\
-       icon=tar;\
-       action=save
-
-application/x-shar: \
-       description=Shell Archive;\
-       file_extensions=.sh,.shar;\
-       action=save
-
-application/x-sv4cpio: \
-       description=SVR4 CPIO Archive;\
-       file_extensions=.sv4cpio; action=save
-
-application/x-sv4crc: \
-       description=SVR4 CPIO with CRC;\
-       file_extensions=.sv4crc; action=save
-
-application/x-tar: \
-       description=Tar Archive;\
-       file_extensions=.tar;\
-       icon=tar;\
-       action=save
-
-application/x-ustar: \
-       description=US Tar Archive;\
-       file_extensions=.ustar;\
-       action=save
-
-audio/basic: \
-       description=Basic Audio;\
-       file_extensions=.snd,.au;\
-       icon=audio;\
-       action=application;\
-       application=audiotool %s
-
-audio/x-aiff: \
-       description=Audio Interchange Format File;\
-       file_extensions=.aifc,.aif,.aiff;\
-       icon=aiff
-
-audio/x-wav: \
-       description=Wav Audio;\
-       file_extensions=.wav;\
-       icon=wav
-
-image/gif: \
-       description=GIF Image;\
-       file_extensions=.gif;\
-       icon=gif;\
-       action=browser
-
-image/ief: \
-       description=Image Exchange Format;\
-       file_extensions=.ief
-
-image/jpeg: \
-       description=JPEG Image;\
-       file_extensions=.jfif,.jfif-tbnl,.jpe,.jpg,.jpeg;\
-       icon=jpeg;\
-       action=browser;\
-       application=imagetool %s
-
-image/tiff: \
-       description=TIFF Image;\
-       file_extensions=.tif,.tiff;\
-       icon=tiff
-
-image/vnd.fpx: \
-       description=FlashPix Image;\
-       file_extensions=.fpx,.fpix
-
-image/x-cmu-rast: \
-       description=CMU Raster Image;\
-       file_extensions=.ras
-
-image/x-portable-anymap: \
-       description=PBM Anymap Format;\
-       file_extensions=.pnm
-
-image/x-portable-bitmap: \
-       description=PBM Bitmap Format;\
-       file_extensions=.pbm
-
-image/x-portable-graymap: \
-       description=PBM Graymap Format;\
-       file_extensions=.pgm
-
-image/x-portable-pixmap: \
-       description=PBM Pixmap Format;\
-       file_extensions=.ppm
-
-image/x-rgb: \
-       description=RGB Image;\
-       file_extensions=.rgb
-
-image/x-xbitmap: \
-       description=X Bitmap Image;\
-       file_extensions=.xbm,.xpm
-
-image/x-xwindowdump: \
-       description=X Window Dump Image;\
-       file_extensions=.xwd
-
-image/png: \
-       description=PNG Image;\
-       file_extensions=.png;\
-       icon=png;\
-       action=browser
-
-text/html: \
-       description=HTML Document;\
-       file_extensions=.htm,.html;\
-       icon=html
-
-text/plain: \
-       description=Plain Text;\
-       file_extensions=.text,.c,.cc,.c++,.h,.pl,.txt,.java,.el;\
-       icon=text;\
-       action=browser
-
-text/tab-separated-values: \
-       description=Tab Separated Values Text;\
-       file_extensions=.tsv
-
-text/x-setext: \
-       description=Structure Enhanced Text;\
-       file_extensions=.etx
-
-video/mpeg: \
-       description=MPEG Video Clip;\
-       file_extensions=.mpg,.mpe,.mpeg;\
-       icon=mpeg;\
-       action=application;\
-       application=mpeg_play %s
-
-video/quicktime: \
-       description=QuickTime Video Clip;\
-       file_extensions=.mov,.qt
-
-application/x-troff-msvideo: \
-       description=AVI Video;\
-       file_extensions=.avi;\
-       icon=avi
-
-video/x-sgi-movie: \
-       description=SGI Movie;\
-       file_extensions=.movie,.mv
-
-message/rfc822: \
-       description=Internet Email Message;\
-       file_extensions=.mime
-
-application/xml: \
-       description=XML document;\
-       file_extensions=.xml
-
-audio/mp3: \
-       description=MPEG Layer 3;\
-       file_extensions=.mp3;\
-       icon=mpeg;\
-       action=application;\
-       application=mpg123 %s
-
-audio/vnd.rn-realaudio: \
-       description=RealAudio File;\    
-       file_extensions=.ra
-
diff --git a/etc/hibernate.cfg.xml b/etc/hibernate.cfg.xml
deleted file mode 100755 (executable)
index 9f2a995..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
-                                         "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
-
-<hibernate-configuration>
-
-    <session-factory>
-
-        <property name="connection.url">jdbc:postgresql://localhost:5432/mir</property>
-        <property name="connection.driver_class">org.postgresql.Driver</property>
-        <property name="connection.username">eppc</property>
-        <property name="connection.password"></property>
-        <property name="connection.pool_size">10</property>
-        <property name="statement_cache.size">100</property>
-        <property name="show_sql">false</property>
-        <property name="use_outer_join">true</property>
-        <property name="dialect">net.sf.hibernate.dialect.PostgreSQLDialect</property>
-        
-        <!-- Mapping files -->
-        <mapping resource="mir/core/model/ArticleType.hbm.xml"/>
-        <!--
-        <mapping resource="mir/core/model/TopicRich.hbm.xml"/>
-        <mapping resource="mir/core/model/TopicChild.hbm.xml"/>
-        -->
-        <mapping resource="mir/core/model/Breaking.hbm.xml"/>
-        <mapping resource="mir/core/model/Comment.hbm.xml"/>
-        <mapping resource="mir/core/model/Content.hbm.xml"/>
-        <mapping resource="mir/core/model/CommentStatus.hbm.xml"/>
-        <mapping resource="mir/core/model/Feature.hbm.xml"/>
-        <mapping resource="mir/core/model/Language.hbm.xml"/>
-        <mapping resource="mir/core/model/Media.hbm.xml"/>
-        <mapping resource="mir/core/model/MediaFolder.hbm.xml"/>
-        <mapping resource="mir/core/model/MediaType.hbm.xml"/>
-        <mapping resource="mir/core/model/Message.hbm.xml"/>
-        <mapping resource="mir/core/model/Rights.hbm.xml"/>
-        <mapping resource="mir/core/model/Topic.hbm.xml"/>
-        <mapping resource="mir/core/model/WebdbUser.hbm.xml"/>
-        <mapping resource="mir/core/model/UploadedMedia.hbm.xml"/>
-        <mapping resource="mir/core/model/Image.hbm.xml"/>
-        <mapping resource="mir/core/model/Audio.hbm.xml"/>
-        <mapping resource="mir/core/model/Video.hbm.xml"/>
-    </session-factory>
-
-</hibernate-configuration>
diff --git a/etc/server.xml b/etc/server.xml
deleted file mode 100755 (executable)
index 61eabc2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<!-- Example Mir Configuration File -->
- <mir name="t">
-  <class name="mircoders.servlet.ServletModuleOpenIndy">
-    <property name="directOp" value="yes"/>
-  </class>
-  <class name="mir.storage.DatabaseConfig">
-      <property name="username" value="postgres"/>
-      <property name="password" value=""/>
-  </class>
-</mir>
diff --git a/etc/struts-config-admin.xml b/etc/struts-config-admin.xml
deleted file mode 100755 (executable)
index 795cf16..0000000
+++ /dev/null
@@ -1,338 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
-<struts-config>
-    
-    <!-- ========== Data Source Configuration =============================== -->
-    <data-sources />
-    
-    <!-- ========== Form Bean Definitions ================================== -->
-    <form-beans>
-        <form-bean dynamic="true" name="logonForm" type="org.apache.struts.action.DynaActionForm">
-               <form-property name="login" type="java.lang.String"/>
-               <form-property name="password" type="java.lang.String"/>
-        </form-bean>
-        <form-bean dynamic="true" name="confirmForm" type="org.apache.struts.action.DynaActionForm">
-               <form-property name="id" type="java.lang.String"/>
-               <form-property name="offset" type="java.lang.String"/>
-               <form-property name="order" type="java.lang.String"/>
-               <form-property name="where" type="java.lang.String"/>
-               <form-property name="okurl" type="java.lang.String"/>
-               <form-property name="cancelurl" type="java.lang.String"/>
-               <form-property name="cancel" type="java.lang.String"/>
-               <form-property name="confirm" type="java.lang.String"/>
-        </form-bean>
-        <form-bean dynamic="true" name="topicForm" type="org.apache.struts.action.DynaActionForm">
-               <form-property name="id" type="java.lang.Integer"/>
-               <form-property name="new" type="java.lang.Boolean"/>
-               <form-property name="offset" type="java.lang.String"/>
-               <form-property name="title" type="java.lang.String"/>
-               <form-property name="parentTopic" type="java.lang.Integer"/>
-               <form-property name="archivUrl" type="java.lang.String"/>
-               <form-property name="mainUrl" type="java.lang.String"/>
-               <form-property name="filename" type="java.lang.String"/>
-               <form-property name="description" type="java.lang.String"/>
-        </form-bean>
-        <form-bean dynamic="true" name="messageForm" type="org.apache.struts.action.DynaActionForm">
-               <form-property name="id" type="java.lang.String"/>
-               <form-property name="new" type="java.lang.Boolean"/>
-               <form-property name="offset" type="java.lang.String"/>
-               <form-property name="title" type="java.lang.String"/>
-               <form-property name="creator" type="java.lang.String"/>
-               <form-property name="description" type="java.lang.String"/>
-        </form-bean>
-        <form-bean dynamic="true" name="contentForm" type="org.apache.struts.action.DynaActionForm">
-               <form-property name="id" type="java.lang.Integer"/>
-               <form-property name="new" type="java.lang.Boolean"/>
-               <form-property name="offset" type="java.lang.String"/>
-               <form-property name="returnurl" type="java.lang.String"/>
-               <form-property name="webdb_create" type="java.lang.String"/>
-               <form-property name="date" type="java.lang.String"/>
-               <form-property name="to_topic" type="java.lang.Integer"/>
-               <form-property name="to_article_type" type="java.lang.Integer"/>
-               <form-property name="to_language" type="java.lang.Integer"/>
-               <form-property name="title" type="java.lang.String"/>
-               <form-property name="subtitle" type="java.lang.String"/>
-               <form-property name="edittitle" type="java.lang.String"/>
-               <form-property name="source" type="java.lang.String"/>
-               <form-property name="creator" type="java.lang.String"/>
-               <form-property name="creator_email" type="java.lang.String"/>
-               <form-property name="creator_main_url" type="java.lang.String"/>
-               <form-property name="creator_address" type="java.lang.String"/>
-               <form-property name="creator_phone" type="java.lang.String"/>
-               <form-property name="is_html" type="java.lang.Integer"/>
-               <form-property name="is_published" type="java.lang.Integer"/>           
-               <form-property name="comment" type="java.lang.String"/>
-               <form-property name="content_data" type="java.lang.String"/>
-               <form-property name="description" type="java.lang.String"/>
-        </form-bean>
-    </form-beans>
-    
-    <!-- ========== Global Exception Definitions ============================== -->
-    <global-exceptions />
-    
-    <!-- ========== Global Forward Definitions =============================== -->
-    <global-forwards>
-        <forward
-            name="index"
-            path="index.do"
-            redirect="true"
-            contextRelative="false" />
-        <forward
-            name="confirm"
-            path="/confirm.shtml"
-            redirect="false"
-            contextRelative="false" />
-        <forward
-            name="logon"
-            path="/logon.do"
-            redirect="true"
-            contextRelative="false" />
-    </global-forwards>
-    
-    <!-- ========== Action Mapping Definitions =============================== -->
-    <action-mappings>
-        <action
-            attribute="confirmForm"
-            input="/admin/confirm.shtml"
-            name="confirmForm"
-            parameter="confirm"
-            path="/confirm"
-            scope="request"
-            type="mir.core.ui.action.admin.ConfirmAction"
-            unknown="false"
-            validate="true">
-               <forward
-                name="failed"
-                path="/logon.shtml"/>
-            <forward
-                name="success"
-                path="/index.do"/>
-        </action>
-               
-        <!-- Authenticate -->
-        <action
-            attribute="logonForm"
-            input="/admin/logon.shtml"
-            name="logonForm"
-            parameter="logon"
-            path="/logon"
-            scope="session"
-            type="mir.core.ui.action.admin.AuthenticationAction"
-            unknown="false"
-            validate="true">
-            <forward
-                name="failed"
-                path="/logon.shtml"/>
-            <forward
-                name="success"
-                path="/index.do"/>
-        </action>
-        
-        <action
-            parameter="logoff"
-            path="/logoff"
-            type="mir.core.ui.action.admin.AuthenticationAction">
-        </action>
-        
-        <action
-            parameter="index"
-            path="/index"
-            type="mir.core.ui.action.admin.StartpageAction">
-            <forward
-                name="success"
-                path="/index.shtml"/>
-        </action>
-        
-        <!-- Message -->
-        <action
-            parameter="list"
-            path="/messageList"
-            type="mir.core.ui.action.admin.MessageAction">
-            <forward
-                name="success"
-                path="/messagelist.shtml"/>
-        </action>
-        
-        <action
-            parameter="delete"
-            path="/messageDelete"
-            type="mir.core.ui.action.admin.MessageAction">
-            <forward
-                name="success"
-                path="/messageList.do"/>
-            <forward
-                name="failed"
-                path="/messageEdit.do"/>
-        </action>        
-        
-        <action
-            parameter="edit"
-            path="/messageEdit"
-            type="mir.core.ui.action.admin.MessageAction">
-            <forward
-                name="success"
-                path="/message.shtml"/>
-        </action>
-        
-        <action
-            parameter="add"
-            path="/messageAdd"
-            type="mir.core.ui.action.admin.MessageAction">
-            <forward
-                name="success"
-                path="/message.shtml"/>
-        </action>
-        
-        <action
-            attribute="messageForm"
-            input="/admin/message.shtml"
-            name="messageForm"
-            parameter="save"
-            path="/messageSave"
-            scope="request"
-            type="mir.core.ui.action.admin.MessageAction"
-            unknown="false"
-            validate="true">
-            <forward
-                name="failed"
-                path="/messageEdit.do"/>
-            <forward
-                name="success"
-                path="/messageList.do"/>
-        </action>
-
-        <!-- Topic -->
-        <action
-            parameter="list"
-            path="/topicList"
-            type="mir.core.ui.action.admin.TopicAction">
-            <forward
-                name="success"
-                path="/topiclist.shtml"/>
-        </action>
-        
-        <action
-            parameter="delete"
-            path="/topicDelete"
-            type="mir.core.ui.action.admin.TopicAction">
-            <forward
-                name="success"
-                path="/topicList.do"/>
-            <forward
-                name="failed"
-                path="/topicEdit.do"/>
-        </action>        
-        
-        <action
-            parameter="edit"
-            path="/topicEdit"
-            type="mir.core.ui.action.admin.TopicAction">
-            <forward
-                name="success"
-                path="/topic.shtml"/>
-        </action>
-        
-        <action
-            parameter="add"
-            path="/topicAdd"
-            type="mir.core.ui.action.admin.TopicAction">
-            <forward
-                name="success"
-                path="/topic.shtml"/>
-        </action>
-        
-        <action
-            attribute="topicForm"
-            input="/admin/topic.shtml"
-            name="topicForm"
-            parameter="save"
-            path="/topicSave"
-            scope="request"
-            type="mir.core.ui.action.admin.TopicAction"
-            unknown="false"
-            validate="true">
-            <forward
-                name="failed"
-                path="/topicEdit.do"/>
-            <forward
-                name="success"
-                path="/topicList.do"/>
-        </action>
-        
-        <!-- Content -->
-        <action
-            parameter="list"
-            path="/contentList"
-            type="mir.core.ui.action.admin.ContentAction">
-            <forward
-                name="success"
-                path="/contentlist.shtml"/>
-        </action>
-        
-        <action
-            parameter="delete"
-            path="/contentDelete"
-            type="mir.core.ui.action.admin.ContentAction">
-            <forward
-                name="success"
-                path="/contentList.do"/>
-            <forward
-                name="failed"
-                path="/contentEdit.do"/>
-        </action>        
-        
-        <action
-            parameter="edit"
-            path="/contentEdit"
-            type="mir.core.ui.action.admin.ContentAction">
-            <forward
-                name="success"
-                path="/content.shtml"/>
-        </action>
-        
-        <action
-            parameter="add"
-            path="/contentAdd"
-            type="mir.core.ui.action.admin.ContentAction">
-            <forward
-                name="success"
-                path="/content.shtml"/>
-        </action>
-        
-        <action
-            attribute="contentForm"
-            input="/admin/content.shtml"
-            name="contentForm"
-            parameter="save"
-            path="/contentSave"
-            scope="request"
-            type="mir.core.ui.action.admin.ContentAction"
-            unknown="false"
-            validate="true">
-            <forward
-                name="failed"
-                path="/contentEdit.do"/>
-            <forward
-                name="success"
-                path="/contentList.do"/>
-        </action>
-
-    </action-mappings>
-    
-    <!-- ========== Controller Configuration ================================ -->
-    <controller
-        bufferSize="4096"
-        contentType="text/html"
-        debug="0"
-        locale="false"
-        maxFileSize="250M"
-        multipartClass="org.apache.struts.upload.CommonsMultipartRequestHandler"
-        nocache="false"
-        processorClass="org.apache.struts.action.RequestProcessor"
-        inputForward="false" />
-    
-    <!-- ========== Message Resources Definitions ============================ -->
-    
-    <!-- ========== Plug Ins Configuration ================================= -->
-</struts-config>
-
diff --git a/etc/struts-config.xml b/etc/struts-config.xml
deleted file mode 100755 (executable)
index f227b22..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
-<struts-config>
-    <data-sources />
-    <form-beans />
-    <global-exceptions />
-    <global-forwards />
-    <action-mappings />
-    <controller
-        bufferSize="4096"
-        contentType="text/html"
-        debug="0"
-        locale="false"
-        maxFileSize="250M"
-        multipartClass="org.apache.struts.upload.CommonsMultipartRequestHandler"
-        nocache="false"
-        processorClass="org.apache.struts.action.RequestProcessor"
-        inputForward="false" />
-    <message-resources
-        factory="org.apache.struts.util.PropertyMessageResourcesFactory"
-        key="org.apache.struts.action.MESSAGE"
-        null="true"
-        parameter="mir.core.ui.action.ApplicationResources" />
-       <plug-in className="mir.core.ui.plugin.HibernatePlugin" />
-       <plug-in className="mir.core.ui.plugin.ConfigurationPlugin" />
-</struts-config>
-
diff --git a/etc/web.xml b/etc/web.xml
deleted file mode 100755 (executable)
index ab001f7..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!DOCTYPE web-app
-    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
-    "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
-       <display-name>Mir CMS</display-name>
-       
-       <filter>
-               <filter-name>caching</filter-name>
-               <filter-class>mir.core.ui.filter.CachingFilter</filter-class>   
-       </filter>
-               
-       <filter>
-               <filter-name>authentication</filter-name>
-               <filter-class>mir.core.ui.filter.AuthenticationFilter</filter-class>    
-       </filter>
-
-       <filter-mapping>
-               <filter-name>caching</filter-name>
-               <servlet-name>action</servlet-name>
-       </filter-mapping>
-               
-    <filter-mapping>
-               <filter-name>caching</filter-name>
-               <servlet-name>presentation</servlet-name>
-       </filter-mapping>       
-       
-       <filter-mapping>
-               <filter-name>authentication</filter-name>
-               <servlet-name>action</servlet-name>
-       </filter-mapping>
-       
-    <filter-mapping>
-               <filter-name>authentication</filter-name>
-               <servlet-name>presentation</servlet-name>
-       </filter-mapping>
-                       
-    <servlet>
-        <servlet-name>Mir</servlet-name>
-        <servlet-class>Mir</servlet-class>
-        <init-param>
-            <param-name>Config</param-name>
-            <param-value>etc/config.properties</param-value>
-        </init-param>
-    </servlet>
-
-    <servlet>
-        <servlet-name>OpenMir</servlet-name>
-        <servlet-class>OpenMir</servlet-class>
-        <init-param>
-            <param-name>Config</param-name>
-            <param-value>etc/config.properties</param-value>
-        </init-param>
-    </servlet>
-       
-       <servlet>
-               <servlet-name>presentation</servlet-name>
-               <description>Presentation</description>
-               <servlet-class>mir.core.ui.servlet.TemplateServlet</servlet-class>
-       </servlet>
-
-       <servlet>
-               <servlet-name>action</servlet-name>
-               <description>Action</description>
-               <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
-        <init-param>
-            <param-name>config</param-name>
-            <param-value>/WEB-INF/etc/struts-config.xml</param-value>            
-        </init-param>
-        <init-param>
-            <param-name>config/admin</param-name>
-            <param-value>/WEB-INF/etc/struts-config-admin.xml</param-value>
-        </init-param>
-        <init-param>
-            <param-name>debug</param-name>
-            <param-value>3</param-value>        
-        </init-param>
-        <init-param>
-            <param-name>detail</param-name>
-            <param-value>3</param-value>     
-        </init-param>
-        <load-on-startup>1</load-on-startup>
-       </servlet>
-       
-       <servlet-mapping>
-               <servlet-name>presentation</servlet-name>
-               <url-pattern>*.shtml</url-pattern>
-       </servlet-mapping>
-       
-       <servlet-mapping>
-               <servlet-name>action</servlet-name>
-               <url-pattern>*.do</url-pattern>
-       </servlet-mapping> 
-
-    <servlet-mapping>
-        <servlet-name>Mir</servlet-name>
-        <url-pattern>/servlet/Mir</url-pattern>
-    </servlet-mapping>
-
-    <servlet-mapping>
-        <servlet-name>OpenMir</servlet-name>
-        <url-pattern>/servlet/OpenMir</url-pattern>
-    </servlet-mapping>
-               
-    <mime-mapping>
-      <extension>
-        mp3 
-      </extension>
-      <mime-type>
-        audio/x-mp3
-      </mime-type>
-    </mime-mapping>
-    <mime-mapping>
-      <extension>
-        ra
-      </extension>
-      <mime-type>
-        audio/vnd.rn-realaudio
-      </mime-type>
-    </mime-mapping>
-    <mime-mapping>
-      <extension>
-        rm
-      </extension>
-      <mime-type>
-        application/vnd.rn-realmedia
-      </mime-type>
-    </mime-mapping>
-    <mime-mapping>
-      <extension>
-        mov
-      </extension>
-      <mime-type>
-        video/quicktime 
-      </mime-type>
-    </mime-mapping>
-    <mime-mapping>
-      <extension>
-        mpg
-      </extension>
-      <mime-type>
-        video/mpeg
-      </mime-type>
-    </mime-mapping>
-    <mime-mapping>
-      <extension>
-        avi
-      </extension>
-      <mime-type>
-        video/x-msvideo
-      </mime-type>
-    </mime-mapping>
-    <mime-mapping>
-      <extension>
-        asf
-      </extension>
-      <mime-type>
-        video/x-ms-asf
-      </mime-type>
-    </mime-mapping>
-    <mime-mapping>
-      <extension>
-        pdf
-      </extension>
-      <mime-type>
-        application/pdf
-      </mime-type>
-    </mime-mapping>
-    
-       <welcome-file-list>
-               <welcome-file>index.html</welcome-file>
-       </welcome-file-list>
-</web-app>
\ No newline at end of file
diff --git a/source/mircoders/media/AbstractMediaHandler.java b/source/mircoders/media/AbstractMediaHandler.java
new file mode 100755 (executable)
index 0000000..05db1ed
--- /dev/null
@@ -0,0 +1,60 @@
+/*\r
+ * Copyright (C) 2001, 2002 The Mir-coders group\r
+ *\r
+ * This file is part of Mir.\r
+ *\r
+ * Mir is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 2 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Mir is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with Mir; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+ *\r
+ * In addition, as a special exception, The Mir-coders gives permission to link\r
+ * the code of this program with  any library licensed under the Apache Software License,\r
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library\r
+ * (or with modified versions of the above that use the same license as the above),\r
+ * and distribute linked combinations including the two.  You must obey the\r
+ * GNU General Public License in all respects for all of the code used other than\r
+ * the above mentioned libraries.  If you modify this file, you may extend this\r
+ * exception to your version of the file, but you are not obligated to do so.\r
+ * If you do not wish to do so, delete this exception statement from your version.\r
+ */\r
+package mircoders.media;\r
+\r
+import mir.media.MediaHandler;\r
+import mir.media.MediaExc;\r
+import mir.media.MediaFailure;\r
+import mir.entity.Entity;\r
+import mir.misc.StringUtil;\r
+\r
+import java.io.File;\r
+\r
+public abstract class AbstractMediaHandler implements MediaHandler {\r
+  public File getStorageFile(Entity aMedia, Entity aMediaType) throws MediaExc, MediaFailure {\r
+    return new File(new File(getStoragePath()), getRelativeStorageFile(aMedia, aMediaType));\r
+  }\r
+\r
+  public String getRelativeStorageFile(Entity aMedia, Entity aMediaType) throws MediaExc, MediaFailure {\r
+    String publishPath = aMedia.getFieldValue("publish_path");\r
+\r
+    if (publishPath==null || publishPath.length()==0) {\r
+      String extension = aMediaType.getFieldValue("name");\r
+      String mediaFileName = aMedia.getId() + "." + extension;\r
+      String date = aMedia.getFieldValue("date");\r
+      String datePath = StringUtil.webdbDate2path(date);\r
+      return (new File(datePath, mediaFileName)).getPath();\r
+    }\r
+    else {\r
+      return publishPath;\r
+    }\r
+  }\r
+\r
+}\r
diff --git a/source/mircoders/media/MediaHandlerOgg.java b/source/mircoders/media/MediaHandlerOgg.java
new file mode 100755 (executable)
index 0000000..d518f8b
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+ * Copyright (C) 2001, 2002 The Mir-coders group
+ *
+ * This file is part of Mir.
+ *
+ * Mir is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Mir is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Mir; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * In addition, as a special exception, The Mir-coders gives permission to link
+ * the code of this program with  any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two.  You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries.  If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
+ * If you do not wish to do so, delete this exception statement from your version.
+ */
+package  mircoders.media;
+
+import java.io.StringReader;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import mir.entity.Entity;
+import mir.log.LoggerWrapper;
+import mir.media.MediaExc;
+import mir.media.MediaFailure;
+import mir.media.MediaHandler;
+import mir.misc.FileUtil;
+import mir.misc.StringUtil;
+
+/**
+ * Please note: this media handler produces
+ * 2 media files, the raw .ogg and a .pls which
+ * contains the URL to the ogg in shoutcast playlist
+ * format. What's important is that the web server (of
+ * the media host) must recognize the .ogg and .pls file
+ * extensions and send the proper "application/x-ogg"
+ * and "audio/x-scpls" mime-types respectively.
+ * If the web server is apache, it's easy, just
+ * add:
+ *
+ * audio/x-ogg                     ogg
+ * audio/x-scpl                    pls
+ *
+ * to the file pointed to by the "TypesConfig"
+ * command in your apache config file. Or add
+ * and equivalent AddType command to your httpd.conf.
+ * Of course this assumes that the mod_mime is loaded.
+ *
+ * If the web server is not apache, then your on your own.
+ *
+ * @see mir.media.MediaHandler
+ * @author pietro <pietro@indymedia.org> - based on MediaHandlerMp3 by mh <mh@nadir.org>
+ * @version $Id:
+ */
+
+public class MediaHandlerOgg extends MediaHandlerAudio implements MediaHandler
+{
+  protected LoggerWrapper logger;
+
+  public MediaHandlerOgg() {
+    logger = new LoggerWrapper("Media.Audio.Ogg");
+  }
+
+  public void produce(Entity ent, Entity mediaTypeEnt) throws MediaExc, MediaFailure {
+
+    // first check if the file exists
+    super.produce(ent, mediaTypeEnt);
+
+    String baseName = ent.getId();
+    String date = ent.getFieldValue("date");
+    String datePath = StringUtil.webdbDate2path(date);
+    String oggPointer = getPublishHost() + ent.getFieldValue("publish_path");
+    //String mpegURLFile = baseName + ".m3u";
+    String playlistFile = baseName + ".pls";
+
+    try {
+      //write the "meta" files
+      //first the .m3u since it only contains one line
+      //dont write the .m3u it is an ogg vorbis file
+      //FileUtil.write(getStoragePath() + "/" + datePath + "/" + mpegURLFile,
+        //new StringReader(mp3Pointer), "US-ASCII");
+      //now the .pls file
+      FileUtil.write(getStoragePath() + "/" + datePath + "/" + playlistFile,
+                     new StringReader(oggPointer), "US-ASCII");
+    }
+    catch (Throwable e) {
+      logger.error("MediaHandlerOgg.produce: " + e.toString());
+
+      throw new MediaFailure(e);
+    }
+  }
+
+  public List getURL(Entity ent, Entity mediaTypeEnt) {
+    List theList = new Vector();
+
+    //String stringSize = ent.getFieldValue("size");
+    //int size = Integer.parseInt(stringSize, 10)/1024;
+    theList.add(ent);
+
+    String basePath = StringUtil.regexpReplace(ent.getFieldValue("publish_path"),
+                                               ".ogg$", "");
+
+    // @todo the texts ("title") below urgently need to be sanely localizaeble
+    // somehow
+    //no .m3u!
+    //Map m3uHash = new HashMap();
+    //m3uHash.put("publish_path", basePath + ".m3u");
+    //m3uHash.put("publish_server", ent.getFieldValue("publish_server"));
+    //m3uHash.put("title", "stream URL");
+    //theList.add(m3uHash);
+
+    Map plsHash = new HashMap();
+    plsHash.put("publish_path", basePath + ".pls");
+    plsHash.put("publish_server", ent.getFieldValue("publish_server"));
+    plsHash.put("title", "playlist URL");
+    theList.add(plsHash);
+
+    return theList;
+
+  }
+
+  public String getDescr(Entity mediaType) {
+    return "ogg";
+  }
+}
+
+
+
diff --git a/source/mircoders/media/MediaHelper.java b/source/mircoders/media/MediaHelper.java
new file mode 100755 (executable)
index 0000000..bad3d16
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2001, 2002 The Mir-coders group
+ *
+ * This file is part of Mir.
+ *
+ * Mir is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Mir is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Mir; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * In addition, as a special exception, The Mir-coders gives permission to link
+ * the code of this program with  any library licensed under the Apache Software License,
+ * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
+ * (or with modified versions of the above that use the same license as the above),
+ * and distribute linked combinations including the two.  You must obey the
+ * GNU General Public License in all respects for all of the code used other than
+ * the above mentioned libraries.  If you modify this file, you may extend this
+ * exception to your version of the file, but you are not obligated to do so.
+ * If you do not wish to do so, delete this exception statement from your version.
+ */
+package mircoders.media;
+
+import mir.entity.Entity;
+import mir.storage.Database;
+import java.util.Map;
+import java.util.HashMap;
+import mircoders.global.*;
+import mircoders.storage.*;
+import mir.media.*;
+import mircoders.localizer.MirLocalizerExc;
+
+/**
+ * helper class to resolve media handlers using reflection
+ *
+ * @author mh
+ * @author Zapata
+ * @version 2003
+ */
+
+public final class MediaHelper {
+  private static Map nameToMediaHandler = new HashMap();
+  private static String defaultMediaHandler = null;
+
+  public static void addHandler(String aName, MediaHandler aHandler) {
+    synchronized (nameToMediaHandler) {
+      nameToMediaHandler.put(aName, aHandler);
+    }
+  }
+
+  public static MediaHandler getHandler(Entity aMediaType) throws MediaExc, MediaFailure {
+    String handlerName = aMediaType.getFieldValue("classname");
+
+    try {
+      return MirGlobal.localizer().media().getHandler(handlerName);
+    }
+    catch (MirLocalizerExc e) {
+      throw new MediaFailure(e);
+    }
+  }
+
+  public static Database getStorage(Entity mediaType, String aTable) throws MediaExc, MediaFailure {
+    if (aTable.equals("Images"))
+      return DatabaseImages.getInstance();
+    else if (aTable.equals("Audio"))
+      return DatabaseAudio.getInstance();
+    if (aTable.equals("Video"))
+      return DatabaseVideo.getInstance();
+    if (aTable.equals("Other"))
+      return DatabaseOther.getInstance();
+
+    throw new MediaExc("Unknown storage specification: " + aTable);
+  }
+}
+
+
+
diff --git a/source/mircoders/media/URLMediaHandler.java b/source/mircoders/media/URLMediaHandler.java
new file mode 100755 (executable)
index 0000000..8343c54
--- /dev/null
@@ -0,0 +1,121 @@
+package mircoders.media;
+
+import mir.entity.Entity;
+import mir.media.MediaExc;
+import mir.media.MediaFailure;
+import mir.media.MediaHandler;
+import mir.session.UploadedFile;
+
+import java.io.File;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * <p>URLMediaHandler</p>
+ * <p>Description:
+ *     This is a media handler for externally stored media.
+ *     The media is presented by its url.
+ * </p>
+ * @author Zapata
+ */
+
+public class URLMediaHandler implements MediaHandler {
+  private String bigIcon;
+  private String tinyIcon;
+  private String iconAlternative;
+
+  public URLMediaHandler(String aBigIcon, String aTinyIcon, String anIconAlternative) {
+    bigIcon = aBigIcon;
+    tinyIcon = aTinyIcon;
+    iconAlternative = anIconAlternative;
+  }
+
+  /**
+   * {@inheritDoc}
+   *
+   * Since this media handler assumes the media is stored on a wholly different
+   * server, this operation is not applicable
+   */
+  public void store(UploadedFile anUploadedFile, Entity aMedia, Entity aMediaType) throws MediaExc, MediaFailure {
+    throw new UnsupportedOperationException();
+  }
+
+  /**
+   * {@inheritDoc}
+   *
+   * Since this media handler assumes the media is stored on a wholly different
+   * server, this operation is not applicable
+   */
+  public void store(InputStream anInputStream, Entity anEntity, Entity aMediaTypeEntity) throws MediaExc, MediaFailure {
+    throw new UnsupportedOperationException();
+  }
+
+  /**
+   * {@inheritDoc}
+   *
+   * Since this media handler assumes the media is stored on a wholly different
+   * server, this operation is not applicable
+   */
+  public void store(File aFile, Entity aMedia, Entity aMediaType) throws MediaExc, MediaFailure {
+    throw new UnsupportedOperationException();
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  public void produce(Entity anEntity, Entity aMediaTypeEntity) throws MediaExc, MediaFailure {
+    // nothing to do here
+  }
+
+  public InputStream getMedia(Entity anEntity, Entity aMediaTypeEntity) throws MediaExc, MediaFailure {
+    return null;
+  }
+
+  public InputStream getThumbnail(Entity anEntity) throws MediaExc, MediaFailure {
+    return null;
+  }
+
+  public String getThumbnailMimeType(Entity aMediaEntity, Entity aMediaTypeEntity) throws MediaExc, MediaFailure {
+    return "application/octetstream";
+  }
+
+  public List getURL(Entity aMediaEntity, Entity aMediaTypeEntity) throws MediaExc, MediaFailure {
+    List result = new ArrayList();
+    result.add(aMediaTypeEntity.getFieldValue("publish_server")+aMediaTypeEntity.getFieldValue("publish_path"));
+
+    return result;
+  }
+
+  public Object getURLs(Entity ent, Entity mediaTypeEnt) throws MediaExc, MediaFailure {
+    return null;
+  }
+
+  public String getStoragePath () throws MediaExc, MediaFailure {
+    throw new UnsupportedOperationException();
+  }
+
+  public String getIconStoragePath () throws MediaExc, MediaFailure {
+    throw new UnsupportedOperationException();
+  }
+
+  public String getPublishHost () throws MediaExc, MediaFailure {
+    throw new UnsupportedOperationException();
+  }
+
+  public String getBigIconName () {
+    return bigIcon;
+  }
+
+  public String getTinyIconName () {
+    return tinyIcon;
+  }
+
+  public String getIconAltName () {
+    return iconAlternative;
+  }
+
+  public String getDescr(Entity mediaTypeEnt) {
+    return "Url";
+  }
+}
\ No newline at end of file
diff --git a/web/admin/index.html b/web/admin/index.html
deleted file mode 100755 (executable)
index 6107984..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<html>
-<head>
-    <title>Mir</title>
-    <meta http-equiv="refresh" content="0;url=index.do">
-</head>
-<body>
-   When you're not automatically redirected, click <a href="servlet/Mir">here</a><br>
-<br>
-</body>
-</html>
-
diff --git a/web/produced/img/arrow_down.gif b/web/produced/img/arrow_down.gif
deleted file mode 100755 (executable)
index b2b5e2f..0000000
Binary files a/web/produced/img/arrow_down.gif and /dev/null differ
diff --git a/web/produced/img/audio_big.gif b/web/produced/img/audio_big.gif
deleted file mode 100755 (executable)
index e1473c6..0000000
Binary files a/web/produced/img/audio_big.gif and /dev/null differ
diff --git a/web/produced/img/audio_small.gif b/web/produced/img/audio_small.gif
deleted file mode 100755 (executable)
index 4a2677f..0000000
Binary files a/web/produced/img/audio_small.gif and /dev/null differ
diff --git a/web/produced/img/bashcomp2.gif b/web/produced/img/bashcomp2.gif
deleted file mode 100755 (executable)
index 5288065..0000000
Binary files a/web/produced/img/bashcomp2.gif and /dev/null differ
diff --git a/web/produced/img/cleft.gif b/web/produced/img/cleft.gif
deleted file mode 100755 (executable)
index 5a3f14a..0000000
Binary files a/web/produced/img/cleft.gif and /dev/null differ
diff --git a/web/produced/img/dot.gif b/web/produced/img/dot.gif
deleted file mode 100755 (executable)
index d80b7f4..0000000
Binary files a/web/produced/img/dot.gif and /dev/null differ
diff --git a/web/produced/img/extlink.gif b/web/produced/img/extlink.gif
deleted file mode 100755 (executable)
index 4366ee6..0000000
Binary files a/web/produced/img/extlink.gif and /dev/null differ
diff --git a/web/produced/img/help.gif b/web/produced/img/help.gif
deleted file mode 100755 (executable)
index f177ee2..0000000
Binary files a/web/produced/img/help.gif and /dev/null differ
diff --git a/web/produced/img/intlink.gif b/web/produced/img/intlink.gif
deleted file mode 100755 (executable)
index bc10b45..0000000
Binary files a/web/produced/img/intlink.gif and /dev/null differ
diff --git a/web/produced/img/link_small.gif b/web/produced/img/link_small.gif
deleted file mode 100755 (executable)
index 600a830..0000000
Binary files a/web/produced/img/link_small.gif and /dev/null differ
diff --git a/web/produced/img/logo_small.gif b/web/produced/img/logo_small.gif
deleted file mode 100755 (executable)
index f34786d..0000000
Binary files a/web/produced/img/logo_small.gif and /dev/null differ
diff --git a/web/produced/img/mail_small.gif b/web/produced/img/mail_small.gif
deleted file mode 100755 (executable)
index 13cc859..0000000
Binary files a/web/produced/img/mail_small.gif and /dev/null differ
diff --git a/web/produced/img/maillink.gif b/web/produced/img/maillink.gif
deleted file mode 100755 (executable)
index 1c2e50d..0000000
Binary files a/web/produced/img/maillink.gif and /dev/null differ
diff --git a/web/produced/img/photo_big.gif b/web/produced/img/photo_big.gif
deleted file mode 100755 (executable)
index 1481a4e..0000000
Binary files a/web/produced/img/photo_big.gif and /dev/null differ
diff --git a/web/produced/img/photo_small.gif b/web/produced/img/photo_small.gif
deleted file mode 100755 (executable)
index 5f1796c..0000000
Binary files a/web/produced/img/photo_small.gif and /dev/null differ
diff --git a/web/produced/img/pointgris.gif b/web/produced/img/pointgris.gif
deleted file mode 100755 (executable)
index ef2d09f..0000000
Binary files a/web/produced/img/pointgris.gif and /dev/null differ
diff --git a/web/produced/img/search_icon.gif b/web/produced/img/search_icon.gif
deleted file mode 100755 (executable)
index 5f34ea5..0000000
Binary files a/web/produced/img/search_icon.gif and /dev/null differ
diff --git a/web/produced/img/sp.gif b/web/produced/img/sp.gif
deleted file mode 100755 (executable)
index 35d42e8..0000000
Binary files a/web/produced/img/sp.gif and /dev/null differ
diff --git a/web/produced/img/text_big.gif b/web/produced/img/text_big.gif
deleted file mode 100755 (executable)
index 2a31faa..0000000
Binary files a/web/produced/img/text_big.gif and /dev/null differ
diff --git a/web/produced/img/text_small.gif b/web/produced/img/text_small.gif
deleted file mode 100755 (executable)
index ec24bd6..0000000
Binary files a/web/produced/img/text_small.gif and /dev/null differ
diff --git a/web/produced/img/video_big.gif b/web/produced/img/video_big.gif
deleted file mode 100755 (executable)
index 03a683a..0000000
Binary files a/web/produced/img/video_big.gif and /dev/null differ
diff --git a/web/produced/img/video_small.gif b/web/produced/img/video_small.gif
deleted file mode 100755 (executable)
index d61cd29..0000000
Binary files a/web/produced/img/video_small.gif and /dev/null differ
diff --git a/web/produced/style/formate.css b/web/produced/style/formate.css
deleted file mode 100755 (executable)
index f81ecaa..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-<STYLE TYPE="text/css">   
-
-   <!--
-
-   a:link  {
-
-       color : #006600;
-
-       text-decoration : none;
-
-   }
-
-   
-
-   a:visited  {
-
-       color : #009900;
-
-       text-decoration : none;
-
-   }
-
-   
-
-   a:active  {
-
-       color : White;
-
-       text-decoration : none;
-
-       background-color : #006600;
-
-   }
-
-   
-
-   a:hover  {
-
-       color : White;
-
-       text-decoration : none;
-
-       background-color : #006600;
-
-   }
-
-   
-
-   body,ol,div,td,th,address,blockquote,nobr,form  {
-
-       font-family : Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;
-
-   }
-
-   
-
-   h1,h2,h4  {
-
-       font-family : Trebuchet MS, Verdana, Arial, Helvetica,sans-serif;
-
-   }
-
-   
-
-   h3  {
-
-       font-family : Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;
-
-       font-size : 11pt;
-
-   }
-
-   
-
-   pre  {
-
-       font-family : Courier New, Courier, mono, Arial, Helvetica, sans-serif;
-
-       font-size : 8pt;
-
-   }
-
-   
-
-   ul,li,p,ol,b,i  {
-
-       font-family : Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;
-
-   }
-
-   
-
-   p.small  {
-
-       font-family : Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;
-
-       font-size : 8pt;
-
-   }
-
-   
-
-   p.dir  {
-
-       font-family : Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;
-
-       font-size : 10pt;
-
-       margin-top : 0cm;
-
-       margin-bottom : 0cm;
-
-   }
-
-   
-
-   a.black  {
-
-       color : Black;
-
-   }
-
-   -->
-
-   </STYLE>
-
diff --git a/web/produced/style/mir.css b/web/produced/style/mir.css
deleted file mode 100755 (executable)
index 6c12b85..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-a {  color: #0000CC; text-decoration: underline}
-a:hover {  color: #333333; text-decoration: none}
-td {  font-family: "Times New Roman", Times, serif}
-.small {  font-size: x-small}
-pre {  font-family: "Courier", Courier, serif}