Skip to content

Commit

Permalink
Prevent language context to be added on back-end
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienheraud committed Aug 13, 2023
1 parent 8e9372d commit a307b2e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions libraries/cck/_/dev/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,13 @@ public static function getAbsoluteUrl( $itemId = '', $query = '', $method = 'bas
} else {
$context = '';
$glue = ( $query != '' ) ? '&' : '';
$lang_sef = self::getLanguageCode( true );

if ( $lang_sef ) {
$context .= $lang_sef.'/';
if ( !JFactory::getApplication()->isClient( 'administrator' ) ) {
$lang_sef = self::getLanguageCode( true );

if ( $lang_sef ) {
$context .= $lang_sef.'/';
}
}
if ( JCck::isSite() && JCck::getSite()->context ) {
$context .= JCck::getSite()->context.'/';
Expand Down
9 changes: 6 additions & 3 deletions libraries/cms/cck/dev/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,13 @@ public static function getAbsoluteUrl( $itemId = '', $query = '', $method = 'bas
} else {
$context = '';
$glue = ( $query != '' ) ? '&' : '';
$lang_sef = self::getLanguageCode( true );

if ( $lang_sef ) {
$context .= $lang_sef.'/';
if ( !JFactory::getApplication()->isClient( 'administrator' ) ) {
$lang_sef = self::getLanguageCode( true );

if ( $lang_sef ) {
$context .= $lang_sef.'/';
}
}
if ( JCck::isSite() && JCck::getSite()->context ) {
$context .= JCck::getSite()->context.'/';
Expand Down

0 comments on commit a307b2e

Please sign in to comment.