From: zapata Date: Tue, 4 Mar 2003 22:00:51 +0000 (+0000) Subject: fixes: X-Git-Tag: BEFORE_MERGE_1_1~246 X-Git-Url: http://erislabs.net/gitweb/?p=mir.git;a=commitdiff_plain;h=72c22389b3e9efb92e9b56fd8761d767d174155d fixes: - only published media are now generated into articles - HashMap -> Map for variable defintions - cos library upgraded added - upload media from the article page --- diff --git a/bundles/admin_en.properties b/bundles/admin_en.properties index 9ffef87b..61dc5a19 100755 --- a/bundles/admin_en.properties +++ b/bundles/admin_en.properties @@ -1,6 +1,6 @@ ########## admin ########## # language: english -# $Id: admin_en.properties,v 1.35 2003/02/21 05:38:36 zapata Exp $ +# $Id: admin_en.properties,v 1.36 2003/03/04 22:00:51 zapata Exp $ languagename=English @@ -152,9 +152,13 @@ content.video=Video content.other=Other media content.media=Media content.addimage=add image +content.uploadimage=upload image content.addaudio=add audio +content.uploadaudio=upload audio content.addvideo=add video +content.uploadvideo=upload video content.addother=add other media +content.uploadother=upload other media content.creationdate=date content.modificationdate=last change content.status=Status diff --git a/lib/cos.jar b/lib/cos.jar index bcb822ab..6a4a1ff5 100755 Binary files a/lib/cos.jar and b/lib/cos.jar differ diff --git a/source/Mir.java b/source/Mir.java index ed6825c3..b61308b6 100755 --- a/source/Mir.java +++ b/source/Mir.java @@ -81,14 +81,14 @@ import mircoders.storage.DatabaseUsers; /** * Mir.java - main servlet, that dispatches to servletmodules * - * @author $Author: idfx $ - * @version $Id: Mir.java,v 1.30 2003/02/28 18:27:07 idfx Exp $ + * @author $Author: zapata $ + * @version $Id: Mir.java,v 1.31 2003/03/04 22:00:51 zapata Exp $ * */ public class Mir extends AbstractServlet { private static ModuleUsers usersModule = null; private static ModuleMessage messageModule = null; - private final static HashMap servletModuleInstanceHash = new HashMap(); + private final static Map servletModuleInstanceHash = new HashMap(); //I don't know about making this static cause it removes the //possibility to change the config on the fly.. -mh diff --git a/source/mir/entity/Entity.java b/source/mir/entity/Entity.java index 0ea03865..85ae7121 100755 --- a/source/mir/entity/Entity.java +++ b/source/mir/entity/Entity.java @@ -37,6 +37,7 @@ package mir.entity; import java.util.List; +import java.util.Map; import java.util.HashMap; import java.util.Iterator; import java.util.Set; @@ -59,7 +60,7 @@ import mir.storage.StorageObjectFailure; * Base Class of Entities * Interfacing TemplateHashModel and TemplateModelRoot to be freemarker compliant * - * @version $Id: Entity.java,v 1.16 2003/02/28 18:27:07 idfx Exp $ + * @version $Id: Entity.java,v 1.17 2003/03/04 22:00:51 zapata Exp $ * @author rk * */ @@ -69,7 +70,7 @@ public class Entity implements TemplateHashModel, TemplateModelRoot protected static MirPropertiesConfiguration configuration; private boolean changed; - protected HashMap theValuesHash; // tablekey / value + protected Map theValuesHash; // tablekey / value protected StorageObject theStorageObject; protected List streamedInput = null; protected LoggerWrapper logger; @@ -107,24 +108,17 @@ public class Entity implements TemplateHashModel, TemplateModelRoot /** * Sets the values of the Entity. - * @param theStringValues HashMap containing the new values of the Entity + * @param theStringValues Map containing the new values of the Entity */ - public void setValues(HashMap theStringValues) { + public void setValues(Map theStringValues) { /** @todo should be synchronized */ if (theStringValues != null) { theValuesHash = new HashMap(); - String aKey; - Set set = theStringValues.keySet(); - Iterator it = set.iterator(); - int size = set.size(); - for (int i = 0; i < size; i++) { - aKey = (String) it.next(); - theValuesHash.put(aKey, (String) theStringValues.get(aKey)); - } + theValuesHash.putAll(theStringValues); } else - logger.warn("Entity.setValues called with null HashMap"); + logger.warn("Entity.setValues called with null Map"); } /** @@ -248,14 +242,14 @@ public class Entity implements TemplateHashModel, TemplateModelRoot } /** - * Returns a Hashmap with all values of the Entity. - * @return HashMap with field name as key and the corresponding values + * Returns a Map with all values of the Entity. + * @return Map with field name as key and the corresponding values * * @deprecated This method is deprecated and will be deleted in the next release. * Entity interfaces freemarker.template.TemplateHashModel now and can * be used in the same way as SimpleHash. */ - public HashMap getValues() { + public Map getValues() { logger.warn("using deprecated Entity.getValues() - a waste of resources"); return theValuesHash; } diff --git a/source/mir/misc/FileHandler.java b/source/mir/misc/FileHandler.java index 7d9b01e4..790d5c33 100755 --- a/source/mir/misc/FileHandler.java +++ b/source/mir/misc/FileHandler.java @@ -31,7 +31,7 @@ package mir.misc; -import java.util.HashMap; +import java.util.Map; import com.oreilly.servlet.multipart.FilePart; @@ -39,16 +39,16 @@ import com.oreilly.servlet.multipart.FilePart; /** * Interface that classes wishing to be used as a callback on FileParts for the * WebdbMultipartRequest class should implement this interface. - * + * * @author mh - * @version $Id: FileHandler.java,v 1.3 2003/01/25 17:45:17 idfx Exp $ + * @version $Id: FileHandler.java,v 1.4 2003/03/04 22:00:52 zapata Exp $ * @see mir.misc.WebdbMultipartRequest - * + * */ public interface FileHandler { - public void setFile (FilePart filePart, int fileNum, HashMap Params) + public void setFile (FilePart filePart, int fileNum, Map Params) throws FileHandlerException, FileHandlerUserException; } diff --git a/source/mir/misc/HTMLTemplateProcessor.java b/source/mir/misc/HTMLTemplateProcessor.java index 346d3d21..46775f27 100755 --- a/source/mir/misc/HTMLTemplateProcessor.java +++ b/source/mir/misc/HTMLTemplateProcessor.java @@ -352,11 +352,11 @@ public final class HTMLTemplateProcessor { /** * Konvertiert ein Hashtable mit den keys und values als String * in ein freemarker.template.SimpleHash-Modell - * @param mergeData der HashMap mit den String / String Daten + * @param mergeData der Map mit den String / String Daten * @return SimpleHash mit den entsprechenden freemarker Daten * */ - public static SimpleHash makeSimpleHash(HashMap mergeData) { + public static SimpleHash makeSimpleHash(Map mergeData) { SimpleHash modelRoot = new SimpleHash(); String aField; if (mergeData != null) { diff --git a/source/mir/misc/WebdbMultipartRequest.java b/source/mir/misc/WebdbMultipartRequest.java index 42e90823..d421d12d 100755 --- a/source/mir/misc/WebdbMultipartRequest.java +++ b/source/mir/misc/WebdbMultipartRequest.java @@ -34,6 +34,7 @@ package mir.misc; import java.io.IOException; import java.util.Enumeration; import java.util.HashMap; +import java.util.Map; import java.util.Hashtable; import java.util.Vector; @@ -82,20 +83,20 @@ public class WebdbMultipartRequest /** - * The following comment and some code was adapted from the Oreilley cos.jar + * The following comment and some code was adapted from the Oreilley cos.jar * package. -mh 2001.09.20 * - * Returns all the parameters as a HashMap of Strings, any parameter - * that sent without a value will be null. A value - * is guaranteed to be in its normal, decoded form. If A parameter - * has multiple values, only the last one is returned (for backward + * Returns all the parameters as a Map of Strings, any parameter + * that sent without a value will be null. A value + * is guaranteed to be in its normal, decoded form. If A parameter + * has multiple values, only the last one is returned (for backward * compatibility). For parameters with multiple values, it's possible * the last "value" may be null. * - * @return A HashMap of String representations of the parameter values. + * @return A Map of String representations of the parameter values. */ - public HashMap getParameters(){ - HashMap pHash = new HashMap(); + public Map getParameters(){ + Map pHash = new HashMap(); String value = new String(); Enumeration Keys = parameters.keys(); @@ -116,10 +117,10 @@ public class WebdbMultipartRequest * The following code and comment stolen from oreilley cos.jar. * -mh. 2001.09.20 * - * Returns the values of the named parameter as a String array, or null if - * the parameter was not sent. The array has one entry for each parameter - * field sent. If any field was sent without a value that entry is stored - * in the array as a null. The values are guaranteed to be in their + * Returns the values of the named parameter as a String array, or null if + * the parameter was not sent. The array has one entry for each parameter + * field sent. If any field was sent without a value that entry is stored + * in the array as a null. The values are guaranteed to be in their * normal, decoded form. A single value is returned as a one-element array. * * @param name the parameter name. diff --git a/source/mir/module/AbstractModule.java b/source/mir/module/AbstractModule.java index a010a855..2324e19a 100755 --- a/source/mir/module/AbstractModule.java +++ b/source/mir/module/AbstractModule.java @@ -32,7 +32,7 @@ package mir.module; import java.sql.SQLException; -import java.util.HashMap; +import java.util.Map; import freemarker.template.SimpleHash; @@ -163,7 +163,7 @@ public class AbstractModule { * @return Id des eingef?gten Objekts * @exception ModuleException */ - public String add (HashMap theValues) throws ModuleException { + public String add (Map theValues) throws ModuleException { try { Entity theEntity = (Entity)theStorage.getEntityClass().newInstance(); theEntity.setStorage(theStorage); @@ -180,7 +180,7 @@ public class AbstractModule { * @return Id des eingef?gten Objekts * @exception ModuleException */ - public String set (HashMap theValues) throws ModuleException { + public String set (Map theValues) throws ModuleException { try { Entity theEntity = theStorage.selectById((String)theValues.get("id")); if (theEntity == null) diff --git a/source/mir/servlet/ServletModule.java b/source/mir/servlet/ServletModule.java index eb95f617..3d67860d 100755 --- a/source/mir/servlet/ServletModule.java +++ b/source/mir/servlet/ServletModule.java @@ -34,6 +34,7 @@ package mir.servlet; import java.io.IOException; import java.io.PrintWriter; import java.util.List; +import java.util.Map; import java.util.HashMap; import java.util.Locale; @@ -216,7 +217,7 @@ public abstract class ServletModule { public void insert(HttpServletRequest req, HttpServletResponse res) throws ServletModuleException, ServletModuleUserException { try { - HashMap withValues = getIntersectingValues(req, mainModule.getStorageObject()); + Map withValues = getIntersectingValues(req, mainModule.getStorageObject()); logger.debug("--trying to add..."); String id = mainModule.add(withValues); logger.debug("--trying to deliver..." + id); @@ -310,7 +311,7 @@ public abstract class ServletModule { throws ServletModuleException { try { String idParam = req.getParameter("id"); - HashMap withValues = getIntersectingValues(req, mainModule.getStorageObject()); + Map withValues = getIntersectingValues(req, mainModule.getStorageObject()); String id = mainModule.set(withValues); String whereParam = req.getParameter("where"); @@ -446,12 +447,12 @@ public abstract class ServletModule { } /** - * Holt die Felder aus der Metadatenfelderliste des StorageObjects, die - * im HttpRequest vorkommen und liefert sie als HashMap zurueck + * Gets the fields from a httprequest and matches them with the metadata from + * the storage object. Returns the keys that match, with their values. * - * @return HashMap mit den Werten + * @return Map with the values */ - public HashMap getIntersectingValues(HttpServletRequest req, StorageObject theStorage) + public Map getIntersectingValues(HttpServletRequest req, StorageObject theStorage) throws ServletModuleException { try { @@ -471,7 +472,7 @@ public abstract class ServletModule { theFieldList = theStorage.getFields(); - HashMap withValues = new HashMap(); + Map withValues = new HashMap(); String aField, aValue; for (int i = 0; i < theFieldList.size(); i++) { diff --git a/source/mir/storage/Database.java b/source/mir/storage/Database.java index a22714cb..2482ba1c 100755 --- a/source/mir/storage/Database.java +++ b/source/mir/storage/Database.java @@ -49,6 +49,7 @@ import java.util.List; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.HashMap; +import java.util.Map; import com.codestudio.util.SQLManager; @@ -85,7 +86,7 @@ import mir.util.JDBCStringRoutines; * Treiber, Host, User und Passwort, ueber den der Zugriff auf die * Datenbank erfolgt. * - * @version $Id: Database.java,v 1.34 2003/02/23 05:00:12 zapata Exp $ + * @version $Id: Database.java,v 1.35 2003/03/04 22:00:52 zapata Exp $ * @author rk * */ @@ -695,7 +696,7 @@ public class Database implements StorageObject { private Entity makeEntityFromResultSet(ResultSet rs) throws StorageObjectFailure { /** @todo OS: get Pkey from ResultSet and consult ObjectStore */ - HashMap theResultHash = new HashMap(); + Map theResultHash = new HashMap(); String theResult = null; int theType; Entity returnEntity = null; diff --git a/source/mir/storage/store/ObjectStore.java b/source/mir/storage/store/ObjectStore.java index b50f0a88..e117bcf5 100755 --- a/source/mir/storage/store/ObjectStore.java +++ b/source/mir/storage/store/ObjectStore.java @@ -63,6 +63,7 @@ package mir.storage.store; import java.io.BufferedInputStream; import java.io.FileInputStream; +import java.util.Map; import java.util.HashMap; import java.util.Iterator; import java.util.MissingResourceException; @@ -76,7 +77,7 @@ import mir.log.LoggerWrapper; public class ObjectStore { private final static ObjectStore INSTANCE = new ObjectStore(); - private final static HashMap containerMap = new HashMap(); // StoreContainerType/StoreContainer + private final static Map containerMap = new HashMap(); // StoreContainerType/StoreContainer private static long storeHit = 0, storeMiss = 0; private Properties ostoreConf; private LoggerWrapper logger; diff --git a/source/mir/storage/store/StoreContainerType.java b/source/mir/storage/store/StoreContainerType.java index fe8b1491..dde90a69 100755 --- a/source/mir/storage/store/StoreContainerType.java +++ b/source/mir/storage/store/StoreContainerType.java @@ -47,6 +47,7 @@ package mir.storage.store; */ import java.util.HashMap; +import java.util.Map; import mir.misc.StringUtil; @@ -57,7 +58,7 @@ public class StoreContainerType { public final static int STOC_TYPE_ENTITYLIST = 1; public final static int STOC_TYPE_MAX = STOC_TYPE_ENTITYLIST; - private static HashMap[] uniqueTypes = new HashMap[STOC_TYPE_MAX + 1]; + private static Map[] uniqueTypes = new HashMap[STOC_TYPE_MAX + 1]; private static ObjectStore o_store = ObjectStore.getInstance(); private Class stocClass = null; private int stocType = STOC_TYPE_UNKNOWN; @@ -77,7 +78,7 @@ public class StoreContainerType { public static StoreContainerType valueOf(Class stoc_class, int stoc_type) { StoreContainerType returnStocType = null; if (stoc_type >= 0 && stoc_type <= STOC_TYPE_MAX) { - HashMap current = uniqueTypes[stoc_type]; + Map current = uniqueTypes[stoc_type]; if (current.containsKey(stoc_class)) returnStocType = (StoreContainerType) current.get(stoc_class); else { diff --git a/source/mircoders/entity/EntityAudio.java b/source/mircoders/entity/EntityAudio.java index 6de0502c..10ddfa01 100755 --- a/source/mircoders/entity/EntityAudio.java +++ b/source/mircoders/entity/EntityAudio.java @@ -32,7 +32,7 @@ package mircoders.entity; import java.sql.SQLException; -import java.util.HashMap; +import java.util.Map; import mir.storage.StorageObject; import mir.storage.StorageObjectFailure; @@ -41,7 +41,7 @@ import mir.storage.StorageObjectFailure; * This class handles storage of audio data and meta data * * @author mh - * @version $Id: EntityAudio.java,v 1.6 2003/02/23 05:00:13 zapata Exp $ + * @version $Id: EntityAudio.java,v 1.7 2003/03/04 22:00:52 zapata Exp $ */ @@ -66,7 +66,7 @@ public class EntityAudio extends EntityUploadedMedia } } - public void setValues(HashMap theStringValues) { + public void setValues(Map theStringValues) { if (theStringValues != null) { if (!theStringValues.containsKey("is_published")) theStringValues.put("is_published", "0"); diff --git a/source/mircoders/entity/EntityComment.java b/source/mircoders/entity/EntityComment.java index 0a8659b8..cfec128b 100755 --- a/source/mircoders/entity/EntityComment.java +++ b/source/mircoders/entity/EntityComment.java @@ -31,7 +31,7 @@ package mircoders.entity; -import java.util.HashMap; +import java.util.Map; import mir.entity.Entity; import mir.storage.StorageObject; @@ -39,8 +39,8 @@ import mir.storage.StorageObject; /** * This class maps one line of the comment-table to a java-object. * - * @author $Author: idfx $ - * @version $Revision: 1.13 $ $Date: 2003/01/25 17:50:34 $ + * @author $Author: zapata $ + * @version $Revision: 1.14 $ $Date: 2003/03/04 22:00:52 $ */ @@ -61,7 +61,7 @@ public class EntityComment extends Entity /** * overridden method setValues to patch creator_main_url */ - public void setValues(HashMap theStringValues) + public void setValues(Map theStringValues) { if (theStringValues != null) { if (!theStringValues.containsKey("is_published")) { diff --git a/source/mircoders/entity/EntityContent.java b/source/mircoders/entity/EntityContent.java index 87f63979..5c4f6da4 100755 --- a/source/mircoders/entity/EntityContent.java +++ b/source/mircoders/entity/EntityContent.java @@ -34,6 +34,7 @@ package mircoders.entity; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; +import java.util.Map; import java.util.HashMap; import freemarker.template.SimpleScalar; @@ -54,7 +55,7 @@ import mircoders.storage.DatabaseContentToTopics; * this class implements mapping of one line of the database table content * to a java object * - * @version $Id: EntityContent.java,v 1.15 2003/02/23 05:00:13 zapata Exp $ + * @version $Id: EntityContent.java,v 1.16 2003/03/04 22:00:53 zapata Exp $ * @author mir-coders group * */ @@ -71,7 +72,7 @@ public class EntityContent extends Entity //this should always be transient i.e it can never be stored in the db //or ObjectStore. (so the ObjectStore should only be caching what comes //directly out of the DB. @todo confirm this with rk. -mh - HashMap _entCache = new HashMap(); + Map _entCache = new HashMap(); Boolean _hasMedia = null; // constructors @@ -260,7 +261,7 @@ public class EntityContent extends Entity /** * overridden method setValues to patch creator_main_url */ - public void setValues(HashMap theStringValues) { + public void setValues(Map theStringValues) { if (theStringValues != null) { if (theStringValues.containsKey("creator_main_url")){ if (((String)theStringValues.get("creator_main_url")).equalsIgnoreCase("http://")){ diff --git a/source/mircoders/entity/EntityOther.java b/source/mircoders/entity/EntityOther.java index ba293d0c..0ec4ad08 100755 --- a/source/mircoders/entity/EntityOther.java +++ b/source/mircoders/entity/EntityOther.java @@ -1,78 +1,78 @@ -/* - * 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 the com.oreilly.servlet library, 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.entity; - -import java.sql.SQLException; -import java.util.HashMap; - -import mir.storage.StorageObject; -import mir.storage.StorageObjectFailure; - -/** - * This class handles storage of other data and meta data - * - * @author mh - * @version 11.11.2000 - */ - - -public class EntityOther extends EntityUploadedMedia -{ - public EntityOther() - { - super(); - } - - public EntityOther(StorageObject theStorage) { - this(); - setStorage(theStorage); - } - - public void update() throws StorageObjectFailure { - super.update(); - try { - theStorageObject.executeUpdate("update content set is_produced='0' where to_media="+getId()); - } catch (SQLException e) { - throwStorageObjectFailure(e, "EntityOther :: update :: failed!! "); - } - } - - public void setValues(HashMap theStringValues) - { - if (theStringValues != null) { - if (!theStringValues.containsKey("is_published")) - theStringValues.put("is_published","0"); - } - super.setValues(theStringValues); - } - -} +/* + * 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 the com.oreilly.servlet library, 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.entity; + +import java.sql.SQLException; +import java.util.Map; + +import mir.storage.StorageObject; +import mir.storage.StorageObjectFailure; + +/** + * This class handles storage of other data and meta data + * + * @author mh + * @version 11.11.2000 + */ + + +public class EntityOther extends EntityUploadedMedia +{ + public EntityOther() { + super(); + } + + public EntityOther(StorageObject theStorage) { + this(); + setStorage(theStorage); + } + + public void update() throws StorageObjectFailure { + super.update(); + try { + theStorageObject.executeUpdate( + "update content set is_produced='0' where to_media=" + getId()); + } + catch (SQLException e) { + throwStorageObjectFailure(e, "EntityOther :: update :: failed!! "); + } + } + + public void setValues(Map theStringValues) { + if (theStringValues != null) { + if (!theStringValues.containsKey("is_published")) + theStringValues.put("is_published", "0"); + } + super.setValues(theStringValues); + } + +} diff --git a/source/mircoders/entity/EntityUploadedMedia.java b/source/mircoders/entity/EntityUploadedMedia.java index 35da22b1..0ef98fb5 100755 --- a/source/mircoders/entity/EntityUploadedMedia.java +++ b/source/mircoders/entity/EntityUploadedMedia.java @@ -31,7 +31,7 @@ package mircoders.entity; -import java.util.HashMap; +import java.util.Map; import freemarker.template.SimpleList; import freemarker.template.SimpleScalar; @@ -53,7 +53,7 @@ import mircoders.storage.DatabaseUploadedMedia; /** * * @author mh, mir-coders group - * @version $Id: EntityUploadedMedia.java,v 1.20 2003/02/28 18:27:08 idfx Exp $ + * @version $Id: EntityUploadedMedia.java,v 1.21 2003/03/04 22:00:53 zapata Exp $ */ @@ -82,7 +82,7 @@ public class EntityUploadedMedia extends Entity { } } - public void setValues(HashMap theStringValues) { + public void setValues(Map theStringValues) { if (theStringValues != null) { if (!theStringValues.containsKey("is_published")) theStringValues.put("is_published", "0"); diff --git a/source/mircoders/entity/EntityVideo.java b/source/mircoders/entity/EntityVideo.java index c97b37ea..97cb75ae 100755 --- a/source/mircoders/entity/EntityVideo.java +++ b/source/mircoders/entity/EntityVideo.java @@ -32,7 +32,7 @@ package mircoders.entity; import java.sql.SQLException; -import java.util.HashMap; +import java.util.Map; import mir.storage.StorageObject; import mir.storage.StorageObjectFailure; @@ -73,7 +73,7 @@ public class EntityVideo extends EntityUploadedMedia } } - public void setValues(HashMap theStringValues) { + public void setValues(Map theStringValues) { if (theStringValues != null) { if (!theStringValues.containsKey("is_published")) theStringValues.put("is_published", "0"); diff --git a/source/mircoders/localizer/basic/MirBasicDataModelLocalizer.java b/source/mircoders/localizer/basic/MirBasicDataModelLocalizer.java index 8f246ceb..fe7b59e0 100755 --- a/source/mircoders/localizer/basic/MirBasicDataModelLocalizer.java +++ b/source/mircoders/localizer/basic/MirBasicDataModelLocalizer.java @@ -353,7 +353,7 @@ public class MirBasicDataModelLocalizer implements MirDataModelLocalizer { public Object getValue(EntityAdapter anEntityAdapter) { try { return anEntityAdapter.getRelation( - "exists (select * from content_x_media where content_id="+anEntityAdapter.get("id")+" and media_id=id)", + "is_published='t' and exists (select * from content_x_media where content_id="+anEntityAdapter.get("id")+" and media_id=id)", "id", definition); } diff --git a/source/mircoders/media/MediaRequest.java b/source/mircoders/media/MediaRequest.java index 2ae108b1..3142ca0a 100755 --- a/source/mircoders/media/MediaRequest.java +++ b/source/mircoders/media/MediaRequest.java @@ -32,7 +32,7 @@ package mircoders.media; import java.util.GregorianCalendar; -import java.util.HashMap; +import java.util.Map; import java.util.Iterator; import javax.servlet.ServletContext; @@ -64,7 +64,7 @@ import mircoders.storage.DatabaseMediaType; * appropriate media objects are set. * * @author mh - * @version $Id: MediaRequest.java,v 1.14 2003/02/28 18:27:08 idfx Exp $ + * @version $Id: MediaRequest.java,v 1.15 2003/03/04 22:00:53 zapata Exp $ * */ @@ -92,7 +92,7 @@ public class MediaRequest implements FileHandler * is_published parameter (from the upload form) is supplied. (for backwards * compatibility.) */ - public void setFile(FilePart filePart, int fileNum, HashMap mediaValues) + public void setFile(FilePart filePart, int fileNum, Map mediaValues) throws FileHandlerException, FileHandlerUserException { String mediaId=null; diff --git a/source/mircoders/module/ModuleComment.java b/source/mircoders/module/ModuleComment.java index c9a6e4aa..c57a920b 100755 --- a/source/mircoders/module/ModuleComment.java +++ b/source/mircoders/module/ModuleComment.java @@ -32,7 +32,7 @@ package mircoders.module; import java.io.PrintWriter; -import java.util.HashMap; +import java.util.Map; import mir.entity.Entity; import mir.log.LoggerToWriterAdapter; @@ -92,7 +92,7 @@ public class ModuleComment extends AbstractModule /** * setValues in the Entity and updates them on the StorageObject */ - public String set(HashMap theValues) throws ModuleException { + public String set(Map theValues) throws ModuleException { try { Entity theEntity = theStorage.selectById((String)theValues.get("id")); if (theEntity == null) diff --git a/source/mircoders/module/ModuleContent.java b/source/mircoders/module/ModuleContent.java index 0e5c305e..9c145256 100755 --- a/source/mircoders/module/ModuleContent.java +++ b/source/mircoders/module/ModuleContent.java @@ -31,7 +31,7 @@ package mircoders.module; -import java.util.HashMap; +import java.util.Map; import java.util.Iterator; import java.util.Set; import java.util.StringTokenizer; @@ -49,7 +49,7 @@ import mircoders.storage.DatabaseContentToMedia; /* * ContentObjekt - * - * @version $Id: ModuleContent.java,v 1.14 2003/01/25 17:50:35 idfx Exp $ + * @version $Id: ModuleContent.java,v 1.15 2003/03/04 22:00:53 zapata Exp $ * * @author RK, mir-coders * @@ -94,7 +94,7 @@ public class ModuleContent extends AbstractModule return returnList; } - public EntityList getContent(HashMap searchValues, boolean concat, int offset, EntityUsers user) + public EntityList getContent(Map searchValues, boolean concat, int offset, EntityUsers user) throws ModuleException { try { diff --git a/source/mircoders/module/ModuleTopics.java b/source/mircoders/module/ModuleTopics.java index 6629c4c0..2f30f64a 100755 --- a/source/mircoders/module/ModuleTopics.java +++ b/source/mircoders/module/ModuleTopics.java @@ -31,7 +31,7 @@ package mircoders.module; -import java.util.HashMap; +import java.util.Map; import freemarker.template.SimpleList; @@ -86,7 +86,7 @@ public class ModuleTopics extends AbstractModule { returnList = getByWhereClause("", "title", -1); } catch (Exception e) { - logger.warn("--getTopicsList: topics could not be fetched: " + e.getMessage()); + logger.warn("ModuleTopics.getTopicsList: topics could not be fetched: " + e.getMessage()); } return returnList; } @@ -98,22 +98,15 @@ public class ModuleTopics extends AbstractModule { * @return Id des eingef?gten Objekts * @exception ModuleException */ - public String set(HashMap theValues) throws ModuleException { + public String set(Map theValues) throws ModuleException { try { Entity theEntity = theStorage.selectById((String) theValues.get("id")); if (theEntity == null) { - throw new ModuleException("Kein Objekt mit id in Datenbank id: " + theValues.get("id")); + throw new ModuleException("No topic with id " + theValues.get("id") + " found"); } theEntity.setValues(theValues); - DatabaseContentToTopics db = DatabaseContentToTopics.getInstance(); - DatabaseContent dbc = DatabaseContent.getInstance(); - EntityList contentList = db.getContent((EntityTopics) theEntity); - if (contentList!=null) { - for (int i = 0; i < contentList.size(); i++) { - dbc.setUnproduced("id=" + ((EntityContent) contentList.elementAt(i)).getId()); - } - } theEntity.update(); + return theEntity.getId(); } catch (StorageObjectFailure e) { diff --git a/source/mircoders/producer/PDFPreFormattingProducerNode.java b/source/mircoders/producer/PDFPreFormattingProducerNode.java index 1ae82e34..7dd8d809 100755 --- a/source/mircoders/producer/PDFPreFormattingProducerNode.java +++ b/source/mircoders/producer/PDFPreFormattingProducerNode.java @@ -115,14 +115,14 @@ public class PDFPreFormattingProducerNode implements ProducerNode { theContent = StringUtil.convertNewline2Break(theContent); if (images == null){ - HashMap row = new HashMap(); + Map row = new HashMap(); row.put("text",theContent); row.put("hasImage","0"); brokenUpContent.add(row); } if (images != null){ //need to add checks for out of content! - HashMap row0 = new HashMap(); + Map row0 = new HashMap(); if (numCharsInAnImagelessRow>(theContent).length()){ row0.put("text",theContent); outOfText = true; @@ -137,8 +137,8 @@ public class PDFPreFormattingProducerNode implements ProducerNode { brokenUpContent.add(row0); aLogger.debug("CP1 is "+ currentPosition); while(images.hasNext()){ - HashMap row1 = new HashMap(); - HashMap row2 = new HashMap(); + Map row1 = new HashMap(); + Map row2 = new HashMap(); EntityImages currentImage=(EntityImages) images.next(); float img_width=(new Float(currentImage.getValue("img_width"))).floatValue(); float img_height=(new Float(currentImage.getValue("img_height"))).floatValue(); @@ -198,7 +198,7 @@ public class PDFPreFormattingProducerNode implements ProducerNode { aLogger.debug("CP3 is "+ currentPosition); } - HashMap row3 = new HashMap(); + Map row3 = new HashMap(); if (! outOfText){ row3.put("text",theContent.substring(currentPosition)); row3.put("hasImage","0"); diff --git a/source/mircoders/servlet/ServletModuleContent.java b/source/mircoders/servlet/ServletModuleContent.java index c44df637..478376af 100755 --- a/source/mircoders/servlet/ServletModuleContent.java +++ b/source/mircoders/servlet/ServletModuleContent.java @@ -33,6 +33,7 @@ package mircoders.servlet; import java.io.IOException; import java.util.GregorianCalendar; +import java.util.Map; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -72,7 +73,7 @@ import freemarker.template.SimpleHash; * ServletModuleContent - * deliver html for the article admin form. * - * @version $Id: ServletModuleContent.java,v 1.37 2003/03/04 02:04:35 zapata Exp $ + * @version $Id: ServletModuleContent.java,v 1.38 2003/03/04 22:00:54 zapata Exp $ * @author rk, mir-coders * */ @@ -174,7 +175,7 @@ public class ServletModuleContent extends ServletModule //theLog.printDebugInfo(":: content :: trying to insert"); try { EntityUsers user = _getUser(req); - HashMap withValues = getIntersectingValues(req, DatabaseContent.getInstance()); + Map withValues = getIntersectingValues(req, DatabaseContent.getInstance()); String now = StringUtil.date2webdbDate(new GregorianCalendar()); withValues.put("date", now); @@ -320,7 +321,7 @@ public class ServletModuleContent extends ServletModule String idParam = aRequest.getParameter("id"); if (idParam == null) throw new ServletModuleException("Wrong call: (id) is missing"); - HashMap withValues = getIntersectingValues(aRequest, DatabaseContent.getInstance()); + Map withValues = getIntersectingValues(aRequest, DatabaseContent.getInstance()); String[] topic_id = aRequest.getParameterValues("to_topic"); String content_id = aRequest.getParameter("id"); @@ -353,7 +354,7 @@ public class ServletModuleContent extends ServletModule * if the "id" parameter is null, it means show an empty form to add a new * article. */ - private void _showObject(String id, HttpServletRequest aRequest, HttpServletResponse aResponse) + public void _showObject(String id, HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletModuleException { try { diff --git a/source/mircoders/servlet/ServletModuleOpenIndy.java b/source/mircoders/servlet/ServletModuleOpenIndy.java index 0828b22b..e720bb90 100755 --- a/source/mircoders/servlet/ServletModuleOpenIndy.java +++ b/source/mircoders/servlet/ServletModuleOpenIndy.java @@ -42,6 +42,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Enumeration; import java.util.GregorianCalendar; +import java.util.Map; import java.util.HashMap; import java.util.Iterator; import java.util.ListIterator; @@ -120,7 +121,7 @@ import freemarker.template.TemplateModelRoot; * open-postings to the newswire * * @author mir-coders group - * @version $Id: ServletModuleOpenIndy.java,v 1.60 2003/02/28 18:27:08 idfx Exp $ + * @version $Id: ServletModuleOpenIndy.java,v 1.61 2003/03/04 22:00:54 zapata Exp $ * */ @@ -226,7 +227,7 @@ public class ServletModuleOpenIndy extends ServletModule { // ok, collecting data from form try { - HashMap withValues = getIntersectingValues(req, DatabaseComment.getInstance()); + Map withValues = getIntersectingValues(req, DatabaseComment.getInstance()); //no html in comments(for now) for (Iterator i=withValues.keySet().iterator(); i.hasNext(); ){ @@ -366,7 +367,7 @@ public class ServletModuleOpenIndy extends ServletModule throw new ServletModuleUserException(e.getMessage()); } - HashMap withValues = mp.getParameters(); + Map withValues = mp.getParameters(); //checking the onetimepasswd if(passwdProtection.equals("yes")){ @@ -755,7 +756,7 @@ public class ServletModuleOpenIndy extends ServletModule } else{ // then we'll sort by date! - HashMap dateToPosition = new HashMap(end,1.0F); //we know how big it will be + Map dateToPosition = new HashMap(end,1.0F); //we know how big it will be for(int i = start; i < end; i++) { String creationDate=(hits.doc(i)).get("creationDate"); // do a little dance in case two contents created at the same second! diff --git a/source/mircoders/servlet/ServletModuleUploadedMedia.java b/source/mircoders/servlet/ServletModuleUploadedMedia.java index ed4549d0..7d206473 100755 --- a/source/mircoders/servlet/ServletModuleUploadedMedia.java +++ b/source/mircoders/servlet/ServletModuleUploadedMedia.java @@ -1,389 +1,420 @@ -/* - * 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 the com.oreilly.servlet library, 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.servlet; - -import java.io.IOException; -import java.io.InputStream; -import java.net.URLEncoder; -import java.util.HashMap; - -import javax.servlet.ServletContext; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import mir.config.MirPropertiesConfiguration; -import mir.config.MirPropertiesConfiguration.PropertiesConfigExc; -import mir.entity.Entity; -import mir.entity.EntityList; -import mir.log.LoggerWrapper; -import mir.media.MediaHelper; -import mir.media.MirMedia; -import mir.misc.FileHandler; -import mir.misc.FileHandlerException; -import mir.misc.FileHandlerUserException; -import mir.misc.WebdbMultipartRequest; -import mir.module.ModuleException; -import mir.servlet.ServletModule; -import mir.servlet.ServletModuleException; -import mir.servlet.ServletModuleUserException; -import mir.storage.StorageObjectFailure; -import mircoders.entity.EntityUploadedMedia; -import mircoders.entity.EntityUsers; -import mircoders.media.MediaRequest; -import mircoders.storage.DatabaseMediafolder; -import freemarker.template.SimpleHash; -import freemarker.template.SimpleList; - -/* - * ServletModuleBilder - - * liefert HTML fuer Bilder - * - * @version $Id: ServletModuleUploadedMedia.java,v 1.16 2003/02/23 05:00:15 zapata Exp $ - * @author RK, the mir-coders group - */ - -public abstract class ServletModuleUploadedMedia - extends mir.servlet.ServletModule { - - //private static DatabaseRights dbRights; - - public static ServletModule getInstance() { - return null; - } - - public ServletModuleUploadedMedia() { - super(); - logger = new LoggerWrapper("ServletModule.UploadedMedia"); - } - - public void insert(HttpServletRequest req, HttpServletResponse res) - throws ServletModuleException, ServletModuleUserException { - try { - EntityUsers user = _getUser(req); - MediaRequest mediaReq = new MediaRequest(user.getId(), false); - WebdbMultipartRequest mp = new WebdbMultipartRequest(req, (FileHandler)mediaReq); - EntityList mediaList = mediaReq.getEntityList(); - - SimpleHash mergeData = new SimpleHash(); - SimpleHash popups = new SimpleHash(); - mergeData.put("contentlist", mediaList); - if (mediaList.getOrder() != null) { - mergeData.put("order", mediaList.getOrder()); - mergeData.put("order_encoded", URLEncoder.encode(mediaList.getOrder())); - } - mergeData.put("count", (new Integer(mediaList.getCount())).toString()); - mergeData.put("from", (new Integer(mediaList.getFrom())).toString()); - mergeData.put("to", (new Integer(mediaList.getTo())).toString()); - if (mediaList.hasNextBatch()) - mergeData.put("next", (new Integer(mediaList.getNextBatch())).toString()); - if (mediaList.hasPrevBatch()) - mergeData.put("prev", (new Integer(mediaList.getPrevBatch())).toString()); - //fetch the popups - popups.put("mediafolderPopupData", DatabaseMediafolder.getInstance().getPopupData()); - // raus damit - deliver(req, res, mergeData, popups, templateListString); - } catch (FileHandlerUserException e) { - logger.error("ServletModuleUploadedMedia.insert: " + e.getMessage()); - throw new ServletModuleUserException(e.getMessage()); - } catch (FileHandlerException e) { - throw new ServletModuleException( - "upload -- media handling exception " + e.toString()); - } catch (StorageObjectFailure e) { - throw new ServletModuleException("upload -- storageobjectexception " - + e.toString()); - } catch (IOException e) { - throw new ServletModuleException("upload -- ioexception " + e.toString()); - } catch (PropertiesConfigExc e) { - throw new ServletModuleException("upload -- configexception " + e.toString()); - } - } - - public void update(HttpServletRequest req, HttpServletResponse res) throws ServletModuleException { - - try { - EntityUsers user = _getUser(req); - WebdbMultipartRequest mp = new WebdbMultipartRequest(req, null); - HashMap parameters = mp.getParameters(); - - parameters.put("to_publisher", user.getId()); - parameters.put("is_produced", "0"); - if (!parameters.containsKey("is_published")) - parameters.put("is_published", "0"); - - String id = mainModule.set(parameters); - logger.debug("update: media ID = " + id); - _edit(id, req, res); - } - catch (IOException e) { - throw new ServletModuleException("upload -- ioexception " + e.toString()); - } - catch (ModuleException e) { - throw new ServletModuleException("upload -- moduleexception " + e.toString()); - } - catch (Exception e) { - throw new ServletModuleException("upload -- exception " + e.toString()); - } - - } - - - public void list(HttpServletRequest req, HttpServletResponse res) - throws ServletModuleException { - // Parameter auswerten - SimpleHash mergeData = new SimpleHash(); - SimpleHash popups = new SimpleHash(); - - String query_text = req.getParameter("query_text"); - mergeData.put("query_text", query_text); - if (query_text != null) mergeData.put("query_text_encoded", URLEncoder.encode(query_text)); - String query_field = req.getParameter("query_field"); - mergeData.put("query_field", query_field); - String query_is_published = req.getParameter("query_is_published"); - mergeData.put("query_is_published", query_is_published); - String query_media_folder = req.getParameter("query_media_folder"); - mergeData.put("query_media_folder", query_media_folder); - String offset = req.getParameter("offset"); - if (offset == null || offset.equals("")) offset = "0"; - mergeData.put("offset", offset); - - String order = req.getParameter("order"); - if (order == null || order.equals("")) order = "webdb_lastchange desc"; - - // if in connection mode to content - String cid = req.getParameter("cid"); - mergeData.put("cid", cid); - - - // sql basteln - String whereClause = ""; - boolean isFirst = true; - if (query_text != null && !query_text.equalsIgnoreCase("")) { - whereClause += "lower(" + query_field + ") like lower('%" + query_text + "%')"; - isFirst = false; - } - if (query_is_published != null && !query_is_published.equals("")) { - if (isFirst == false) whereClause += " and "; - whereClause += "is_published='" + query_is_published + "'"; - isFirst = false; - } - if (query_media_folder != null && !query_media_folder.equals("")) { - if (isFirst == false) whereClause += " and "; - whereClause += "to_media_folder='" + query_media_folder + "'"; - } - //theLog.printDebugInfo("sql-whereclause: " + whereClause + " order: " + order + " offset: " + offset); - - // fetch and deliver - try { - if (query_text != null || query_is_published != null || query_media_folder != null) { - EntityList theList = mainModule.getByWhereClause(whereClause, order, (new Integer(offset)).intValue(), 10); - if (theList != null) { - mergeData.put("contentlist", theList); - if (theList.getOrder() != null) { - mergeData.put("order", theList.getOrder()); - mergeData.put("order_encoded", URLEncoder.encode(theList.getOrder())); - } - mergeData.put("count", (new Integer(theList.getCount())).toString()); - mergeData.put("from", (new Integer(theList.getFrom())).toString()); - mergeData.put("to", (new Integer(theList.getTo())).toString()); - if (theList.hasNextBatch()) - mergeData.put("next", (new Integer(theList.getNextBatch())).toString()); - if (theList.hasPrevBatch()) - mergeData.put("prev", (new Integer(theList.getPrevBatch())).toString()); - } - } - popups.put("mediafolderPopupData", DatabaseMediafolder.getInstance().getPopupData()); - - deliver(req, res, mergeData, popups, templateListString); - } - catch (ModuleException e) { - throw new ServletModuleException(e.toString()); - } - catch (Exception e) { - throw new ServletModuleException(e.toString()); - } - } - - - public void add(HttpServletRequest req, HttpServletResponse res) - throws ServletModuleException { - try { - SimpleHash mergeData = new SimpleHash(); - mergeData.put("new", "1"); - SimpleHash popups = new SimpleHash(); - popups.put("mediafolderPopupData", DatabaseMediafolder.getInstance().getPopupData()); - String maxMedia = MirPropertiesConfiguration.instance().getString("ServletModule.OpenIndy.MaxMediaUploadItems"); - String numOfMedia = req.getParameter("medianum"); - if(numOfMedia==null||numOfMedia.equals("")){ - numOfMedia="1"; - } else if(Integer.parseInt(numOfMedia) > Integer.parseInt(maxMedia)) { - numOfMedia = maxMedia; - } - - int mediaNum = Integer.parseInt(numOfMedia); - SimpleList mediaFields = new SimpleList(); - for(int i =0; i Integer.parseInt(maxMedia)) { + numOfMedia = maxMedia; + } + + int mediaNum = Integer.parseInt(numOfMedia); + SimpleList mediaFields = new SimpleList(); + for(int i =0; i
+ + + @@ -284,7 +285,8 @@ ${lang("content.audio")}: @@ -304,7 +306,8 @@ ${lang("content.video")}: @@ -323,7 +326,8 @@ ${lang("content.other")}: diff --git a/templates/admin/image.template b/templates/admin/image.template index 1e1baf6a..efc0d0ae 100755 --- a/templates/admin/image.template +++ b/templates/admin/image.template @@ -1,162 +1,173 @@ - - ${config["Mir.Name"]} | ${lang("image.htmltitle")} - - - - - - - - - - - -
@@ -30,6 +33,9 @@ function openWin(url) {
+ + + diff --git a/templates/admin/content.template b/templates/admin/content.template index 78c94945..7921f699 100755 --- a/templates/admin/content.template +++ b/templates/admin/content.template @@ -264,7 +264,8 @@ ${lang("content.images")}:
- ${lang("content.addimage")} + ${lang("content.addimage")} | + ${lang("content.uploadimage")}
- ${lang("content.addaudio")} + ${lang("content.addaudio")} | + ${lang("content.uploadaudio")}
- ${lang("content.addvideo")} + ${lang("content.addvideo")} | + ${lang("content.uploadvideo")}
- ${lang("content.addother")} + ${lang("content.addother")} | + ${lang("content.uploadother")}
- - - - -
- - ${lang("media.nr_of_media")}
-
-
-   -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - ${lang("media.created")}: ${data.webdb_create} / ${lang("media.changed")} ${data.webdb_lastchange}
- ${lang("media.published")}: ${data.publish_date} / ${data.publish_server}${data.publish_path}
- ${lang("media.format")}: ${data.media_descr} / ${data.img_width}x${data.img_height} / ${data.imgformatHashdata[to_img_format]["name"]} / ${data.imglayoutHashdata[to_img_layout]["name"]} / ${data.imgcolorHashdata[to_img_color]["name"]}
- ${lang("media.size")}: ${data.human_readable_size}
- ${lang("media.rights")}: ${data.rightsHashdata[to_rights]["name"]}
- ${lang("media.type")}: ${data.imgtypeHashdata[to_img_type]["name"]}
-
-
- ${lang("media.mediafolder")}: - -
- ${lang("media.description")}:
- ${lang("media.date")}: -
- ${lang("media.location")}:
- ${lang("media.creator")}: - -
- ${lang("media.keywords")}:
- ${lang("media.comment")}:
- ${lang("media.source")}:
- ${lang("media.is_published")} checked> -
- - ${lang("media.title")}: - - -
-
-
- ${lang("media.title")}: - - -
- - - - ${lang("media.is_published")} checked> - - -
- - + + ${config["Mir.Name"]} | ${lang("image.htmltitle")} + + + + + + + + + + +
+ + + + + + + + +
+ + ${lang("media.nr_of_media")}
+
+
+   +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + ${lang("media.created")}: ${data.webdb_create} / ${lang("media.changed")} ${data.webdb_lastchange}
+ ${lang("media.published")}: ${data.publish_date} / ${data.publish_server}${data.publish_path}
+ ${lang("media.format")}: ${data.media_descr} / ${data.img_width}x${data.img_height} / ${data.imgformatHashdata[to_img_format]["name"]} / ${data.imglayoutHashdata[to_img_layout]["name"]} / ${data.imgcolorHashdata[to_img_color]["name"]}
+ ${lang("media.size")}: ${data.human_readable_size}
+ ${lang("media.rights")}: ${data.rightsHashdata[to_rights]["name"]}
+ ${lang("media.type")}: ${data.imgtypeHashdata[to_img_type]["name"]}
+
+
+ ${lang("media.mediafolder")}: + +
+ ${lang("media.description")}:
+ ${lang("media.date")}: +
+ ${lang("media.location")}:
+ ${lang("media.creator")}: + +
+ ${lang("media.keywords")}:
+ ${lang("media.comment")}:
+ ${lang("media.source")}:
+ ${lang("media.is_published")} checked> +
+ + ${lang("media.title")}: + + + +
+
+
+ ${lang("media.title")}: + + +
+ + + + + ${lang("media.is_published")} checked> + + + +
+ + + diff --git a/templates/admin/media.template b/templates/admin/media.template index 987998d2..d6ecab9f 100755 --- a/templates/admin/media.template +++ b/templates/admin/media.template @@ -15,6 +15,9 @@ function openWin(url) {
+ + +
@@ -30,6 +33,9 @@ function openWin(url) {
+ + + diff --git a/templates/admin/video.template b/templates/admin/video.template index f89994a3..45f12d56 100755 --- a/templates/admin/video.template +++ b/templates/admin/video.template @@ -15,6 +15,9 @@ function openWin(url) { + + +
@@ -30,6 +33,9 @@ function openWin(url) {
+ + +