[pLog-svn] r1259 - plog/trunk/class/dao

oscar at devel.plogworld.net oscar at devel.plogworld.net
Mon Feb 28 21:13:19 GMT 2005


Author: oscar
Date: 2005-02-28 21:13:19 +0000 (Mon, 28 Feb 2005)
New Revision: 1259

Modified:
   plog/trunk/class/dao/mylinkscategories.class.php
   plog/trunk/class/dao/mylinkscategory.class.php
Log:
this should help to make things a bit faster...

Modified: plog/trunk/class/dao/mylinkscategories.class.php
===================================================================
--- plog/trunk/class/dao/mylinkscategories.class.php	2005-02-28 21:05:31 UTC (rev 1258)
+++ plog/trunk/class/dao/mylinkscategories.class.php	2005-02-28 21:13:19 UTC (rev 1259)
@@ -271,9 +271,6 @@
 													unserialize($row["properties"]),
                                                     $row["id"] );
 
-            $myLinks = new MyLinks();
-            $categoryLinks = $myLinks->getLinks( $row["blog_id"], $row["id"] );
-            $myLinksCategory->setLinks( $categoryLinks );
 			$myLinksCategory->setLastModification( new Timestamp( $row["last_modification"] ));
 
             return $myLinksCategory;

Modified: plog/trunk/class/dao/mylinkscategory.class.php
===================================================================
--- plog/trunk/class/dao/mylinkscategory.class.php	2005-02-28 21:05:31 UTC (rev 1258)
+++ plog/trunk/class/dao/mylinkscategory.class.php	2005-02-28 21:13:19 UTC (rev 1259)
@@ -39,6 +39,7 @@
             $this->_id = $id;
 			$this->setProperties( $properties );
 			$this->_lastModification = new Timestamp();
+			$this->_links = null;
         }
 
         /**
@@ -134,6 +135,12 @@
          */
         function getLinks()
         {
+			if( $this->_links == null ) {
+				$myLinks = new MyLinks();
+				$categoryLinks = $myLinks->getLinks( $this->getBlogId(), $this->getId());
+				$this->setLinks( $categoryLinks );			
+			}
+			
         	return $this->_links;
         }
 		




More information about the pLog-svn mailing list