מדיה ויקי:Gadget-DeleteRequest.js: הבדלים בין גרסאות בדף
מאין תקציר עריכה |
maintenance: more info ReferenceError: Can't find variable: info |
||
| שורה 40: | שורה 40: | ||
var param = {action: 'edit', title: title, summary: summary.replace(/replaceParam/g, mw.config.get("wgPageName").replace(/_/g, " ")).replace(/replaceUser/g, mw.config.get('wgRelevantUserName')), token: mw.user.tokens.get('csrfToken'), section: section || '0', appendtext: content, format: 'json', tags:'בקשות_ממפעילים'}; | var param = {action: 'edit', title: title, summary: summary.replace(/replaceParam/g, mw.config.get("wgPageName").replace(/_/g, " ")).replace(/replaceUser/g, mw.config.get('wgRelevantUserName')), token: mw.user.tokens.get('csrfToken'), section: section || '0', appendtext: content, format: 'json', tags:'בקשות_ממפעילים'}; | ||
$.post(mw.util.wikiScript('api'), param, function(data) { | $.post(mw.util.wikiScript('api'), param, function(data) { | ||
if (data && data.error) | if (data && data.error && data.error.info) | ||
mw.notify('שגיאה בשמירה: ' + data.error | mw.notify('שגיאה בשמירה: ' + data.error.info); | ||
else if (data && data.edit && data.edit.result == 'Success' && typeof next == 'function') | else if (data && data.edit && data.edit.result == 'Success' && typeof next == 'function') | ||
next(); | next(); | ||