Index: trunk/phase3/includes/DBDataObject.php |
— | — | @@ -552,19 +552,6 @@ |
553 | 553 | } |
554 | 554 | |
555 | 555 | /** |
556 | | - * Gets if the object can take a certain field. |
557 | | - * |
558 | | - * @since 1.20 |
559 | | - * |
560 | | - * @param string $name |
561 | | - * |
562 | | - * @return boolean |
563 | | - */ |
564 | | - public function canHaveField( $name ) { |
565 | | - return array_key_exists( $name, $this->table->getFieldTypes() ); |
566 | | - } |
567 | | - |
568 | | - /** |
569 | 556 | * Add an amount (can be negative) to the specified field (needs to be numeric). |
570 | 557 | * |
571 | 558 | * @since 1.20 |
Index: trunk/phase3/includes/DBTable.php |
— | — | @@ -266,6 +266,9 @@ |
267 | 267 | * Returns the amount of matching records. |
268 | 268 | * Condition field names get prefixed. |
269 | 269 | * |
| 270 | + * Note that this can be expensive on large tables. |
| 271 | + * In such cases you might want to use DatabaseBase::estimateRowCount instead. |
| 272 | + * |
270 | 273 | * @since 1.20 |
271 | 274 | * |
272 | 275 | * @param array $conditions |
— | — | @@ -600,5 +603,18 @@ |
601 | 604 | public function getFieldNames() { |
602 | 605 | return array_keys( $this->getFieldTypes() ); |
603 | 606 | } |
| 607 | + |
| 608 | + /** |
| 609 | + * Gets if the object can take a certain field. |
| 610 | + * |
| 611 | + * @since 1.20 |
| 612 | + * |
| 613 | + * @param string $name |
| 614 | + * |
| 615 | + * @return boolean |
| 616 | + */ |
| 617 | + public function canHaveField( $name ) { |
| 618 | + return array_key_exists( $name, $this->getFieldTypes() ); |
| 619 | + } |
604 | 620 | |
605 | 621 | } |