当前位置: 首页>>代码示例>>PHP>>正文


PHP Tinebase_Core类代码示例

本文整理汇总了PHP中Tinebase_Core的典型用法代码示例。如果您正苦于以下问题:PHP Tinebase_Core类的具体用法?PHP Tinebase_Core怎么用?PHP Tinebase_Core使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Tinebase_Core类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _group2ldap

 /**
  * convert objects with user data to ldap data array
  * 
  * @param Tinebase_Model_FullUser  $_user
  * @param array                    $_ldapData  the data to be written to ldap
  */
 protected function _group2ldap(Tinebase_Model_Group $_group, array &$_ldapData)
 {
     if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) {
         Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' ENCRYPT ' . print_r($_ldapData, true));
     }
     if (isset($_ldapData['objectclass'])) {
         $_ldapData['objectclass'] = array_unique(array_merge($_ldapData['objectclass'], $this->_requiredObjectClass));
     }
     if (isset($_ldapData['gidnumber'])) {
         $gidNumber = $_ldapData['gidnumber'];
     } else {
         $gidNumber = $this->_getGidNumber($_group->getId());
     }
     // when we try to add a group, $_group has no id which leads to Tinebase_Exception_InvalidArgument in $this->_getGroupMetaData
     try {
         $metaData = $this->_getGroupMetaData($_group);
     } catch (Tinebase_Exception_InvalidArgument $teia) {
         $metaData = array();
     }
     if (!isset($metaData['sambasid'])) {
         $_ldapData['sambasid'] = $this->_options[Tinebase_Group_Ldap::PLUGIN_SAMBA]['sid'] . '-' . (2 * $gidNumber + 1001);
         $_ldapData['sambagrouptype'] = 2;
     }
     $_ldapData['displayname'] = $_group->name;
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:31,代码来源:Samba.php

示例2: printDocs

 public function printDocs()
 {
     // print payments which are debit returns and have flag print inquiry
     $resultData = array();
     $filters = array(array('field' => 'is_return_debit', 'operator' => 'equals', 'value' => '1'), array('field' => 'print_inquiry', 'operator' => 'equals', 'value' => '1'), array('field' => 'inquiry_print_date', 'operator' => 'isnull', 'value' => ''));
     $objFilter = new Billing_Model_PaymentFilter($filters, 'AND');
     $paymentIds = Billing_Controller_Payment::getInstance()->search($objFilter, null, null, true);
     foreach ($paymentIds as $paymentId) {
         $payment = Billing_Controller_Payment::getInstance()->get($paymentId);
         // get base payment
         $basePayment = $payment->getForeignRecordBreakNull('return_debit_base_payment_id', Billing_Controller_Payment::getInstance());
         if ($basePayment) {
             $batchJobDta = $basePayment->getForeignRecordBreakNull('batch_job_dta_id', Billing_Controller_BatchJobDta::getInstance());
             if ($batchJobDta) {
                 $bankAccount = Billing_Api_BankAccount::getFromBatchJobDta($batchJobDta);
                 $debitor = $payment->getForeignRecord('debitor_id', Billing_Controller_Debitor::getInstance());
                 $contact = $debitor->getForeignRecord('contact_id', Addressbook_Controller_Contact::getInstance());
                 $data = array();
                 $dummyTextBlocks = null;
                 $data = array_merge($data, Addressbook_Custom_Template::getContactData(array('contact' => $contact, 'user' => Tinebase_Core::get(Tinebase_Core::USER), 'userContact' => Addressbook_Controller_Contact::getInstance()->getContactByUserId(Tinebase_Core::get(Tinebase_Core::USER)->getId())), $dummyTextBlocks));
                 $data = array_merge($data, array('bank_name' => $bankAccount->getBank(), 'account_name' => $bankAccount->getName(), 'account_nr' => $bankAccount->getNumber(), 'bank_code' => $bankAccount->getBankCode()));
                 $resultData[$contact->__get('n_fileas')] = $data;
                 $payment->__set('inquiry_print_date', new Zend_Date());
                 Billing_Controller_Payment::getInstance()->update($payment);
             }
         }
     }
     $outputFileName = 'Ruecklastschrift-Nachforschung-' . strftime('%d-%m-%Y %H-%M-%S') . '.pdf';
     $templateId = Tinebase_Core::getPreference('Billing')->getValue(Billing_Preference::TEMPLATE_DEBIT_RETURN_INQUIRY);
     ksort($resultData);
     Billing_Controller_PrintJobRecordData::getInstance()->export($resultData, $templateId, $outputFileName);
 }
