# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. --- administrator/components/com_comprofiler/plugin.foundation.php +++ administrator/components/com_comprofiler/plugin.foundation.php @@ -96,6 +96,12 @@ $filename = $pathAr[1] . '_language.php'; } if ( ! file_exists( $langPath . '/' . $lang . '/' . $filename ) ) { + $lang = $_CB_framework->getCfg( 'lang_tag' ); + if ( in_array( $pathAr[1], array( 'front', 'all' ) ) ) { + $filename = 'language.php'; + } + } + if ( ! file_exists( $langPath . '/' . $lang . '/' . $filename ) ) { $lang = 'default_language'; if ( in_array( $pathAr[1], array( 'front', 'all' ) ) ) { $filename = $lang . '.php'; @@ -1923,6 +1929,7 @@ var $_myUserType; var $_myCmsGid; var $_myLanguage = null; + var $_myLanguageTag = null; /** php gacl compatible instance: * @var CBACL $acl */ var $acl; @@ -1944,7 +1951,7 @@ * @var CBdocumentHtml */ var $document; - function CBframework( &$baseFramework, &$cmsDatabase, &$acl, &$aclParams, $cmsSefFunction, $sefFuncHtmlEnt, $cmsUserClassName, $cmsUserNeedsDb, $cmsRedirectFunction, $myId, $myUsername, $myUserType, $myCmsGid, $myLanguage, $cbUrlRouting, $getVarFunction, &$getDocFunction, $outputCharset, $editorDisplay ) { + function CBframework( &$baseFramework, &$cmsDatabase, &$acl, &$aclParams, $cmsSefFunction, $sefFuncHtmlEnt, $cmsUserClassName, $cmsUserNeedsDb, $cmsRedirectFunction, $myId, $myUsername, $myUserType, $myCmsGid, $myLanguage, $myLanguageTag, $cbUrlRouting, $getVarFunction, &$getDocFunction, $outputCharset, $editorDisplay ) { $this->_baseFramework =& $baseFramework; $this->_cmsDatabase =& $cmsDatabase; // $this->acl =& $acl; @@ -1958,6 +1965,7 @@ $this->_myUserType = $myUserType; $this->_myCmsGid = $myCmsGid; $this->_myLanguage = $myLanguage; + $this->_myLanguageTag = $myLanguageTag; $this->_cbUrlRouting = $cbUrlRouting; $this->_getVarFunction = $getVarFunction; $this->_outputCharset = $outputCharset; @@ -2125,8 +2133,12 @@ } break; case 'lang': + case 'lang_name': return $this->_myLanguage; break; + case 'lang_tag': + return $this->_myLanguageTag; + break; case 'uniquemail': if ( checkJversion() >= 1 ) { return '1'; @@ -2470,7 +2482,8 @@ $obj = null; } else { if ( checkJversion() == 2 ) { - $obj->gid = end( array_keys( $obj->groups ) ); + global $_CB_framework; + $obj->gid = (int) $_CB_framework->acl->getBackwardsCompatibleGid( array_values( $obj->groups ) ); } } } @@ -3082,6 +3095,7 @@ $cmsRedirectFunc = array( $mainframe, 'redirect' ); $lang =& JFactory::getLanguage(); $myLanguage = strtolower( preg_replace( '/^(\w+).*$/i', '\1', $lang->getName() ) ); + $myLanguageTag = $lang->getTag(); $outputCharst = 'UTF-8'; $getVarFunction = array( 'JRequest', 'getVar' ); $Jdocument =& JFactory::getDocument(); @@ -3111,6 +3125,7 @@ $cmsRedirectFunc = array( $mainframe, 'redirect' ); $lang =& JFactory::getLanguage(); $myLanguage = $lang->getBackwardLang(); + $myLanguageTag = $lang->getTag(); $outputCharst = 'UTF-8'; $getVarFunction = array( 'JRequest', 'getVar' ); $Jdocument =& JFactory::getDocument(); @@ -3137,6 +3152,7 @@ $cmsUserNeedsDb = true; $cmsRedirectFunc = 'mosRedirect'; $myLanguage = $mainframe->getCfg( 'lang' ); + $myLanguageTag = null; $outputCharst = ( defined( '_ISO' ) ? strtoupper( str_replace( "charset=", "", _ISO ) ) : 'ISO-8859-1' ); $getVarFunction = null; $getDocFunction = null; @@ -3155,6 +3171,7 @@ $cmsUserNeedsDb = true; $cmsRedirectFunc = 'mosRedirect'; $myLanguage = $mainframe->getCfg( 'locale' ); + $myLanguageTag = null; $outputCharst = ( defined( '_ISO' ) ? strtoupper( str_replace( "charset=", "", _ISO ) ) : 'UTF-8' ); $getVarFunction = null; $getDocFunction = null; @@ -3208,7 +3225,7 @@ */ global $_CB_framework; $optionOfCb = 'com_comprofiler'; // cbGetParam( $_REQUEST, 'option', 'com_comprofiler' ) -$_CB_framework = new CBframework( $mainframe, $tmpDatabase, $acl, $aclParams, $sefFunc, $sefFuncHtmlEnt, $cmsUser, $cmsUserNeedsDb, $cmsRedirectFunc, $my->id, $my->username, $my->usertype, $myAid, $myLanguage, array( 'option' => $optionOfCb ), $getVarFunction, $getDocFunction, $outputCharst, $editorDisplay ); +$_CB_framework = new CBframework( $mainframe, $tmpDatabase, $acl, $aclParams, $sefFunc, $sefFuncHtmlEnt, $cmsUser, $cmsUserNeedsDb, $cmsRedirectFunc, $my->id, $my->username, $my->usertype, $myAid, $myLanguage, $myLanguageTag, array( 'option' => $optionOfCb ), $getVarFunction, $getDocFunction, $outputCharst, $editorDisplay ); cbimport( 'cb.acl' );