[pLog-svn] r3015 - in plog/trunk/class: action/admin database
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Sun Mar 5 15:52:14 GMT 2006
Author: oscar
Date: 2006-03-05 15:52:13 +0000 (Sun, 05 Mar 2006)
New Revision: 3015
Modified:
plog/trunk/class/action/admin/adminupdatepostaction.class.php
plog/trunk/class/database/db.class.php
Log:
just testing a fix as described here: http://bugs.lifetype.net/view.php?id=851
Modified: plog/trunk/class/action/admin/adminupdatepostaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminupdatepostaction.class.php 2006-03-04 11:07:26 UTC (rev 3014)
+++ plog/trunk/class/action/admin/adminupdatepostaction.class.php 2006-03-05 15:52:13 UTC (rev 3015)
@@ -87,10 +87,12 @@
return false;
}
- // if we got it, update some fields
- $post->setTopic( stripslashes($this->_postTopic));
- $postText = $this->_postText.POST_EXTENDED_TEXT_MODIFIER.$this->_postExtendedText;
- $post->setText( stripslashes($postText));
+ // if we got it, update some fields
+ $post->setTopic( stripslashes($this->_postTopic));
+ $postText = $this->_postText.POST_EXTENDED_TEXT_MODIFIER.$this->_postExtendedText;
+ $post->setText( stripslashes($postText));
+ $post->setTopic( $this->_postTopic );
+ $post->setText( $postText );
$post->setCategoryIds( $this->_postCategories );
$post->setStatus( $this->_postStatus );
$post->setDateObject( $this->_postTimestamp );
Modified: plog/trunk/class/database/db.class.php
===================================================================
--- plog/trunk/class/database/db.class.php 2006-03-04 11:07:26 UTC (rev 3014)
+++ plog/trunk/class/database/db.class.php 2006-03-05 15:52:13 UTC (rev 3015)
@@ -301,12 +301,17 @@
*/
function qstr($string) {
- if (get_magic_quotes_gpc()) {
- $string = stripslashes($string);
- }
+ if (get_magic_quotes_gpc()) {
+ $string = stripslashes($string);
+ //$string = stripslashes($string);
+ $string = str_replace('\\\\', '\\', $string);
+ $string = str_replace("\\'", "'", $string);
+ $string = str_replace('\\"', '"', $string);
+ }
+
+ $string = str_replace("\\", "\\\\", $string);
+ $string = str_replace("'", "''", $string);
- $string = str_replace("'", "''", $string);
-
return $string;
}
}
More information about the pLog-svn
mailing list