Jump to content

Manual talk:Chris G's botclasses/AllPagesBot.php

About this board

Trls250 (talkcontribs)

https://www.mediawiki.org/wiki/API:Query#Backwards_compatibility_of_continue

Needed to update bot:

   foreach ( $namespaces as $namespace ) {
       $done = false;
       $apfrom = ;
           while ( !$done ) {
           $query = "?action=query&format=php&list=allpages&aplimit=500&apnamespace=$namespace&rawcontinue=";
           if ( $apfrom ) {
               $query .= "&apfrom=$apfrom";
           }
           $ret = $wiki->query ( $query );
           if ( !isset ( $ret['query-continue'] ) ) {
               $done = true;
           } else {
               $apfrom = $ret['query-continue']['allpages']['apcontinue'];
           }
           foreach ( $ret['query']['allpages'] as $thisPage ) {
               fwrite ( $pageTitles, $thisPage['title'] . "\n" );
Reply to "Query-Continue"
There are no older topics