开发者ID:carriercomm,项目名称:Billing-5,代码行数:32,代码来源:PrintDebitReturnInquiry.php

示例3: findTimesheetsForReport

 /**
  * calls Timetracker_Controller_Timesheet::findTimesheetsByTimeaccountAndPeriod arguments suitable for async job
  * returns true if cache could be saved.
  * 
  * @param array $args
  * @return boolean
  */
 public function findTimesheetsForReport(array $args)
 {
     $cache = Tinebase_Core::getCache();
     $results = Timetracker_Controller_Timesheet::getInstance()->findTimesheetsByTimeaccountAndPeriod($args['timeaccountId'], $args['startDate'], $args['endDate'], $args['destination'], $args['taCostCenter']);
     $m = str_replace('-', '', $args['month']);
     return $cache->save(array('results' => $results), $args['cacheId'], array($args['cacheId'] . '_' . $m));
 }
开发者ID:bitExpert,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:14,代码来源:Controller.php

示例4: __construct

 /**
  * the constructor
  *
  * don't use the constructor. use the singleton 
  */
 private function __construct()
 {
     $this->_applicationName = 'Sales';
     $this->_backend = new Sales_Backend_Contract();
     $this->_modelName = 'Sales_Model_Contract';
     $this->_currentAccount = Tinebase_Core::getUser();
 }
开发者ID:rodrigofns,项目名称:ExpressoLivre3,代码行数:12,代码来源:Contract.php

