[Mediawiki-l] Touching a page programmatically?

Daniel Barrett danb at VistaPrint.com
Fri Nov 19 02:55:42 UTC 2010


I want to "touch" an article by performing an empty edit, as if someone clicked "Edit" followed by "Save Page". Does anyone know why this code works sometimes and has no effect other times?

function touch($page) {
    $title = Title::newFromText($page);
    if ($title) {
      $article = new Article($title);
      return $article->doEdit($article->getContent(),
                              '',
                              EDIT_UPDATE);
}

Thanks,
DanB




More information about the MediaWiki-l mailing list