Modul:Tools: Unterschied zwischen den Versionen

Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
local check    = require('Modul:Check2')
local check    = require('Modul:Check2')


local function matchString ( stringStr, delimiterStr )
local function strtok ( stringStr, delimiterStr )
local s = stringStr..delimiterStr
local s = stringStr..delimiterStr
local words = {}
local words = {}
Zeile 11: Zeile 11:


local function rmNamespace ( pageName )
local function rmNamespace ( pageName )
return matchString(pageName,':')[2] or pageName
return strtok(pageName,':')[2] or pageName
end
end


Zeile 37: Zeile 37:
     local new_args = tools._getParameters( frame.args, {'page'} );
     local new_args = tools._getParameters( frame.args, {'page'} );
     local page = new_args['page'] or '';
     local page = new_args['page'] or '';
     -- return page
     return strtok(pageName,'/')[1] or page
    return rmNamespace ( page )
    -- return mw.ustring.gsub( rmNamespace ( page ), '(.-)/(.*)', '%1' )
end
end


return tools
return tools