[pLog-svn] r2215 - plog/trunk/class/dao
ork at devel.plogworld.net
ork at devel.plogworld.net
Sun Jun 12 11:13:34 GMT 2005
Author: ork
Date: 2005-06-12 11:13:34 +0000 (Sun, 12 Jun 2005)
New Revision: 2215
Modified:
plog/trunk/class/dao/articles.class.php
plog/trunk/class/dao/bloginfo.class.php
plog/trunk/class/dao/commentscommon.class.php
plog/trunk/class/dao/model.class.php
plog/trunk/class/dao/mylinkscategory.class.php
Log:
some more $var == null checked changed ..
Modified: plog/trunk/class/dao/articles.class.php
===================================================================
--- plog/trunk/class/dao/articles.class.php 2005-06-12 11:09:47 UTC (rev 2214)
+++ plog/trunk/class/dao/articles.class.php 2005-06-12 11:13:34 UTC (rev 2215)
@@ -1072,7 +1072,7 @@
{
include_once( PLOG_CLASS_PATH.'class/dao/articlecategories.class.php' );
- if( $this->categories == null )
+ if( $this->categories === null )
$this->categories = new ArticleCategories();
return $this->categories->getArticleCategories( $articleId, $blogId );
@@ -1119,7 +1119,7 @@
// if there's a time difference applied to all dates, then we'd better
// calculate it here!!
//
- if( $this->blogs == null )
+ if( $this->blogs === null )
$this->blogs = new Blogs();
$blogId = $query_result['blog_id'];
@@ -1156,7 +1156,7 @@
// get information about the categories of the article
$article->setCategories( $articleCategories );
$article->setBlogInfo( $blogInfo );
- if ( $this->users == null )
+ if ( $this->users === null )
$this->users = new Users();
$article->setUserInfo( $this->users->getUserInfoFromId( $query_result['user_id'] ));
Modified: plog/trunk/class/dao/bloginfo.class.php
===================================================================
--- plog/trunk/class/dao/bloginfo.class.php 2005-06-12 11:09:47 UTC (rev 2214)
+++ plog/trunk/class/dao/bloginfo.class.php 2005-06-12 11:13:34 UTC (rev 2215)
@@ -192,7 +192,7 @@
include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
// if it hasn't been loaded yet...
- if( $this->_createTimestamp == null ) {
+ if( $this->_createTimestamp === null ) {
$blogs = new Blogs();
$this->setCreateDate( $blogs->getBlogCreateDate( $this->getId()));
}
@@ -206,7 +206,7 @@
{
include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
- if( $this->_updateTimestamp == null ) {
+ if( $this->_updateTimestamp === null ) {
$blogs = new Blogs();
$this->setUpdateDate( $blogs->getBlogUpdateDate( $this->getId()));
}
@@ -220,7 +220,7 @@
{
include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
- if( $this->_totalPosts == null ) {
+ if( $this->_totalPosts === null ) {
$blogs = new Blogs();
$this->_totalPosts = $blogs->getBlogTotalPosts( $this->getId());
}
@@ -234,7 +234,7 @@
{
include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
- if( $this->_totalComments == null ) {
+ if( $this->_totalComments === null ) {
$blogs = new Blogs();
$this->_totalComments = $blogs->getBlogTotalComments( $this->getId());
}
@@ -248,7 +248,7 @@
{
include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
- if( $this->_totalTrackbacks == null ) {
+ if( $this->_totalTrackbacks === null ) {
$blogs = new Blogs();
$this->_totalTrackbacks = $blogs->getBlogTotalTrackbacks( $this->getId());
}
@@ -262,7 +262,7 @@
{
include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
- if( $this->_viewedTotal == null ) {
+ if( $this->_viewedTotal === null ) {
$blogs = new Blogs();
$this->_viewedTotal = $blogs->getBlogViewedTotal( $this->getId());
}
@@ -278,7 +278,7 @@
{
include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
- if( $this->_ownerInfo == null ) {
+ if( $this->_ownerInfo === null ) {
$users = new Users();
$ownerInfo = $users->getUserInfoFromId( $this->_owner );
$this->setOwnerInfo( $ownerInfo );
@@ -294,7 +294,7 @@
{
include_once( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
- if( $this->_usersInfo == null ) {
+ if( $this->_usersInfo === null ) {
$userpermissions = new UserPermissions();
$blogUsers = $userpermissions->getBlogUsers( $this->getId());
$this->setUsersInfo( $blogUsers );
@@ -461,7 +461,7 @@
{
// since including these files is quite a costly operation, let's do it only
// whenever we have to instead of always and always always... :)
- if( $this->_templateSet == null ) {
+ if( $this->_templateSet === null ) {
include_once( PLOG_CLASS_PATH."class/template/templatesets/templatesets.class.php" );
$ts = new TemplateSets();
$this->_templateSet = $ts->getTemplateSet( $this->getTemplate(), $this->getId());
@@ -494,7 +494,7 @@
*/
function &getLocale()
{
- if( $this->_locale == null ) {
+ if( $this->_locale === null ) {
include_once( PLOG_CLASS_PATH."class/locale/locales.class.php" );
$this->_locale =& Locales::getLocale( $this->getSetting( "locale" ), "en_UK" );
}
Modified: plog/trunk/class/dao/commentscommon.class.php
===================================================================
--- plog/trunk/class/dao/commentscommon.class.php 2005-06-12 11:09:47 UTC (rev 2214)
+++ plog/trunk/class/dao/commentscommon.class.php 2005-06-12 11:13:34 UTC (rev 2215)
@@ -71,6 +71,7 @@
Db::qstr($filter->normalizeText($comment->getText()))."', '".
Db::qstr($filter->normalizeText($comment->getTopic()))."',".$comment->getType().");";
+
$result = $this->Execute( $query );
if( !$result )
@@ -117,7 +118,7 @@
// find out the blogInfo object (after all, all these comments belong to the same
// blog so there is no risk of finding different blog_ids anywhere!
- if( $this->blogSettings == null ) {
+ if( $this->blogSettings === null ) {
$prefix = $this->getPrefix();
$articleId = $row["article_id"];
@@ -183,7 +184,7 @@
// find out the blogInfo object (after all, all these comments belong to the same
// blog so there is no risk of finding different blog_ids anywhere!
- if( $this->blogSettings == null ) {
+ if( $this->blogSettings === null ) {
$prefix = $this->getPrefix();
$articleId = $row["article_id"];
Modified: plog/trunk/class/dao/model.class.php
===================================================================
--- plog/trunk/class/dao/model.class.php 2005-06-12 11:09:47 UTC (rev 2214)
+++ plog/trunk/class/dao/model.class.php 2005-06-12 11:13:34 UTC (rev 2215)
@@ -72,6 +72,7 @@
define( 'ARTICLETEXTS_TABLENAME', 'articles_text' );
define( 'ARTICLE_CATEGORIES_RELATIONSHIP_TABLENAME',
'article_categories_link' );
+ define( 'CUSTOMFIELD_VALUES', 'custom_fields_values' );
/**
@@ -163,7 +164,7 @@
*/
function getPrefix()
{
- if ( $this->_prefix == null ) {
+ if ( $this->_prefix === null ) {
include_once( PLOG_CLASS_PATH."class/database/db.class.php" );
$this->_prefix = Db::getPrefix();
Modified: plog/trunk/class/dao/mylinkscategory.class.php
===================================================================
--- plog/trunk/class/dao/mylinkscategory.class.php 2005-06-12 11:09:47 UTC (rev 2214)
+++ plog/trunk/class/dao/mylinkscategory.class.php 2005-06-12 11:13:34 UTC (rev 2215)
@@ -133,7 +133,7 @@
*/
function getLinks()
{
- if( $this->_links == null ) {
+ if( $this->_links === null ) {
$myLinks = new MyLinks();
$categoryLinks = $myLinks->getLinks( $this->getBlogId(), $this->getId());
$this->setLinks( $categoryLinks );
More information about the pLog-svn
mailing list