Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15322
Modified Files:
db_update-0.3-0.4.sql wfwcomment.php
Log Message:
Fixed linefeed characters of my st*** f**** windows editor. ;)
Index: db_update-0.3-0.4.sql
===================================================================
RCS file: /cvsroot/php-blog/serendipity/db_update-0.3-0.4.sql,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- db_update-0.3-0.4.sql 4 Jan 2004 03:09:39 -0000 1.2
+++ db_update-0.3-0.4.sql 18 Feb 2004 11:21:55 -0000 1.3
@@ -1,3 +1,3 @@
-ALTER TABLE serendipity_entries ADD COLUMN allow_comments ENUM('true', 'false') NOT NULL DEFAULT 'true' AFTER isdraft;
-/* ENUM('true', 'false') NOT NULL DEFAULT 'true'
- should be replaced by BOOLEAN NOT NULL TRUE for postgresql */
+ALTER TABLE serendipity_entries ADD COLUMN allow_comments ENUM('true', 'false') NOT NULL DEFAULT 'true' AFTER isdraft;
+/* ENUM('true', 'false') NOT NULL DEFAULT 'true'
+ should be replaced by BOOLEAN NOT NULL TRUE for postgresql */
Index: wfwcomment.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/wfwcomment.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- wfwcomment.php 17 Feb 2004 10:43:15 -0000 1.2
+++ wfwcomment.php 18 Feb 2004 11:21:55 -0000 1.3
@@ -4,37 +4,37 @@
session_start();
include_once('serendipity_config.inc.php');
-
-if ($_REQUEST['cid'] != '' && $HTTP_RAW_POST_DATA != '') {
- $comment = array();
-
- if (!preg_match('@<author[^>]*>(.*)</author[^>]*>@i', $HTTP_RAW_POST_DATA, $name)) {
- preg_match('@<dc:creator[^>]*>(.*)</dc:creator[^>]*>@i', $HTTP_RAW_POST_DATA, $name);
- }
-
- if (isset($name[1]) && !empty($name[1])) {
- if (preg_match('@^(.*)\((.*)\)@i', $name[1], $names)) {
- $comment['name'] = utf8_decode($names[2]);
- $comment['email'] = utf8_decode($names[1]);
- } else {
- $comment['name'] = utf8_decode($names[1]);
- }
- }
-
- if (preg_match('@<link[^>]*>(.*)</link[^>]*>@i', $HTTP_RAW_POST_DATA, $link)) {
- $comment['url'] = utf8_decode($link[1]);
- }
-
- if (preg_match('@<description[^>]*>(.*)</description[^>]*>@ims', $HTTP_RAW_POST_DATA, $description)) {
- if (preg_match('@^<!\[CDATA\[(.*)\]\]>@ims', $description[1], $cdata)) {
- $comment['comment'] = utf8_decode($cdata[1]);
- } else {
- $comment['comment'] = utf8_decode($description[1]);
- }
-
- if (!empty($comment['comment'])) {
- serendipity_saveComment($_REQUEST['cid'], $comment, 'NORMAL');
+
+if ($_REQUEST['cid'] != '' && $HTTP_RAW_POST_DATA != '') {
+ $comment = array();
+
+ if (!preg_match('@<author[^>]*>(.*)</author[^>]*>@i', $HTTP_RAW_POST_DATA, $name)) {
+ preg_match('@<dc:creator[^>]*>(.*)</dc:creator[^>]*>@i', $HTTP_RAW_POST_DATA, $name);
+ }
+
+ if (isset($name[1]) && !empty($name[1])) {
+ if (preg_match('@^(.*)\((.*)\)@i', $name[1], $names)) {
+ $comment['name'] = utf8_decode($names[2]);
+ $comment['email'] = utf8_decode($names[1]);
+ } else {
+ $comment['name'] = utf8_decode($names[1]);
}
- }
-}
+ }
+
+ if (preg_match('@<link[^>]*>(.*)</link[^>]*>@i', $HTTP_RAW_POST_DATA, $link)) {
+ $comment['url'] = utf8_decode($link[1]);
+ }
+
+ if (preg_match('@<description[^>]*>(.*)</description[^>]*>@ims', $HTTP_RAW_POST_DATA, $description)) {
+ if (preg_match('@^<!\[CDATA\[(.*)\]\]>@ims', $description[1], $cdata)) {
+ $comment['comment'] = utf8_decode($cdata[1]);
+ } else {
+ $comment['comment'] = utf8_decode($description[1]);
+ }
+
+ if (!empty($comment['comment'])) {
+ serendipity_saveComment($_REQUEST['cid'], $comment, 'NORMAL');
+ }
+ }
+}
?>
\ No newline at end of file
|