Пример #1
0
 protected function _getStatus(KDatabaseRowAbstract $row, $action)
 {
     $status = $row->getStatus();
     // Only log download events for logged in users
     if ($action == 'after.read' && empty($status)) {
         $status = JFactory::getUser()->guest ? null : 'downloaded';
     }
     return $status;
 }
Пример #2
0
 /**
  * Status getter.
  *
  * Loggable support actions other than add, edit and delete. While logging custom actions it may be
  * useful to somehow translate the returned status to something more meaningful.
  *
  * @param KDatabaseRowAbstract       $row
  * @param string                     $action    The command action being executed.
  */
 protected function _getStatus(KDatabaseRowAbstract $row, $action)
 {
     $status = $row->getStatus();
     // Commands may change the original status of an action.
     if ($action == 'after.add' && $status == KDatabase::STATUS_UPDATED) {
         $status = KDatabase::STATUS_CREATED;
     }
     return $status;
 }