Project

General

Profile

Bug #2271 » 2271.patch

krileon, 31 January 2011 21:50

View differences:

administrator/components/com_comprofiler/plugin.foundation.php
$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';
......
var $_myUserType;
var $_myCmsGid;
var $_myLanguage = null;
var $_myLanguageTag = null;
/** php gacl compatible instance:
* @var CBACL $acl */
var $acl;
......
* @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;
......
$this->_myUserType = $myUserType;
$this->_myCmsGid = $myCmsGid;
$this->_myLanguage = $myLanguage;
$this->_myLanguageTag = $myLanguageTag;
$this->_cbUrlRouting = $cbUrlRouting;
$this->_getVarFunction = $getVarFunction;
$this->_outputCharset = $outputCharset;
......
}
break;
case 'lang':
case 'lang_name':
return $this->_myLanguage;
break;
case 'lang_tag':
return $this->_myLanguageTag;
break;
case 'uniquemail':
if ( checkJversion() >= 1 ) {
return '1';
......
$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 ) );
}
}
}
......
$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();
......
$cmsRedirectFunc = array( $mainframe, 'redirect' );
$lang =& JFactory::getLanguage();
$myLanguage = $lang->getBackwardLang();
$myLanguageTag = $lang->getTag();
$outputCharst = 'UTF-8';
$getVarFunction = array( 'JRequest', 'getVar' );
$Jdocument =& JFactory::getDocument();
......
$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;
......
$cmsUserNeedsDb = true;
$cmsRedirectFunc = 'mosRedirect';
$myLanguage = $mainframe->getCfg( 'locale' );
$myLanguageTag = null;
$outputCharst = ( defined( '_ISO' ) ? strtoupper( str_replace( "charset=", "", _ISO ) ) : 'UTF-8' );
$getVarFunction = null;
$getDocFunction = null;
......
*/
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' );
(3-3/4)