[pLog-svn] r512 - plog/trunk/class/net

subaochen at devel.plogworld.net subaochen at devel.plogworld.net
Fri Dec 17 09:09:55 GMT 2004


Author: subaochen
Date: 2004-12-17 09:09:55 +0000 (Fri, 17 Dec 2004)
New Revision: 512

Modified:
   plog/trunk/class/net/baserequestgenerator.class.php
   plog/trunk/class/net/rawrequestgenerator.class.php
Log:
move profileLink to baserequestgenerator and polished following oscar's suggestion


Modified: plog/trunk/class/net/baserequestgenerator.class.php
===================================================================
--- plog/trunk/class/net/baserequestgenerator.class.php	2004-12-17 09:05:10 UTC (rev 511)
+++ plog/trunk/class/net/baserequestgenerator.class.php	2004-12-17 09:09:55 UTC (rev 512)
@@ -414,5 +414,24 @@
 		      
 		      return $tag;
 		}		
+
+        /**
+         * get user profile picture link
+         */
+        function profileLink($blogInfo = null){
+        	if( $blogInfo == null ) {
+				$blogInfo = $this->_blogInfo;
+            }
+			
+            $ownerInfo = $blogInfo->getOwnerInfo();
+            $pic = $ownerInfo->getPicture();
+            if(!$pic){
+                // show a default user picture
+                return "imgs/no-user-picture.jpg";
+            } else {
+			    return $this->resourceLink($pic);
+            }
+
+        }
     }
 ?>

Modified: plog/trunk/class/net/rawrequestgenerator.class.php
===================================================================
--- plog/trunk/class/net/rawrequestgenerator.class.php	2004-12-17 09:05:10 UTC (rev 511)
+++ plog/trunk/class/net/rawrequestgenerator.class.php	2004-12-17 09:09:55 UTC (rev 512)
@@ -226,30 +226,7 @@
             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
          *




More information about the pLog-svn mailing list