[Fusionforge-commits] r8589 - trunk/gforge/plugins/contribtracker/www

Roland Mas lolando at libremir.placard.fr.eu.org
Fri Dec 18 18:42:22 CET 2009


Author: lolando
Date: 2009-12-18 18:42:22 +0100 (Fri, 18 Dec 2009)
New Revision: 8589

Modified:
   trunk/gforge/plugins/contribtracker/www/global_admin.php
Log:
Increased max logo size to 50 kB

Modified: trunk/gforge/plugins/contribtracker/www/global_admin.php
===================================================================
--- trunk/gforge/plugins/contribtracker/www/global_admin.php	2009-12-18 17:42:12 UTC (rev 8588)
+++ trunk/gforge/plugins/contribtracker/www/global_admin.php	2009-12-18 17:42:22 UTC (rev 8589)
@@ -12,6 +12,8 @@
 require_once $gfwww.'admin/admin_utils.php';
 $plugin = plugin_get_object ('contribtracker') ;
 
+$max_logo_size = 50 ;		// In kibibytes
+
 session_require(array('group'=>'1','admin_flags'=>'A'));
 
 site_admin_header (array ('title' => _('Contribution tracker administration'))) ;
@@ -62,10 +64,10 @@
 	if ($arr['tmp_name'] == '') {
 		$logo = $default ;
 	} else {
-		if ($arr['size'] > 10240) {
+		if ($arr['size'] > 1024 * $max_logo_size) {
 			$logo = $default ;
 		} else {
-			$logo = file_get_contents ($arr['tmp_name'], 0, NULL, -1, 10240) ;
+			$logo = file_get_contents ($arr['tmp_name'], 0, NULL, -1, 1024 * $max_logo_size) ;
 		}
 		unlink ($arr['tmp_name']) ;
 	}
@@ -413,7 +415,7 @@
 			 <?php echo _('Actor email:') ?> <input type="text" name="actor_email" size="20" /><br />
 			 <?php echo _('Actor description:') ?><br />
 			 <textarea name="actor_desc" rows="20" cols="80"></textarea><br />
-			 <?php echo _('Actor logo (PNG, 10 kB max.):') ?> <input type="file" name="actor_logo" /><br />
+			 <?php printf (_('Actor logo (PNG, %d kB max):'), $max_logo_size) ?> <input type="file" name="actor_logo" /><br />
 			 <?php
 			 echo _('Legal structure:') ?>
 			 <select name="structure_id">
@@ -443,7 +445,7 @@
 			 <?php echo _('Actor email:') ?> <input type="text" name="actor_email" size="20" value="<?php echo htmlspecialchars ($actor->getEmail()) ?>" /><br />
 			 <?php echo _('Actor description:') ?><br />
 			 <textarea name="actor_desc" rows="20" cols="80"><?php echo htmlspecialchars ($actor->getDescription()) ?></textarea><br />
-			 <?php echo _('Actor logo (PNG, 10 kB max.):') ?> <input type="file" name="actor_logo" />
+			 <?php printf (_('Actor logo (PNG, %d kB max):'), $max_logo_size) ?> <input type="file" name="actor_logo" /><br />
 			 <?php
 			 if ($actor->getLogo() != '') {
 				 print '<img type="image/png" src="'.util_make_url ('/plugins/'.$plugin->name.'/actor_logo.php?actor_id='.$actor->getId ()).'" />' ;




More information about the Fusionforge-commits mailing list