cvs: docweb /www/rfc rfc-proposal-edit.php

From: Date: Fri, 20 Aug 2004 15:29:42 +0000
Subject: cvs: docweb /www/rfc rfc-proposal-edit.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-192@lists.php.net to get a copy of this message
vincent Fri Aug 20 11:29:42 2004 EDT Modified files: /docweb/www/rfc rfc-proposal-edit.php Log: really limit to 100kb http://cvs.php.net/diff.php/docweb/www/rfc/rfc-proposal-edit.php?r1=1.3&r2=1.4&ty=u Index: docweb/www/rfc/rfc-proposal-edit.php diff -u docweb/www/rfc/rfc-proposal-edit.php:1.3 docweb/www/rfc/rfc-proposal-edit.php:1.4 --- docweb/www/rfc/rfc-proposal-edit.php:1.3 Thu Aug 19 08:29:32 2004 +++ docweb/www/rfc/rfc-proposal-edit.php Fri Aug 20 11:29:41 2004 @@ -22,7 +22,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: rfc-proposal-edit.php,v 1.3 2004/08/19 12:29:32 vincent Exp $ + * @version $Id: rfc-proposal-edit.php,v 1.4 2004/08/20 15:29:41 vincent Exp $ */ /** @@ -120,7 +120,8 @@ $form =& new HTML_QuickForm('proposal_edit', 'post', 'rfc-proposal-edit.php?id=' . $id); - +$form->setMaxFileSize(round((1024 * 1024)/10)); + $renderer =& $form->defaultRenderer(); $renderer->setElementTemplate(' <tr> @@ -178,6 +179,7 @@ if (!empty($proposal->pkg_filehash)) { $list = explode("|", htmlspecialchars(stripslashes($proposal->pkg_filehash))); + foreach ($list as $hash) { if ($hash == '') continue; @@ -186,7 +188,7 @@ $form->addElement('static', '', '', '<li><a href="?id='.$id.'&delete='.urlencode($hash).'">'.$file.'</a></li>'); -} + }; } @@ -282,7 +284,7 @@ if (!empty($_FILES['thefile']['name'])) { // this will need some more security checks - if ($_FILES['thefile']['size'] >= (1024 * 100)) { + if ($_FILES['thefile']['size'] >= round((1024 * 1024)/10)) { report_error('The files should NOT be bigger then 100kb, please upload it somewhere and link to it'); } else {

« previous php.doc.web (#192) next »