cvs: docweb /include/rfc rfc.php /www/rfc rfc-vote-show.php
| From: | Vincent Gevers | Date: | Thu, 02 Sep 2004 17:39:43 +0000 |
| Subject: | cvs: docweb /include/rfc rfc.php /www/rfc rfc-vote-show.php | ||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-222@lists.php.net to get a copy of this message | ||
vincent Thu Sep 2 13:39:43 2004 EDT
Modified files:
/docweb/include/rfc rfc.php
/docweb/www/rfc rfc-vote-show.php
Log:
For some strange reason SQLite stores binary data when you try to add an
empty comment, sql DEFAULT didn't work for me.
Therefor I'm adding this 'hack' that makes it work fine
http://cvs.php.net/diff.php/docweb/include/rfc/rfc.php?r1=1.4&r2=1.5&ty=u
Index: docweb/include/rfc/rfc.php
diff -u docweb/include/rfc/rfc.php:1.4 docweb/include/rfc/rfc.php:1.5
--- docweb/include/rfc/rfc.php:1.4 Tue Aug 31 14:08:06 2004
+++ docweb/include/rfc/rfc.php Thu Sep 2 13:39:43 2004
@@ -24,7 +24,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.php,v 1.4 2004/08/31 18:08:06 vincent Exp $
+ * @version $Id: rfc.php,v 1.5 2004/09/02 17:39:43 vincent Exp $
*/
require_once 'DB.php';
@@ -1005,6 +1005,11 @@
if (empty($this->user_handle)) {
return PEAR::raiseError("Not initialized");
}
+
+ if (empty($this->comment)) {
+ $this->comment = '-';
+ }
+ // !!!
// $this->user_handle.time() is a hack, remove '.time()' after karma system
works
$sql = "INSERT INTO package_proposal_votes (pkg_prop_id, user_handle, value,
is_conditional, comment, reviews, timestamp)
VALUES (".$proposalId.",
http://cvs.php.net/diff.php/docweb/www/rfc/rfc-vote-show.php?r1=1.2&r2=1.3&ty=u
Index: docweb/www/rfc/rfc-vote-show.php
diff -u docweb/www/rfc/rfc-vote-show.php:1.2 docweb/www/rfc/rfc-vote-show.php:1.3
--- docweb/www/rfc/rfc-vote-show.php:1.2 Thu Aug 19 06:30:53 2004
+++ docweb/www/rfc/rfc-vote-show.php Thu Sep 2 13:39:43 2004
@@ -19,7 +19,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-vote-show.php,v 1.2 2004/08/19 10:30:53 vincent Exp $
+ * @version $Id: rfc-vote-show.php,v 1.3 2004/09/02 17:39:43 vincent Exp $
*/
/**
@@ -104,7 +104,7 @@
<?php
$vote->comment = trim($vote->comment);
- if ($vote->comment) {
+ if ($vote->comment != '-') {
echo nl2br(htmlentities($vote->comment));
} else {
echo ' ';