[pLog-svn] r2912 - plog/trunk/class/action/admin
mark at devel.lifetype.net
mark at devel.lifetype.net
Tue Feb 7 09:17:43 GMT 2006
Author: mark
Date: 2006-02-07 09:17:43 +0000 (Tue, 07 Feb 2006)
New Revision: 2912
Modified:
plog/trunk/class/action/admin/adminaction.class.php
Log:
Change if( $xxx =="" ) to if( empty($xxx) ), It will reduce some PHP5 notice.
According to the PHP manual, the empty() is much faster then string comparision.
Modified: plog/trunk/class/action/admin/adminaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaction.class.php 2006-02-07 09:13:07 UTC (rev 2911)
+++ plog/trunk/class/action/admin/adminaction.class.php 2006-02-07 09:17:43 UTC (rev 2912)
@@ -55,7 +55,7 @@
// get the information about the user and quit if we don't have it...
$this->_getUserInfo();
- if( $this->_userInfo == "" ) {
+ if( empty( $this->_userInfo ) ) {
header( "HTTP/1.0 403 Forbidden" );
print($this->mustAuthenticatePage());
die();
@@ -63,7 +63,7 @@
// do the same with the information about the blog
$this->_getBlogInfo();
- if( $this->_blogInfo == "" ) {
+ if( empty( $this->_blogInfo ) ) {
if( $this->_actionInfo->getActionParamValue() != "blogSelect" &&
$this->_actionInfo->getActionParamValue() != "registerBlog" &&
$this->_actionInfo->getActionParamValue() != "finishRegisterBlog" ) {
@@ -113,7 +113,7 @@
function &getLocale()
{
// don't like this so much...
- if( $this->_blogInfo != "" ) {
+ if( empty( $this->_blogInfo ) ) {
$this->_blogSettings = $this->_blogInfo->getSettings();
//$locale =& Locales::getLocale( $this->_blogSettings->getValue("locale"));
$locale =& $this->_blogInfo->getLocale();
More information about the pLog-svn
mailing list