示例5: setUp

 /**
  * Sets up the fixture.
  * 
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     Tinebase_TransactionManager::getInstance()->startTransaction(Tinebase_Core::getDb());
     // we need that because the voip db tables can have a different prefix
     Tinebase_Core::set('voipdbTablePrefix', SQL_TABLE_PREFIX);
     $phoneId = Tinebase_Record_Abstract::generateUID();
     $this->_objects['location'] = new Voipmanager_Model_Snom_Location(array('id' => Tinebase_Record_Abstract::generateUID(), 'name' => 'phpunit test location', 'registrar' => 'registrar'));
     $this->_objects['software'] = new Voipmanager_Model_Snom_Software(array('id' => Tinebase_Record_Abstract::generateUID()));
     $this->_objects['setting'] = new Voipmanager_Model_Snom_Setting(array('id' => Tinebase_Record_Abstract::generateUID(), 'name' => Tinebase_Record_Abstract::generateUID(), 'description' => Tinebase_Record_Abstract::generateUID(), 'language_w' => true));
     $this->_objects['phonesettings'] = new Voipmanager_Model_Snom_PhoneSettings(array('phone_id' => $phoneId, 'language' => 'Deutsch'));
     $this->_objects['template'] = new Voipmanager_Model_Snom_Template(array('id' => Tinebase_Record_Abstract::generateUID(), 'name' => 'phpunit test location', 'software_id' => $this->_objects['software']->getId(), 'setting_id' => $this->_objects['setting']->getId()));
     $this->_objects['phone'] = new Voipmanager_Model_Snom_Phone(array('id' => $phoneId, 'macaddress' => "1234567890cd", 'location_id' => $this->_objects['location']->getId(), 'template_id' => $this->_objects['template']->getId(), 'current_model' => 'snom320', 'redirect_event' => 'none'));
     $this->_objects['phoneOwner'] = array('account_id' => Zend_Registry::get('currentAccount')->getId(), 'account_type' => 'user');
     $rights = new Tinebase_Record_RecordSet('Voipmanager_Model_Snom_PhoneRight', array($this->_objects['phoneOwner']));
     $this->_objects['phone']->rights = $rights;
     // create phone, location, template
     $snomLocationBackend = new Voipmanager_Backend_Snom_Location();
     $snomTemplateBackend = new Voipmanager_Backend_Snom_Template();
     $snomSoftwareBackend = new Voipmanager_Backend_Snom_Software();
     $snomPhoneBackend = new Voipmanager_Backend_Snom_Phone();
     $snomSettingBackend = new Voipmanager_Backend_Snom_Setting();
     $snomPhoneSettingsBackend = new Voipmanager_Backend_Snom_PhoneSettings();
     $snomSoftwareBackend->create($this->_objects['software']);
     $snomLocationBackend->create($this->_objects['location']);
     $snomTemplateBackend->create($this->_objects['template']);
     $snomSettingBackend->create($this->_objects['setting']);
     $snomPhoneBackend->create($this->_objects['phone']);
     $snomPhoneSettingsBackend->create($this->_objects['phonesettings']);
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:34,代码来源:AbstractTest.php

示例6: _onAfterExportRecords

 protected function _onAfterExportRecords($result)
 {
     $user = Tinebase_Core::getUser();
     $this->_docTemplate->setValue('date', Tinebase_DateTime::now()->format('Y-m-d'));
     $this->_docTemplate->setValue('account_n_given', $user->accountFirstName);
     $this->_docTemplate->setValue('account_n_family', $user->accountLastName);
 }
开发者ID:bitExpert,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:7,代码来源:Doc.php

示例7: resolveVirtualFields

 /**
  * resolves all virtual fields for the address
  *
  * @param array $address
  * @return array with property => value
  */
 public function resolveVirtualFields($address)
 {
     if (!isset($address['type'])) {
         if (Tinebase_Core::isLogLevel(Zend_Log::WARN)) {
             Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__ . ' Invalid address for resolving: ' . print_r($address, true));
         }
         return $address;
     }
     $ft = '';
     $i18n = Tinebase_Translation::getTranslation($this->_applicationName)->getAdapter();
     $type = $address['type'];
     $ft .= !empty($address['prefix1']) ? $address['prefix1'] : '';
     $ft .= !empty($address['prefix1']) && !empty($address['prefix2']) ? ' ' : '';
     $ft .= !empty($address['prefix2']) ? $address['prefix2'] : '';
     $ft .= !empty($address['prefix1']) || !empty($address['prefix2']) ? ', ' : '';
     $ft .= !empty($address['postbox']) ? $address['postbox'] : (!empty($address['street']) ? $address['street'] : '');
     $ft .= !empty($address['postbox']) || !empty($address['street']) ? ', ' : '';
     $ft .= !empty($address['postalcode']) ? $address['postalcode'] . ' ' : '';
     $ft .= !empty($address['locality']) ? $address['locality'] : '';
     $ft .= ' (';
     $ft .= $i18n->_($type);
     if ($type == 'billing') {
         $ft .= ' - ' . $address['custom1'];
     }
     $ft .= ')';
     $address['fulltext'] = $ft;
     return $address;
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:34,代码来源:Address.php

示例8: getThemeConfig

 public static function getThemeConfig()
 {
     $extJS = 'ext-all.css';
     $themePath = 'tine20';
     $favicon = 'images/favicon.ico';
     $title = 'Tine 2.0';
     $themeConfig = Tinebase_Core::getConfig()->theme;
     if ($themeConfig instanceof Tinebase_Config_Struct && $themeConfig->active) {
         if ($themeConfig->path) {
             $themePath = $themeConfig->path;
             //is useBlueAsBase set?
             if ($themeConfig->useBlueAsBase) {
                 $extJS = 'ext-all-notheme.css';
             }
             //is there a customized favicon?
             if (file_exists('themes/' . $themePath . '/resources/images/favicon.ico')) {
                 $favicon = 'themes/' . $themePath . '/resources/images/favicon.ico';
             }
         }
     }
     //Do we have a branding favicon?
     $favicon = Tinebase_Config::getInstance()->get(Tinebase_Config::BRANDING_FAVICON) ? Tinebase_Config::getInstance()->get(Tinebase_Config::BRANDING_FAVICON) : $favicon;
     //Do we have a branding title?
     $title = Tinebase_Config::getInstance()->get(Tinebase_Config::BRANDING_TITLE) ? Tinebase_Config::getInstance()->get(Tinebase_Config::BRANDING_TITLE) : $title;
     $result = array('favicon' => $favicon, 'extJs' => '<link rel="stylesheet" type="text/css" href="library/ExtJS/resources/css/' . $extJS . '" />', 'themePath' => '<link rel="stylesheet" type="text/css" href="themes/' . $themePath . '/resources/css/' . $themePath . '.css" />', 'title' => $title);
     return $result;
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:27,代码来源:View.php

示例9: testGetProperties

 /**
  * test testGetProperties method
  */
 public function testGetProperties()
 {
     $body = '<?xml version="1.0" encoding="utf-8"?>
              <propfind xmlns="DAV:">
                 <prop>
                     <getlastmodified xmlns="DAV:"/>
                     <getcontentlength xmlns="DAV:"/>
                     <resourcetype xmlns="DAV:"/>
                     <getetag xmlns="DAV:"/>
                     <id xmlns="http://owncloud.org/ns"/>
                 </prop>
              </propfind>';
     $request = new Sabre\HTTP\Request(array('REQUEST_METHOD' => 'PROPFIND', 'REQUEST_URI' => '/remote.php/webdav/' . Tinebase_Core::getUser()->accountDisplayName, 'HTTP_DEPTH' => '0'));
     $request->setBody($body);
     $this->server->httpRequest = $request;
     $this->server->exec();
     //var_dump($this->response->body);
     $this->assertEquals('HTTP/1.1 207 Multi-Status', $this->response->status);
     $responseDoc = new DOMDocument();
     $responseDoc->loadXML($this->response->body);
     //$responseDoc->formatOutput = true; echo $responseDoc->saveXML();
     $xpath = new DomXPath($responseDoc);
     $xpath->registerNamespace('owncloud', 'http://owncloud.org/ns');
     $nodes = $xpath->query('//d:multistatus/d:response/d:propstat/d:prop/owncloud:id');
     $this->assertEquals(1, $nodes->length, $responseDoc->saveXML());
     $this->assertNotEmpty($nodes->item(0)->nodeValue, $responseDoc->saveXML());
 }
开发者ID:hernot,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:30,代码来源:OwnCloudTest.php

示例10: testServerGetParameter

 /**
  * test general functionality of Tinebase_Server_Plugin_WebDAV
  */
 public function testServerGetParameter()
 {
     $request = \Zend\Http\PhpEnvironment\Request::fromString("POST /index.php?frontend=webdav HTTP/1.1\r\n" . "Host: localhost\r\n" . "Depth: 0\r\n" . "User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120824 Thunderbird/15.0 Lightning/1.7");
     $request->setQuery(new Zend\Stdlib\Parameters(array('frontend' => 'webdav')));
     $server = Tinebase_Core::getDispatchServer($request);
     $this->assertInstanceOf('Tinebase_Server_WebDAV', $server);
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:10,代码来源:WebDAVTests.php

示例11: update_0

 /**
  * update to 5.1
  *  - move task status to key field config
  */
 public function update_0()
 {
     $tasksAppId = Tinebase_Application::getInstance()->getApplicationByName('Tasks')->getId();
     // remove status_id keys
     $this->_backend->dropForeignKey('tasks', 'tasks::status_id--tasks_status::id');
     $this->_backend->dropIndex('tasks', 'status_id');
     // need to replace all NULL values first
     $this->_db->update(SQL_TABLE_PREFIX . 'tasks', array('status_id' => 1), "`status_id` IS NULL");
     // alter status_id -> status
     $declaration = new Setup_Backend_Schema_Field_Xml('
         <field>
             <name>status</name>
             <type>text</type>
             <length>40</length>
             <default>NEEDS-ACTION</default>
             <notnull>true</notnull>
         </field>');
     $this->_backend->alterCol('tasks', $declaration, 'status_id');
     // get all current status datas and drop old status table
     $stmt = $this->_db->query("SELECT * FROM `" . SQL_TABLE_PREFIX . "tasks_status`");
     $statusDatas = $stmt->fetchAll(Zend_Db::FETCH_ASSOC);
     $this->_backend->dropTable('tasks_status', $tasksAppId);
     // update task table
     $statusMap = array();
     // oldId => newId
     foreach ($statusDatas as $statusData) {
         $statusMap[$statusData['id']] = $statusData['status_name'];
         $this->_db->update(SQL_TABLE_PREFIX . 'tasks', array('status' => $statusData['status_name']), "`status` = '{$statusData['id']}'");
     }
     // create status config
     $cb = new Tinebase_Backend_Sql(array('modelName' => 'Tinebase_Model_Config', 'tableName' => 'config'));
     $tasksStatusConfig = array('name' => Tasks_Config::TASK_STATUS, 'records' => array(array('id' => 'NEEDS-ACTION', 'value' => 'No response', 'is_open' => 1, 'icon' => 'images/oxygen/16x16/actions/mail-mark-unread-new.png', 'system' => true), array('id' => 'COMPLETED', 'value' => 'Completed', 'is_open' => 0, 'icon' => 'images/oxygen/16x16/actions/ok.png', 'system' => true), array('id' => 'CANCELLED', 'value' => 'Cancelled', 'is_open' => 0, 'icon' => 'images/oxygen/16x16/actions/dialog-cancel.png', 'system' => true), array('id' => 'IN-PROCESS', 'value' => 'In process', 'is_open' => 1, 'icon' => 'images/oxygen/16x16/actions/view-refresh.png', 'system' => true)));
     // add non system custom status
     foreach ($statusDatas as $statusData) {
         if (!in_array($statusData['status_name'], array('NEEDS-ACTION', 'COMPLETED', 'CANCELLED', 'IN-PROCESS'))) {
             $tasksStatusConfig['records'][] = array('id' => $statusData['status_name'], 'value' => $statusData['status_name'], 'is_open' => $statusData['status_is_open'], 'icon' => $statusData['status_icon']);
         }
     }
     $cb->create(new Tinebase_Model_Config(array('application_id' => $tasksAppId, 'name' => Tasks_Config::TASK_STATUS, 'value' => json_encode($tasksStatusConfig))));
     // update persistent filters
     $stmt = $this->_db->query("SELECT * FROM `" . SQL_TABLE_PREFIX . "filter` WHERE " . "`application_id` = '" . $tasksAppId . "' AND " . "`model` = 'Tasks_Model_TaskFilter'");
     $pfiltersDatas = $stmt->fetchAll(Zend_Db::FETCH_ASSOC);
     foreach ($pfiltersDatas as $pfilterData) {
         $filtersData = Zend_Json::decode($pfilterData['filters']);
         foreach ($filtersData as &$filterData) {
             if (array_key_exists('field', $filterData) && $filterData['field'] == 'status_id') {
                 $filterData['field'] = 'status';
                 $newStatusIds = array();
                 foreach ((array) $filterData['value'] as $oldStatusId) {
                     $newStatusIds[] = $statusMap[$oldStatusId];
                 }
                 $filterData['value'] = is_array($filterData['value']) ? $newStatusIds : $newStatusIds[0];
                 Tinebase_Core::getLogger()->ERR(print_r($filterData, TRUE));
             }
         }
         $this->_db->update(SQL_TABLE_PREFIX . 'filter', array('filters' => Zend_Json::encode($filtersData)), "`id` LIKE '{$pfilterData['id']}'");
     }
     $this->setTableVersion('tasks', '4');
     $this->setApplicationVersion('Tasks', '5.1');
 }
开发者ID:rodrigofns,项目名称:ExpressoLivre3,代码行数:64,代码来源:Release5.php

示例12: testGetProperties

 /**
  * test testGetProperties method
  */
 public function testGetProperties()
 {
     $body = '<?xml version="1.0" encoding="utf-8"?>
              <propfind xmlns="DAV:">
                 <prop>
                     <default-alarm-vevent-date xmlns="urn:ietf:params:xml:ns:caldav"/>
                     <default-alarm-vevent-datetime xmlns="urn:ietf:params:xml:ns:caldav"/>
                     <default-alarm-vtodo-date xmlns="urn:ietf:params:xml:ns:caldav"/>
                     <default-alarm-vtodo-datetime xmlns="urn:ietf:params:xml:ns:caldav"/>
                 </prop>
              </propfind>';
     $request = new Sabre\HTTP\Request(array('REQUEST_METHOD' => 'PROPFIND', 'REQUEST_URI' => '/calendars/' . Tinebase_Core::getUser()->contact_id, 'HTTP_DEPTH' => '0'));
     $request->setBody($body);
     $this->server->httpRequest = $request;
     $this->server->exec();
     //var_dump($this->response->body);
     $this->assertEquals('HTTP/1.1 207 Multi-Status', $this->response->status);
     $responseDoc = new DOMDocument();
     $responseDoc->loadXML($this->response->body);
     //$responseDoc->formatOutput = true; echo $responseDoc->saveXML();
     $xpath = new DomXPath($responseDoc);
     $xpath->registerNamespace('cal', 'urn:ietf:params:xml:ns:caldav');
     $nodes = $xpath->query('//d:multistatus/d:response/d:propstat/d:prop/cal:default-alarm-vevent-datetime');
     $this->assertEquals(1, $nodes->length, $responseDoc->saveXML());
     $this->assertNotEmpty($nodes->item(0)->nodeValue, $responseDoc->saveXML());
     $nodes = $xpath->query('//d:multistatus/d:response/d:propstat/d:prop/cal:default-alarm-vevent-date');
     $this->assertEquals(1, $nodes->length, $responseDoc->saveXML());
     $this->assertNotEmpty($nodes->item(0)->nodeValue, $responseDoc->saveXML());
     $nodes = $xpath->query('//d:multistatus/d:response/d:propstat/d:prop/cal:default-alarm-vtodo-datetime');
     $this->assertEquals(1, $nodes->length, $responseDoc->saveXML());
     $this->assertNotEmpty($nodes->item(0)->nodeValue, $responseDoc->saveXML());
     $nodes = $xpath->query('//d:multistatus/d:response/d:propstat/d:prop/cal:default-alarm-vtodo-date');
     $this->assertEquals(1, $nodes->length, $responseDoc->saveXML());
     $this->assertNotEmpty($nodes->item(0)->nodeValue, $responseDoc->saveXML());
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:38,代码来源:PluginDefaultAlarmsTest.php

示例13: inspectSetPassword

 /**
  * inspect set password
  * 
  * @param string   $_userId
  * @param string   $_password
  * @param boolean  $_encrypt
  * @param boolean  $_mustChange
  * @param array    $_ldapData    the data to be written to ldap
  */
 public function inspectSetPassword($_userId, $_password, $_encrypt, $_mustChange, array &$_ldapData)
 {
     if ($_encrypt !== true) {
         Tinebase_Core::getLogger()->crit(__METHOD__ . '::' . __LINE__ . ' can not transform crypted password into nt/lm samba password. Make sure to reset password for user ' . $_userId);
     } else {
         $_ldapData['sambantpassword'] = Tinebase_User_Abstract::encryptPassword($_password, Tinebase_User_Abstract::ENCRYPT_NTPASSWORD);
         $_ldapData['sambalmpassword'] = array();
         if ($_mustChange === true) {
             $_ldapData['sambapwdmustchange'] = '1';
             $_ldapData['sambapwdcanchange'] = '1';
             $_ldapData['sambapwdlastset'] = array();
         } else {
             if ($_mustChange === false) {
                 $_ldapData['sambapwdmustchange'] = '2147483647';
                 $_ldapData['sambapwdcanchange'] = '1';
                 $_ldapData['sambapwdlastset'] = Tinebase_DateTime::now()->getTimestamp();
             } else {
                 if ($_mustChange === null && $_userId instanceof Tinebase_Model_FullUser && isset($_userId->sambaSAM) && isset($_userId->sambaSAM->pwdMustChange) && isset($_userId->sambaSAM->pwdCanChange)) {
                     $_ldapData['sambapwdmustchange'] = $_userId->sambaSAM->pwdMustChange->getTimestamp();
                     $_ldapData['sambapwdcanchange'] = $_userId->sambaSAM->pwdCanChange->getTimestamp();
                     $_ldapData['sambapwdlastset'] = array();
                 }
             }
         }
     }
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:35,代码来源:Samba.php

示例14: initFramework

 /**
  * init the test frameworks
  *
  */
 public function initFramework()
 {
     Setup_Core::initFramework();
     //$this->getConfig();
     Tinebase_Core::startCoreSession();
     Tinebase_Core::set('frameworkInitialized', true);
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:11,代码来源:TestServer.php

示例15: fromTine20Model

 /**
  * converts Addressbook_Model_Contact to vcard
  * 
  * @param  Addressbook_Model_Contact  $_record
  * @return string
  */
 public function fromTine20Model(Tinebase_Record_Abstract $_record)
 {
     if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) {
         Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' contact ' . print_r($_record->toArray(), true));
     }
     // initialize vcard object
     $card = $this->_fromTine20ModelRequiredFields($_record);
     $card->add('TEL', $_record->tel_work, array('TYPE' => 'WORK'));
     $card->add('TEL', $_record->tel_home, array('TYPE' => 'HOME'));
     $card->add('TEL', $_record->tel_cell, array('TYPE' => 'CELL'));
     $card->add('TEL', $_record->tel_fax, array('TYPE' => 'FAX'));
     $card->add('TEL', $_record->tel_pager, array('TYPE' => 'PAGER'));
     $card->add('ADR', array(null, $_record->adr_one_street2, $_record->adr_one_street, $_record->adr_one_locality, $_record->adr_one_region, $_record->adr_one_postalcode, $_record->adr_one_countryname), array('TYPE' => 'WORK'));
     $card->add('ADR', array(null, $_record->adr_two_street2, $_record->adr_two_street, $_record->adr_two_locality, $_record->adr_two_region, $_record->adr_two_postalcode, $_record->adr_two_countryname), array('TYPE' => 'HOME'));
     $card->add('EMAIL', $_record->email, array('TYPE' => 'WORK'));
     $card->add('EMAIL', $_record->email_home, array('TYPE' => 'HOME'));
     $card->add('URL', $_record->url, array('TYPE' => 'WORK'));
     $card->add('URL', $_record->url_home, array('TYPE' => 'HOME'));
     $card->add('NOTE', $_record->note);
     $this->_fromTine20ModelAddBirthday($_record, $card);
     $this->_fromTine20ModelAddPhoto($_record, $card);
     $this->_fromTine20ModelAddGeoData($_record, $card);
     $this->_fromTine20ModelAddCategories($_record, $card);
     if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) {
         Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' card ' . $card->serialize());
     }
     return $card;
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:34,代码来源:Sogo.php


注:本文中的Tinebase_Core类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。