Example #1
0
 /**
  * set/get modlog active
  *
  * @param  boolean optional
  * @return boolean
  */
 public function modlogActive()
 {
     if (!$this->_backend) {
         throw new Tinebase_Exception_NotFound('Backend not defined');
     }
     $currValue = $this->_backend->getModlogActive();
     if (func_num_args() === 1) {
         $paramValue = (bool) func_get_arg(0);
         if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) {
             Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' Resetting modlog active to ' . (int) $paramValue);
         }
         $this->_backend->setModlogActive($paramValue);
     }
     return $currValue;
 }
 /**
  * set/get modlog active
  *
  * @param  boolean $setTo
  * @return bool
  * @throws Tinebase_Exception_NotFound
  */
 public function modlogActive($setTo = NULL)
 {
     if (!$this->_backend) {
         throw new Tinebase_Exception_NotFound('Backend not defined');
     }
     $currValue = $this->_backend->getModlogActive();
     if (NULL !== $setTo) {
         $setTo = (bool) $setTo;
         if (Tinebase_Core::isLogLevel(Zend_Log::TRACE)) {
             Tinebase_Core::getLogger()->trace(__METHOD__ . '::' . __LINE__ . ' Resetting modlog active to ' . (int) $setTo);
         }
         $this->_backend->setModlogActive($setTo);
         $this->_omitModLog = !$setTo;
     }
     return $currValue;
 }