Commit 34b3edee authored by profix898's avatar profix898

- feature: suggested menu item "My Album" pointing to useralbum (#269398)

parent 8d234df0
......@@ -175,11 +175,6 @@ function _gallery_init($full = FALSE, $vars = NULL, $report_error = TRUE) {
// Session handling
$g2_session =& $GLOBALS['gallery']->getSession();
$g2_session->doNotUseTempId();
//
/*list ($ret, $g2_admin) = GalleryCoreApi::isUserInSiteAdminGroup();
if (!$ret && $g2_admin) {
$g2_session->put('session.siteAdminActivityTimestamp', time());
}*/
$ready['half'] = $params['fullInit'] ? ($ready['full'] = TRUE) : TRUE;
......
......@@ -44,7 +44,8 @@ function gallery_menu_menu() {
'title' => 'My Album',
'description' => 'Go to your Gallery2 useralbum.',
'access callback' => 'gallery_menu_useralbum_access',
'page callback' => 'gallery_menu_useralbum'
'page callback' => 'gallery_menu_useralbum',
'type' => MENU_SUGGESTED_ITEM
);
}
......@@ -230,7 +231,7 @@ function _gallery_menu_album_path($id) {
}
// Remove the language-prefix
if (function_exists('language_url_rewrite')) {
if (function_exists('language_url_rewrite') && variable_get('language_count', 1) > 1) {
$args = explode('/', $path);
$prefix = array_shift($args);
if (!empty($language->prefix) && $language->prefix == $prefix) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment