[evolvis-commits] r11378: added more messages to error when attaching a file↵
mirabilos at evolvis.org
mirabilos at evolvis.org
Thu Feb 24 18:08:55 CET 2011
Author: mirabilos
Date: 2011-02-24 18:08:55 +0100 (Thu, 24 Feb 2011)
New Revision: 11378
Modified:
trunk/gforge_base/evolvisforge-5.1/gforge/ChangeLog
trunk/gforge_base/evolvisforge-5.1/gforge/www/forum/include/AttachManager.class
trunk/gforge_base/evolvisforge-5.1/gforge/www/include/languages/Base.tab
Log:
added more messages to error when attaching a file
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/ChangeLog
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/ChangeLog 2011-02-24 17:08:53 UTC (rev 11377)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/ChangeLog 2011-02-24 17:08:55 UTC (rev 11378)
@@ -1,3 +1,8 @@
+2005-11-07 Daniel Perez <daniel at gforgegroup.com>
+ Forums :
+ Attachmanager : Added more descriptive error messages
+ Display : Fixed extra line break always displaying
+
2005-11-04 Daniel Perez <daniel at gforgegroup.com>
Patchs applied
[#1546] -> http://gforge.org/tracker/?func=detail&aid=1546&group_id=1&atid=106
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/forum/include/AttachManager.class
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/forum/include/AttachManager.class 2011-02-24 17:08:53 UTC (rev 11377)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/forum/include/AttachManager.class 2011-02-24 17:08:55 UTC (rev 11378)
@@ -235,6 +235,12 @@
{
// invalid extension
$this->messages[] = $Language->getText('forum_attachmngr','err_inv_ext');
+ foreach ($attachtypes as $attachtype) {
+ if ($attachtype['enabled']) {
+ $validexts .= $attachtype[0] . " ";
+ }
+ }
+ $this->messages[] = $Language->getText('forum_attachmngr','valid_ext_are',$validexts);
@unlink($attachment);
return false;
}
@@ -247,6 +253,7 @@
// too big
@unlink($attachment);
$this->messages[] = $Language->getText('forum_attachmngr','err_toobig');
+ $this->messages[] = $Language->getText('forum_attachmngr','maximum_size',$maxattachsize);
return false;
}
@@ -277,6 +284,7 @@
if (($max_attachwidth > 0 AND $imageinfo[0] > $max_attachwidth) OR ($max_attachheight > 0 AND $imageinfo[1] > $max_attachheight)) {
@unlink($attachment);
$this->messages[] = $Language->getText('forum_attachmngr','bad_dimension');
+ $this->messages[] = $Language->getText('forum_attachmngr','maximum_dimension',array($max_attachwidth,$max_attachheight));
return false;
}
if (!$imageinfo[2]) {
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/include/languages/Base.tab
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/include/languages/Base.tab 2011-02-24 17:08:53 UTC (rev 11377)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/include/languages/Base.tab 2011-02-24 17:08:55 UTC (rev 11378)
@@ -897,13 +897,16 @@
forum_forum_thread title View Thread
forum_attachmngr errnofile No file was provided
forum_attachmngr err_inv_ext Invalid Extension
+forum_attachmngr valid_ext_are Valid extensions are : $1
forum_attachmngr err_toobig File too big for that file type
+forum_attachmngr maximum_size Maximum size for this file type is $1 bytes
forum_attachmngr err_upload Error, problem with the attachment file uploaded into the server
forum_attachmngr uploadok File uploaded
forum_attachmngr updateok File Updated Successfully
forum_attachmngr upload_notok File not uploaded
forum_attachmngr err_msgid Couldn´t get message id
forum_attachmngr bad_dimension File not uploaded, dimensions too large
+forum_attachmngr maximum_dimension Maximum dimension for this file type is width $1 and height $2
forum_attachmngr not_image The file provided has the extension but isn´t an image type
forum_attach_download cannot_delete You cannot delete this attachment
forum_attach_download cannot_edit You cannot edit this attachment
More information about the evolvis-commits
mailing list