/** * @param $id string|int * @return String */ function getWikiSetName($id) { if ($id) { return WikiSet::newFromID($id)->getName(); } else { return $this->msg('centralauth-editgroup-noset')->inContentLanguage()->text(); } }
function getWikiSetName($id) { if ($id) { return WikiSet::newFromID($id)->getName(); } else { return wfMsgForContent('centralauth-editgroup-noset'); } }
/** * @param $set * @return mixed */ function doDelete($set) { $set = WikiSet::newFromID($set); if (!$set) { $this->buildMainView('<strong class="error">' . wfMsgHtml('centralauth-editset-notfound', $set) . '</strong>'); return; } $reason = $this->getRequest()->getVal('wpReason'); $name = $set->getName(); $set->delete(); $title = SpecialPage::getTitleFor('WikiSets', $set->getID()); $log = new LogPage('gblrights'); $log->addEntry('deleteset', $title, $reason, array($name)); $this->buildMainView('<strong class="success">' . wfMsg('centralauth-editset-success-delete') . '</strong>'); }
/** * @return array */ function getGlobalRights() { $this->loadGroups(); $rights = array(); $sets = array(); foreach ($this->mRights as $right) { if ($right['set']) { $set = isset($sets[$right['set']]) ? $sets[$right['set']] : WikiSet::newFromID($right['set']); if ($set->inSet()) { $rights[] = $right['right']; } } else { $rights[] = $right['right']; } } return $rights; }