Inherits Maintenance.
Public Member Functions | |
| __construct () | |
| Default constructor. | |
| execute () | |
| Do the actual work. | |
Private Member Functions | |
| doRefreshLinks ($start, $newOnly=false, $maxLag=false, $end=0, $redirectsOnly=false, $oldRedirectsOnly=false) | |
| Do the actual link refreshing. | |
| fixRedirect ($id) | |
| Update the redirect entry for a given page. | |
| fixLinksFromArticle ($id) | |
| Run LinksUpdate for all links on a given page_id. | |
| deleteLinksFromNonexistent ($maxLag=0, $batchSize=100) | |
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html
Definition at line 23 of file refreshLinks.php.
| RefreshLinks::__construct | ( | ) |
Default constructor.
Children should call this if implementing their own constructors
Reimplemented from Maintenance.
Definition at line 24 of file refreshLinks.php.
References Maintenance::addArg(), Maintenance::addOption(), and Maintenance::setBatchSize().
| RefreshLinks::deleteLinksFromNonexistent | ( | $ | maxLag = 0, |
|
| $ | batchSize = 100 | |||
| ) | [private] |
Definition at line 228 of file refreshLinks.php.
References $batchSize, $dbr, $dbw, $maxLag, Maintenance::output(), wfGetDB(), wfGetLBFactory(), and wfWaitForSlaves().
Referenced by execute().
| RefreshLinks::doRefreshLinks | ( | $ | start, | |
| $ | newOnly = false, |
|||
| $ | maxLag = false, |
|||
| $ | end = 0, |
|||
| $ | redirectsOnly = false, |
|||
| $ | oldRedirectsOnly = false | |||
| ) | [private] |
Do the actual link refreshing.
| $start | int Page_id to start from | |
| $newOnly | bool Only do pages with 1 edit | |
| $maxLag | int Max DB replication lag | |
| $end | int Page_id to stop at | |
| $redirectsOnly | bool Only fix redirects | |
| $oldRedirectsOnly | bool Only fix redirects without redirect entries |
Definition at line 59 of file refreshLinks.php.
References $dbr, $i, $maxLag, $res, $wgParser, $wgUser, $wgUseTidy, fixLinksFromArticle(), fixRedirect(), Maintenance::output(), wfGetDB(), and wfWaitForSlaves().
Referenced by execute().
| RefreshLinks::execute | ( | ) |
Do the actual work.
All child classes will need to implement this
Reimplemented from Maintenance.
Definition at line 37 of file refreshLinks.php.
References deleteLinksFromNonexistent(), doRefreshLinks(), Maintenance::getArg(), Maintenance::getOption(), and Maintenance::hasOption().
| RefreshLinks::fixLinksFromArticle | ( | $ | id | ) | [private] |
Run LinksUpdate for all links on a given page_id.
| $id | int The page_id |
Definition at line 193 of file refreshLinks.php.
References $dbw, $options, $wgParser, $wgTitle, Title::newFromID(), Revision::newFromTitle(), LinkCache::singleton(), and wfGetDB().
Referenced by doRefreshLinks().
| RefreshLinks::fixRedirect | ( | $ | id | ) | [private] |
Update the redirect entry for a given page.
| $id | int The page_id of the redirect |
Definition at line 162 of file refreshLinks.php.
References $dbw, $wgArticle, $wgTitle, Title::newFromID(), and wfGetDB().
Referenced by doRefreshLinks().
1.5.9