<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-15"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
On 09/08/2010 10:52, Sergio Rabellino wrote:
<blockquote cite="mid:4C5FCFC0.7010908@di.unito.it" type="cite">Dear
jules,<br>
 i've found these ??bugs??:<br>
  <br>
lib/NSSDropoff.php: line 1343  $smarty-&gt;assign('fileCount',  
$readFileCount);<br>
readFileCount does not exists anywhere: it's a duplicate of
realFilecount ??? line to be removed<br>
</blockquote>
Fixed.<br>
<blockquote cite="mid:4C5FCFC0.7010908@di.unito.it" type="cite"><br>
lib/NSSDropoff.php: line 1343  while ( $i &lt; $fileCount ) {<br>
I believe it's correct use $i strictly &lt; of $fileCount; this
potential error is repeated along the code in 1193/1251<br>
</blockquote>
No, because the $i starts at 1 and not 0.<br>
<blockquote cite="mid:4C5FCFC0.7010908@di.unito.it" type="cite"><br>
www/Verify.php: line 55   if ($resp-&gt;is_valid &amp;&amp; (
$theVerify = new Verify($theDropbox) )) {<br>
The logical AND is &amp;&amp; and must be used when almost one of the
ops is not an integer.<br>
</blockquote>
Fixed.<br>
<blockquote cite="mid:4C5FCFC0.7010908@di.unito.it" type="cite"><br>
www/Verify.php: line 122  $theDropbox-&gt;writeToLog("Public
key=".$reCaptchaPublicKey);<br>
useless log line: who care of it ?<br>
</blockquote>
Agreed :-)<br>
<blockquote cite="mid:4C5FCFC0.7010908@di.unito.it" type="cite"><br>
And two suggestion: the site policy could be more clear if present in
every page.<br>
I've added in NSSDropoff below line 744 these 3<br>
  <blockquote type="cite">     $smarty-&gt;assign('maxBytesForFile',
NSSFormattedMemSize($this-&gt;_maxBytesForFile));<br>
     $smarty-&gt;assign('maxBytesForDropoff',
NSSFormattedMemSize($this-&gt;_maxBytesForDropoff));<br>
     $smarty-&gt;assign('retainDays', $this-&gt;_retainDays);</blockquote>
</blockquote>
Added.<br>
<blockquote cite="mid:4C5FCFC0.7010908@di.unito.it" type="cite"><br>
and added into header.tpl below line 53 as follow:<br>
  <blockquote type="cite">  &lt;tr&gt;<br>
    &lt;td id="prefs" align=right colspan=2&gt;<br>
      &lt;BR&gt;MAX single attachment size: {$maxBytesForFile}
&amp;nbsp; &amp;nbsp; &amp;nbsp;<br>
      &lt;BR&gt;MAX total  attachment size: {$maxBytesForDropoff}
&amp;nbsp; &amp;nbsp; &amp;nbsp;<br>
      &lt;BR&gt;Attachment Retain time: {$retainDays} &amp;nbsp;
&amp;nbsp; &amp;nbsp;<br>
    &lt;/td&gt;<br>
   &lt;/tr&gt;<br>
  </blockquote>
So in every page is printed-out the site policy (max bytes .. and
retain time).<br>
</blockquote>
Disagree with you there. But the tpl files are all marked as config
files and so won't be overwritten by upgrades (if using the RPM). The
whole idea is that you can easily customise the appearance of the
website *completely* which is why I extracted the UI from the
application code in the first place. So please do feel free to make
changes to the website. I'll happily put in the application code
necessary for your website alterations to work, that's no problem.<br>
<blockquote cite="mid:4C5FCFC0.7010908@di.unito.it" type="cite"><br>
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.<br>
So I changed the NSSDropoff.php adding below line 790:<br>
  global $prefs;<br>
  <br>
and below line 852:<br>
  <br>
  $smarty-&gt;assign('expiration',strftime("%d %b
%Y&amp;nbsp;&amp;nbsp;%r",timeForDate($this-&gt;created())+3600*24*$prefs['numberOfDaysToRetain']));<br>
</blockquote>
I have added this instead:<br>
$smarty-&gt;assign('expiryDate',
timeForDate($this-&gt;created()+3600*24*$prefs['numberOfDaysToRetain']));<br>
You put user interface code (i.e. the strftime() call) into your
application code. Naughty!<br>
<blockquote cite="mid:4C5FCFC0.7010908@di.unito.it" type="cite"><br>
  <br>
and changed into the show_dropoff.tpl, lines from 72-75 to<br>
  <blockquote type="cite">          &lt;tr&gt;<br>
            &lt;td class="UD_form_lined" align="right"&gt;&lt;b&gt;Will
Expire On:&lt;/b&gt;&lt;/td&gt;<br>
            &lt;td&gt;&lt;tt&gt;{$expiration}&lt;/tt&gt;&lt;/td&gt;<br>
  </blockquote>
</blockquote>
Put this instead:<br>
{$expiryDate|date_format:"%d %b %Y&amp;nbsp;&amp;nbsp;%r"}<br>
<br>
I think other people may disagree with you about the expiry date being
more important than the createdDate. I would want to know that "they
were the files he sent me last Friday". So my comments about you
customising the website to your needs, as above, still stand.<br>
<br>
So that site customisers know the variable exists, I have added a row
containing it to the template but commented out the HTML.<br>
<br>
Thanks for your fixes and comments!<br>
<br>
Jules.<br>
<blockquote cite="mid:4C5FCFC0.7010908@di.unito.it" type="cite">
  <blockquote type="cite">          &lt;/tr&gt;<br>
  </blockquote>
  <br>
Bye.<br>
  <div class="moz-signature">-- <br>
  <center><span
 style="font-family: Verdana,sans-serif; font-weight: bold;">
Ing. Sergio Rabellino<br>
  </span>
  <br>
  <span style="font-family: Verdana,sans-serif;">
Universitą degli Studi di Torino<br>
Dipartimento di Informatica<br>
ICT Services Director<br>
Tel +39-0116706701 
Fax +39-011751603<br>
C.so Svizzera , 185 - 10149 - Torino<br>
  <br>
  <a moz-do-not-send="true" href="http://www.di.unito.it"
 alt="Dipartimento di Informatica"><img
 src="cid:part1.03070106.05050501@ZendTo.com" border="0"></a>
  </span></center>
  </div>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
ZendTo mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ZendTo@zendto.com">ZendTo@zendto.com</a>
<a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto">http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto</a>
  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">Jules

-- 
Julian Field MEng CITP CEng
<a class="moz-txt-link-abbreviated" href="http://www.ZendTo.com">www.ZendTo.com</a>

Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
Follow me at twitter.com/JulesFM
</pre>
</body>
</html>