[pLog-svn] r2853 - plugins/trunk/atom/class/xml/atom
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Thu Jan 26 16:53:46 GMT 2006
Author: oscar
Date: 2006-01-26 16:53:45 +0000 (Thu, 26 Jan 2006)
New Revision: 2853
Modified:
plugins/trunk/atom/class/xml/atom/editservice.class.php
plugins/trunk/atom/class/xml/atom/wsseauthentication.class.php
Log:
fixed a couple of potential issues as per the comments in a thread in the forums (http://forums.lifetype.net/viewtopic.php?p=22623#22623)
Modified: plugins/trunk/atom/class/xml/atom/editservice.class.php
===================================================================
--- plugins/trunk/atom/class/xml/atom/editservice.class.php 2006-01-24 16:33:39 UTC (rev 2852)
+++ plugins/trunk/atom/class/xml/atom/editservice.class.php 2006-01-26 16:53:45 UTC (rev 2853)
@@ -108,6 +108,7 @@
$article->setTopic( $title );
$article->setText( $text );
+ $article->setDateObject($article->getDateObject());
if( !$articles->updateArticle( $article )) {
AtomLogger::Log( "There was an error updating $articleId!" );
Modified: plugins/trunk/atom/class/xml/atom/wsseauthentication.class.php
===================================================================
--- plugins/trunk/atom/class/xml/atom/wsseauthentication.class.php 2006-01-24 16:33:39 UTC (rev 2852)
+++ plugins/trunk/atom/class/xml/atom/wsseauthentication.class.php 2006-01-26 16:53:45 UTC (rev 2853)
@@ -104,17 +104,22 @@
*/
function parseWSSEHeader( $header )
{
- // this regular expression should help to match the different tokens that we need
- $regexp = '/UsernameToken Username="?([^"]+)"?, *PasswordDigest="?([^"]+)"?, *Nonce="?([^"]+)"?, *Created="?([^"]+)"?$/';
-
- preg_match( $regexp, $header, $matches );
-
- // collect the results from preg_match_all
- $this->userName = $matches[1];
- $this->passwordDigest = $matches[2];
- $this->nonce = $matches[3];
- $this->created = $matches[4];
- }
+ $regexp = '/Username="?([^"]+)"?(,|$)/';
+ preg_match( $regexp, $header, $matches );
+ $this->userName = $matches[1];
+
+ $regexp = '/PasswordDigest="?([^"]+)"?(,|$)/';
+ preg_match( $regexp, $header, $matches );
+ $this->passwordDigest = $matches[1];
+
+ $regexp = '/Nonce="?([^"]+)"?(,|$)/';
+ preg_match( $regexp, $header, $matches );
+ $this->nonce = $matches[1];
+
+ $regexp = '/Created="?([^"]+)"?(,|$)/';
+ preg_match( $regexp, $header, $matches );
+ $this->created = $matches[1];
+ }
/**
More information about the pLog-svn
mailing list