Revision: 4139
Author: siebrand
Date: 2007-08-29 22:11:40 +0000 (Wed, 29 Aug 2007)
Log Message:
-----------
Also revert changes to the delinker. Works again.
Modified Paths:
--------------
trunk/pywikipedia/delinker.py
trunk/pywikipedia/delinker.txt
Modified: trunk/pywikipedia/delinker.py
===================================================================
--- trunk/pywikipedia/delinker.py 2007-08-29 22:06:09 UTC (rev 4138)
+++ trunk/pywikipedia/delinker.py 2007-08-29 22:11:40 UTC (rev 4139)
@@ -396,7 +396,7 @@
http_callback = wait_callback, no_db = True)
- def check_usage(self, image, timestamp, admin, reason, replacement, namespace = None):
+ def check_usage(self, image, timestamp, admin, reason, replacement):
""" Check whether this image needs to be delinked. """
# Check whether the image still is deleted on Commons.
@@ -420,7 +420,7 @@
if self.CommonsDelinker.config['global']:
- usage = self.CheckUsage.get_usage(image, namespace = namespace)
+ usage = self.CheckUsage.get_usage(image)
usage_domains = {}
count = 0
@@ -434,15 +434,12 @@
#FIX!
usage_domains = {(self.site.lang, self.site.family.name):
list(self.CheckUsage.get_usage_live(self.site,
- image, namespace = namespace))}
+ image))}
count = len(usage_domains[(self.site.lang, self.site.family.name)])
output(u'%s %s used on %s pages' % (self, image, count))
if count:
- if count > self.CommonsDelinker.config.get('template_threshold',
sys.maxint):
- output('%s Only delinking %s from template namespace' % (self, image))
- return check_usage(image, timestamp, admin, reason, replacement, 10)
# Pass the usage to the Delinker pool along with other arguments
self.CommonsDelinker.Delinkers.append((image, usage_domains,
timestamp, admin, reason, replacement))
Modified: trunk/pywikipedia/delinker.txt
===================================================================
--- trunk/pywikipedia/delinker.txt 2007-08-29 22:06:09 UTC (rev 4138)
+++ trunk/pywikipedia/delinker.txt 2007-08-29 22:11:40 UTC (rev 4139)
@@ -95,8 +95,6 @@
* ''exclude_string = "no-delink"'': If this string is included
in the deletion
summary, the file is not delinked.
* ''summary_cache = 3600'': Time before on-wiki settings are updated.
-* ''template_threshold = 1000'': If more an image is used more often than
this
- value, only delink from the template namespace.
=== Replacer settings ===
Those variables only need to be set if the replacer is enabled.
Show replies by date