Public Member Functions | |
| _checkTranslate () | |
| Permission check for translations. | |
| _checkMaintenance () | |
| Permission check for language maintenance (import/export). | |
| _lookupLangFolderRefId () | |
| Lookup the ref_id of the global language folder. | |
| _lookupId ($a_key) | |
| Lookup the object ID for a language key. | |
Definition at line 37 of file class.ilObjLanguageAccess.php.
| ilObjLanguageAccess::_checkMaintenance | ( | ) |
Permission check for language maintenance (import/export).
The global language folder must have 'visible' and 'read' permissions
static
Definition at line 69 of file class.ilObjLanguageAccess.php.
References $ref_id, and _lookupLangFolderRefId().
Referenced by ilObjLanguageExtGUI::getAdminTabs(), ilObjLanguageExtGUI::maintainObject(), ilObjLanguageExtGUI::settingsObject(), and ilObjLanguageExtGUI::uploadObject().
{
global $ilUser, $rbacsystem;
if (!$ilUser->getId())
{
return false;
}
else
{
$ref_id = ilObjLanguageAccess::_lookupLangFolderRefId();
return $rbacsystem->checkAccess("read,visible", (int) $ref_id);
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjLanguageAccess::_checkTranslate | ( | ) |
Permission check for translations.
This check is used for displaying the translation link on each page The global language folder must have 'visible' and 'read' permissions
static
Definition at line 48 of file class.ilObjLanguageAccess.php.
References $ref_id, and _lookupLangFolderRefId().
Referenced by ilTemplate::addILIASFooter(), ilObjLanguageExtGUI::executeCommand(), and ilObjLanguageExtGUI::saveObject().
{
global $ilUser, $rbacsystem;
if ($ilUser->getId())
{
$ref_id = ilObjLanguageAccess::_lookupLangFolderRefId();
return $rbacsystem->checkAccess("write", (int) $ref_id);
}
return false;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjLanguageAccess::_lookupId | ( | $ | a_key | ) |
Lookup the object ID for a language key.
static
| string | language key | |
| integer | language object id |
Definition at line 111 of file class.ilObjLanguageAccess.php.
Referenced by ilObjLanguageExtGUI::ilObjLanguageExtGUI().
{
global $ilDB;
$q = "SELECT obj_id FROM object_data ".
" WHERE type = 'lng' ".
" AND title = ".$ilDB->quote($a_key);
$set = $ilDB->query($q);
$row = $set->fetchRow(DB_FETCHMODE_ASSOC);
return $row['obj_id'];
}
Here is the caller graph for this function:| ilObjLanguageAccess::_lookupLangFolderRefId | ( | ) |
Lookup the ref_id of the global language folder.
static
Definition at line 91 of file class.ilObjLanguageAccess.php.
Referenced by _checkMaintenance(), and _checkTranslate().
{
global $ilDB;
$q = "SELECT ref_id FROM object_reference r, object_data d".
" WHERE r.obj_id = d.obj_id AND d.type='lngf'";
$set = $ilDB->query($q);
$row = $set->fetchRow(DB_FETCHMODE_ASSOC);
return $row['ref_id'];
}
Here is the caller graph for this function:
1.7.1