[pLog-svn] r507 - in plog/trunk/class: dao net summary/action
subaochen at devel.plogworld.net
subaochen at devel.plogworld.net
Thu Dec 16 04:10:11 GMT 2004
Author: subaochen
Date: 2004-12-16 04:10:10 +0000 (Thu, 16 Dec 2004)
New Revision: 507
Modified:
plog/trunk/class/dao/bloginfo.class.php
plog/trunk/class/dao/users.class.php
plog/trunk/class/net/rawrequestgenerator.class.php
plog/trunk/class/summary/action/dousercreation.class.php
Log:
add profileLink to get user picture
I don't know how to add the same function to other *requestgenerator.class.php though.
Modified: plog/trunk/class/dao/bloginfo.class.php
===================================================================
--- plog/trunk/class/dao/bloginfo.class.php 2004-12-16 04:06:14 UTC (rev 506)
+++ plog/trunk/class/dao/bloginfo.class.php 2004-12-16 04:10:10 UTC (rev 507)
@@ -17,7 +17,7 @@
{
var $_blog;
- var $_owner;
+ var $_owner; // owner id
var $_about;
var $_settings;
var $_id;
@@ -222,6 +222,7 @@
}
/**
+ * @param owner id
* @private
*/
function setOwner( $owner )
@@ -449,4 +450,4 @@
return $quota;
}
}
-?>
\ No newline at end of file
+?>
Modified: plog/trunk/class/dao/users.class.php
===================================================================
--- plog/trunk/class/dao/users.class.php 2004-12-16 04:06:14 UTC (rev 506)
+++ plog/trunk/class/dao/users.class.php 2004-12-16 04:10:10 UTC (rev 507)
@@ -459,7 +459,7 @@
$result = $this->_db->Execute($query);
- if($result)
+ if($result && $result->RecordCount() >= 1)
return true;
else
return false;
Modified: plog/trunk/class/net/rawrequestgenerator.class.php
===================================================================
--- plog/trunk/class/net/rawrequestgenerator.class.php 2004-12-16 04:06:14 UTC (rev 506)
+++ plog/trunk/class/net/rawrequestgenerator.class.php 2004-12-16 04:10:10 UTC (rev 507)
@@ -225,7 +225,32 @@
return $link;
}
+
/**
+ * get user profile picture link
+ */
+ function profileLink($blogInfo = null){
+ if( $blogInfo == null ) {
+ $blogInfo = $this->_blogInfo;
+ }
+
+ $this->addParameter( "blogId", $blogInfo->getId());
+
+ $ownerInfo = $blogInfo->getOwnerInfo();
+ $pic = $ownerInfo->getPicture();
+ if(!$pic){
+ // show a default user picture
+ return "imgs/no-user-picture.jpg";
+ } else {
+ $this->addParameter( "resource", $pic->getFileName());
+ }
+
+ $link = $this->getResourceServerUrl().$this->getRequest();
+
+ return $link;
+ }
+
+ /**
* Returns the url where the rss feed is running
*
* @param blogInfo A BlogInfo object containing information about the blog.
Modified: plog/trunk/class/summary/action/dousercreation.class.php
===================================================================
--- plog/trunk/class/summary/action/dousercreation.class.php 2004-12-16 04:06:14 UTC (rev 506)
+++ plog/trunk/class/summary/action/dousercreation.class.php 2004-12-16 04:10:10 UTC (rev 507)
@@ -51,6 +51,7 @@
// check if this email account has registered and quit if so
if( $users->emailExists($this->userEmail)) {
+ $this->log->debug("email address ".$this->userEmail." has used by someone.");
$this->_view = new SummaryView( "registerstep1" );
//$this->_form->hasRun( true );
$this->_form->setFieldValidationStatus( "userEmail", false );
More information about the pLog-svn
mailing list