Skip to content

Instantly share code, notes, and snippets.

@norv
Created December 10, 2012 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norv/4250282 to your computer and use it in GitHub Desktop.
Save norv/4250282 to your computer and use it in GitHub Desktop.
$subActions = array(
'edit' => 'ModifyLanguages',
'add' => 'AddLanguage',
'settings' => 'ModifyLanguageSettings',
'downloadlang' => 'DownloadLanguage',
'editlang' => 'ModifyLanguage',
);
call_integration_hook('integrate_manage_languages', array($subActions));
// By default we're managing languages.
$_REQUEST['sa'] = isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'edit';
$context['sub_action'] = $_REQUEST['sa'];
// Load up all the tabs...
$context[$context['admin_menu_name']]['tab_data'] = array(
'title' => $txt['language_configuration'],
'description' => $txt['language_description'],
);
// Call the right function for this sub-acton.
$subActions[$_REQUEST['sa']]();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment