- Code: Select all
$defaultContainer = Tinebase_Container::getInstance()->getDefaultContainer(Tinebase_Core::getUser()->getId(),$this->_applicationName)->toArray();
to this:
- Code: Select all
$defaultContainer = Tinebase_Container::getInstance()->getDefaultContainer($this->_applicationName)->toArray();
since getDefaultContainer declaration is changed in Milan!
Doing this, resolved our server side error, but now application is not rendered at client side and getToolbarFilter JS error is occurred! I've noticed that in our previous tine20 version, there existed a container named "Username's personal CCenter", but now it seems no container exists for our CCenter application!
here is CCenter's Controller.php:
- Code: Select all
public function createPersonalFolder($_accountId)
{
$translation = Tinebase_Translation::getTranslation('CCenter');
$account = Tinebase_User::getInstance()->getUserById($_accountId);
$newContainer = new Tinebase_Model_Container(array(
'name' => sprintf($translation->_("%s's personal ccenter"), $account->accountFullName),
'type' => Tinebase_Model_Container::TYPE_PERSONAL,
'owner_id' => $_accountId,
'backend' => 'Sql',
'application_id' => Tinebase_Application::getInstance()->getApplicationByName('CCenter')->getId()
));
$personalContainer = Tinebase_Container::getInstance()->addContainer($newContainer);
$container = new Tinebase_Record_RecordSet('Tinebase_Model_Container', array($personalContainer));
return $container;
}
protected function _handleEvent(Tinebase_Event_Abstract $_eventObject)
{
if (Tinebase_Core::isLogLevel(Zend_Log::TRACE)) Tinebase_Core::getLogger()->trace(__METHOD__ . ' (' . __LINE__ . ') handle event of type ' . get_class($_eventObject));
switch(get_class($_eventObject)) {
case 'Admin_Event_AddAccount':
$this->createPersonalFolder($_eventObject->account);
break;
case 'Admin_Event_DeleteAccount':
#$this->deletePersonalFolder($_eventObject->account);
break;
}
}
We urgently need to upgrade to Milan, so would you please help us resolving this problem!?


