jenkins-bot has submitted this change and it was merged.
Change subject: Fix function not being defined
......................................................................
Fix function not being defined
Change-Id: I4b8bc9f25dda5725fa4d25d59d3e39f98f8fc084
---
M pywikibot/page.py
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py
index 0c28043..3883961 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -787,7 +787,7 @@
return False
else:
bots = template[1][0].split(',')
- if 'all' in bots or calledModuleName() in bots \
+ if 'all' in bots or pywikibot.calledModuleName() in bots \
or username in bots:
return False
elif title == 'Bots':
@@ -801,9 +801,9 @@
if ttype == 'deny':
return not ('all' in bots or username in bots)
if ttype == 'allowscript':
- return 'all' in bots or calledModuleName() in bots
+ return 'all' in bots or pywikibot.calledModuleName() in bots
if ttype == 'denyscript':
- return not ('all' in bots or calledModuleName() in bots)
+ return not ('all' in bots or pywikibot.calledModuleName() in bots)
# no restricting template found
return True
--
To view, visit https://gerrit.wikimedia.org/r/134052
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4b8bc9f25dda5725fa4d25d59d3e39f98f8fc084
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipedia(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: new mw release 1.24wmf4
......................................................................
new mw release 1.24wmf4
Change-Id: Iae3c3df58ec06702a78fed552346c4174714ce83
---
M family.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/family.py b/family.py
index 8c68b3c..4a2c53a 100644
--- a/family.py
+++ b/family.py
@@ -4960,7 +4960,7 @@
"""Return Wikimedia projects version number as a string."""
# Don't use this, use versionnumber() instead. This only exists
# to not break family files.
- return '1.24wmf3'
+ return '1.24wmf4'
def shared_image_repository(self, code):
return ('commons', 'commons')
--
To view, visit https://gerrit.wikimedia.org/r/134062
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iae3c3df58ec06702a78fed552346c4174714ce83
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: Add Proofread Page preloading functions
......................................................................
Add Proofread Page preloading functions
Implement preload param in API:Properties module "info" to
preload text.
Application: on Wikisource, with Extension:Proofread Page, it is
possible to preload text from a not existing page in the Page
namespace, if the corresponding Index page is present.
If a djvu file is connected to an Index page, text is basically already
available, making this script less important.
See also Bug 58963 - prop=info&inprop=preload does not return text
and Bug 64853 - port djvutext.py to core
Change-Id: Ic534597fe42c09e8432300a19e77c23a21f21a8e
---
M pywikibot/data/api.py
M pywikibot/page.py
M pywikibot/site.py
3 files changed, 20 insertions(+), 2 deletions(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index ea462e2..5ef6cee 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -1055,6 +1055,9 @@
if "pageprops" in pagedict:
page._pageprops = pagedict['pageprops']
+ if 'preload' in pagedict:
+ page._preloadedtext = pagedict['preload']
+
if "flowinfo" in pagedict:
page._flowinfo = pagedict['flowinfo']['flow']
diff --git a/pywikibot/page.py b/pywikibot/page.py
index 0c765ce..c54fab5 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -393,6 +393,16 @@
if hasattr(self, "_text"):
del self._text
+ def preloadText(self):
+ """Return the text returned by EditFormPreloadText See API module "info".
+
+ Application: on Wikisource wikis, text can be preloaded even if
+ a page does not exist, if an Index page is present.
+
+ """
+ self.site.loadpageinfo(self, preload=True)
+ return self._preloadedtext
+
def properties(self, force=False):
"""
Returns the various page properties stored for a page
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 3382686..f9e6223 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -1227,13 +1227,18 @@
except pywikibot.data.api.APIError: # May occur if you are not logged in (no API read permissions).
return (0, 0, 0)
- def loadpageinfo(self, page):
+ def loadpageinfo(self, page, preload=False):
"""Load page info from api and save in page attributes"""
title = page.title(withSection=False)
+ inprop = 'protection'
+ if preload:
+ inprop += '|preload'
+
query = self._generator(api.PropertyGenerator,
type_arg="info",
titles=title.encode(self.encoding()),
- inprop="protection")
+ inprop=inprop)
+
for pageitem in query:
if not self.sametitle(pageitem['title'], title):
pywikibot.warning(
--
To view, visit https://gerrit.wikimedia.org/r/132816
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic534597fe42c09e8432300a19e77c23a21f21a8e
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>