Browse files

Clean up the page *before* uncommenting categories…otherwise the clea…

…nup() just recomments them

I may be mistaken (since this seemed like a pretty critical bug that
was just..sitting there), in which case, please revert
  • Loading branch information...
theopolisme committed Aug 21, 2013
1 parent 95468d3 commit 9fd26a8b1f75e85e49a85c430104680abcc4a7a8
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/submissions.js
@@ -595,6 +595,9 @@ function afcHelper_act(action) {
// remove all other afc templates
pagetext = pagetext.replace(/\{\{\s*afc.*?\}\}/ig,"");
// first clean up the page
pagetext = afcHelper_cleanup(pagetext);
// Uncomment cats (after the cleanup commented them)
pagetext = pagetext.replace(/\[\[:Category/gi, "\[\[Category");
pagetext = pagetext.replace(/\{\{:?DEFAULTSORT:/gi, "\{\{DEFAULTSORT:"); //fixes upper and lowercase problems!
@@ -669,7 +672,6 @@ function afcHelper_act(action) {
$("#afcHelper_orphan").html("Page is orphaned, adding tag.");
pagetext = afcHelper_cleanup(pagetext);
afcHelper_editPage(newtitle, pagetext, "Cleanup following [[Wikipedia:Articles for creation]] creation", false);
afcHelper_movePage(afcHelper_PageName, newtitle, 'Created via \[\[WP:AFC|Articles for creation\]\] (\[\[WP:WPAFC|you can help!\]\])', callback, true);

1 comment on commit 9fd26a8


This comment has been minimized.

Show comment
Hide comment

wikipedia-mabdul Aug 22, 2013


uuuhm... good catch.


wikipedia-mabdul commented on 9fd26a8 Aug 22, 2013

uuuhm... good catch.

Please sign in to comment.