public function delete( array $conditions, $functionName = null ) {
return wfGetDB( DB_MASTER )->delete(
$this->getName(),
- $this->getPrefixedValues( $conditions ),
+ $conditions === array() ? '*' : $this->getPrefixedValues( $conditions ),
$functionName
) !== false; // DatabaseBase::delete does not always return true for success as documented...
}
public function updateSummaryFields( $summaryFields = null, array $conditions = array() ) {
$this->setReadDb( DB_MASTER );
- foreach ( $this->select( null, $conditions ) as /* IORMRow */ $item ) {
+ /**
+ * @var IORMRow $item
+ */
+ foreach ( $this->select( null, $conditions ) as $item ) {
$item->loadSummaryFields( $summaryFields );
$item->setSummaryMode( true );
$item->save();