[ZendTo] Some little bugs & suggestions

Sergio Rabellino rabellino at di.unito.it
Mon Aug 9 10:52:00 BST 2010


Dear jules,
 i've found these ??bugs??:

lib/NSSDropoff.php: line 1343  $smarty->assign('fileCount',   
$readFileCount);
readFileCount does not exists anywhere: it's a duplicate of 
realFilecount ??? line to be removed

lib/NSSDropoff.php: line 1343  while ( $i < $fileCount ) {
I believe it's correct use $i strictly < of $fileCount; this potential 
error is repeated along the code in 1193/1251

www/Verify.php: line 55   if ($resp->is_valid && ( $theVerify = new 
Verify($theDropbox) )) {
The logical AND is && and must be used when almost one of the ops is not 
an integer.

www/Verify.php: line 122  $theDropbox->writeToLog("Public 
key=".$reCaptchaPublicKey);
useless log line: who care of it ?

And two suggestion: the site policy could be more clear if present in 
every page.
I've added in NSSDropoff below line 744 these 3
>      $smarty->assign('maxBytesForFile', 
> NSSFormattedMemSize($this->_maxBytesForFile));
>      $smarty->assign('maxBytesForDropoff', 
> NSSFormattedMemSize($this->_maxBytesForDropoff));
>      $smarty->assign('retainDays', $this->_retainDays);

and added into header.tpl below line 53 as follow:
>   <tr>
>     <td id="prefs" align=right colspan=2>
>       <BR>MAX single attachment size: {$maxBytesForFile} &nbsp; &nbsp; 
> &nbsp;
>       <BR>MAX total  attachment size: {$maxBytesForDropoff} &nbsp; 
> &nbsp; &nbsp;
>       <BR>Attachment Retain time: {$retainDays} &nbsp; &nbsp; &nbsp;
>     </td>
>    </tr>
So in every page is printed-out the site policy (max bytes .. and retain 
time).

Another change is into the single dropoff view, where is printed-out the 
creation date, but i believe it's more important to know when the 
dropoff will expire.
So I changed the NSSDropoff.php adding below line 790:
  global $prefs;

and below line 852:

  $smarty->assign('expiration',strftime("%d %b 
%Y&nbsp;&nbsp;%r",timeForDate($this->created())+3600*24*$prefs['numberOfDaysToRetain']));


and changed into the show_dropoff.tpl, lines from 72-75 to
>           <tr>
>             <td class="UD_form_lined" align="right"><b>Will Expire 
> On:</b></td>
>             <td><tt>{$expiration}</tt></td>
>           </tr>

Bye.
-- 
Ing. Sergio Rabellino

Università degli Studi di Torino
Dipartimento di Informatica
ICT Services Director
Tel +39-0116706701  Fax +39-011751603
C.so Svizzera , 185 - 10149 - Torino

<http://www.di.unito.it>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/zendto/attachments/20100809/781dfd23/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo.jpg
Type: image/jpeg
Size: 4570 bytes
Desc: not available
Url : http://mailman.ecs.soton.ac.uk/pipermail/zendto/attachments/20100809/781dfd23/attachment.jpg 


More information about the ZendTo mailing list