Revision: 7593 Author: xqt Date: 2009-11-05 07:19:10 +0000 (Thu, 05 Nov 2009)
Log Message: ----------- check for self edits
Modified Paths: -------------- trunk/pywikipedia/clean_sandbox.py
Modified: trunk/pywikipedia/clean_sandbox.py =================================================================== --- trunk/pywikipedia/clean_sandbox.py 2009-11-04 13:49:07 UTC (rev 7592) +++ trunk/pywikipedia/clean_sandbox.py 2009-11-05 07:19:10 UTC (rev 7593) @@ -145,9 +145,12 @@ text = sandboxPage.get() translatedContent = wikipedia.translate(mySite, content) translatedMsg = wikipedia.translate(mySite, msg) + subst = 'subst:' in translatedContent if text.strip() == translatedContent.strip(): wikipedia.output(u'The sandbox is still clean, no change necessary.') - elif text.find(translatedContent.strip()) <> 0 and not 'subst:' in translatedContent: + elif subst and sandboxPage.userName() == mySite.loggedInAs(): + wikipedia.output(u'The sandbox might be clean, no change necessary.') + elif text.find(translatedContent.strip()) <> 0 and not subst: sandboxPage.put(translatedContent, translatedMsg) wikipedia.output(u'Standard content was changed, sandbox cleaned.') else:
pywikipedia-svn@lists.wikimedia.org