From d8670bae4a0de959107ad15ca718b44adb2536bc Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 12 Jan 2013 22:57:03 +0100 Subject: [PATCH] Removed unnecessary explicit __toString() calls --- .../install/files/lib/data/DatabaseObjectList.class.php | 6 +++--- wcfsetup/install/files/lib/data/style/StyleAction.class.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wcfsetup/install/files/lib/data/DatabaseObjectList.class.php b/wcfsetup/install/files/lib/data/DatabaseObjectList.class.php index d72246bbfd..6c57d8eaa7 100644 --- a/wcfsetup/install/files/lib/data/DatabaseObjectList.class.php +++ b/wcfsetup/install/files/lib/data/DatabaseObjectList.class.php @@ -145,7 +145,7 @@ abstract class DatabaseObjectList implements \Countable, ITraversableObject { $sql = "SELECT COUNT(*) AS count FROM ".$this->getDatabaseTableName()." ".$this->getDatabaseTableAlias()." ".$this->sqlConditionJoins." - ".$this->getConditionBuilder()->__toString(); + ".$this->getConditionBuilder(); $statement = WCF::getDB()->prepareStatement($sql); $statement->execute($this->getConditionBuilder()->getParameters()); $row = $statement->fetchArray(); @@ -160,7 +160,7 @@ abstract class DatabaseObjectList implements \Countable, ITraversableObject { $sql = "SELECT ".$this->getDatabaseTableAlias().".".$this->getDatabaseTableIndexName()." AS objectID FROM ".$this->getDatabaseTableName()." ".$this->getDatabaseTableAlias()." ".$this->sqlConditionJoins." - ".$this->getConditionBuilder()->__toString()." + ".$this->getConditionBuilder()." ".(!empty($this->sqlOrderBy) ? "ORDER BY ".$this->sqlOrderBy : ''); $statement = WCF::getDB()->prepareStatement($sql, $this->sqlLimit, $this->sqlOffset); $statement->execute($this->getConditionBuilder()->getParameters()); @@ -192,7 +192,7 @@ abstract class DatabaseObjectList implements \Countable, ITraversableObject { ".($this->useQualifiedShorthand ? $this->getDatabaseTableAlias().'.*' : '')." FROM ".$this->getDatabaseTableName()." ".$this->getDatabaseTableAlias()." ".$this->sqlJoins." - ".$this->getConditionBuilder()->__toString()." + ".$this->getConditionBuilder()." ".(!empty($this->sqlOrderBy) ? "ORDER BY ".$this->sqlOrderBy : ''); $statement = WCF::getDB()->prepareStatement($sql, $this->sqlLimit, $this->sqlOffset); $statement->execute($this->getConditionBuilder()->getParameters()); diff --git a/wcfsetup/install/files/lib/data/style/StyleAction.class.php b/wcfsetup/install/files/lib/data/style/StyleAction.class.php index 5e78120176..5af04b76fc 100644 --- a/wcfsetup/install/files/lib/data/style/StyleAction.class.php +++ b/wcfsetup/install/files/lib/data/style/StyleAction.class.php @@ -132,10 +132,10 @@ class StyleAction extends AbstractDatabaseObjectAction implements IToggleAction $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir), \RecursiveIteratorIterator::CHILD_FIRST); foreach ($iterator as $path) { if ($path->isDir()) { - @rmdir($path->__toString()); + @rmdir($path); } else { - @unlink($path->__toString()); + @unlink($path); } } -- 2.20.1