On Fri, Nov 19, 2010 at 3:55 AM, Daniel Barrett <[email protected]> wrote: > 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); > }
I assume you want to achieve something more specific than editing an article with a null edit. It would be best to go straight to the point, instead of relying on simulating user behaviour on the backend and expecting the application to react in a specific way. What do you want to do here? Purge cache? Update page_touched? Something else? -- Lucas 'TOR' Garczewski Wikia Tech Team _______________________________________________ MediaWiki-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
