[Svn] r2012 - trunk/roundcubemail/bin

trac at roundcube.net trac at roundcube.net
Sun Oct 26 15:58:57 CET 2008


Author: thomasb
Date: 2008-10-26 09:58:57 -0500 (Sun, 26 Oct 2008)
New Revision: 2012

Modified:
   trunk/roundcubemail/bin/quotaimg.php
Log:
Lets keep things simple. quotaimage does not use session stuff

Modified: trunk/roundcubemail/bin/quotaimg.php
===================================================================
--- trunk/roundcubemail/bin/quotaimg.php	2008-10-25 16:58:30 UTC (rev 2011)
+++ trunk/roundcubemail/bin/quotaimg.php	2008-10-26 14:58:57 UTC (rev 2012)
@@ -18,30 +18,11 @@
 
 */
 
-// define INSTALL_PATH since it's sort of custom from /bin/quotaimg.php
-define('INSTALL_PATH', str_replace('bin', '', dirname(__FILE__)));
+$used   = isset($_GET['u']) ? intval($_GET['u']) : '??';
+$quota  = isset($_GET['q']) ? intval($_GET['q']) : '??';
+$width  = empty($_GET['w']) ? 100 : min(300, intval($_GET['w']));
+$height = empty($_GET['h']) ? 14  : min(50,  intval($_GET['h']));
 
-// include environment
-require_once INSTALL_PATH . 'program/include/iniset.php';
-
-// init application and start session with requested task
-$RCMAIL = rcmail::get_instance();
-if (empty($RCMAIL->user->ID)) {
-    die('You are not logged in, there is no need you are allowed to render the quota image.');
-}
-
-$used   = ((isset($_GET['u']) && !empty($_GET['u'])) || $_GET['u']=='0')?(int)$_GET['u']:'??';
-$quota  = ((isset($_GET['q']) && !empty($_GET['q'])) || $_GET['q']=='0')?(int)$_GET['q']:'??';
-$width  = empty($_GET['w']) ? 100 : (int)$_GET['w'];
-$height = empty($_GET['h']) ? 14 : (int)$_GET['h'];
-
-// let's apply some sanity
-// @todo Maybe a config option?
-if ($width > 200 || $height > 50) {
-    $width = 100;
-    $height = 14;
-}
-
 /**
  * Quota display
  * 

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list