X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FCategoryFinder.php;h=720abc3b466ba796ae32073adc7d210c7f8eafb0;hb=e55888be363ad07d5817bd383b8078064ef0d36f;hp=3561f7f5865e9750ac1c07dbe5a0ba6f7d87013b;hpb=16c80e429be5904fb42a93f260f8de3d18f0c692;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/CategoryFinder.php b/includes/CategoryFinder.php index 3561f7f586..720abc3b46 100644 --- a/includes/CategoryFinder.php +++ b/includes/CategoryFinder.php @@ -42,6 +42,8 @@ use Wikimedia\Rdbms\IDatabase; * $a = $cf->run(); * print implode( ',' , $a ); * @endcode + * + * @deprecated since 1.31 */ class CategoryFinder { /** @var int[] The original article IDs passed to the seed function */ @@ -211,14 +213,14 @@ class CategoryFinder { /* WHERE */ [ 'cl_from' => $this->next ], __METHOD__ . '-1' ); - foreach ( $res as $o ) { - $k = $o->cl_to; + foreach ( $res as $row ) { + $k = $row->cl_to; # Update parent tree - if ( !isset( $this->parents[$o->cl_from] ) ) { - $this->parents[$o->cl_from] = []; + if ( !isset( $this->parents[$row->cl_from] ) ) { + $this->parents[$row->cl_from] = []; } - $this->parents[$o->cl_from][$k] = $o; + $this->parents[$row->cl_from][$k] = $row; # Ignore those we already have if ( in_array( $k, $this->deadend ) ) { @@ -243,9 +245,9 @@ class CategoryFinder { /* WHERE */ [ 'page_namespace' => NS_CATEGORY, 'page_title' => $layer ], __METHOD__ . '-2' ); - foreach ( $res as $o ) { - $id = $o->page_id; - $name = $o->page_title; + foreach ( $res as $row ) { + $id = $row->page_id; + $name = $row->page_title; $this->name2id[$name] = $id; $this->next[] = $id; unset( $layer[$name] );