/** * Returns array with tabular data. */ function getTables() { $actual = $this->read($this->_logRecord); $current = $this->readCurrentState($this->_filesystemState); $keys = array_keys($actual); $data = array(); foreach ($keys as $k) { $row = array(); $row[] = '<b>' . $this->_decorateWord($k) . '</b>'; if ($k == 'size') { if (!empty($actual[$k])) { $actual[$k] = JD_Log_Helper::formatSize($actual[$k]); } if (!empty($current[$k])) { $current[$k] = JD_Log_Helper::formatSize($current[$k]); } } elseif (in_array($k, array('ctime', 'mtime'))) { if (!empty($actual[$k])) { $actual[$k] = JD_Log_Helper::formatDate($actual[$k]); } if (!empty($current[$k])) { $current[$k] = JD_Log_Helper::formatDate($current[$k]); } } if (empty($actual[$k])) { $row[] = ' '; } else { $row[] = $actual[$k]; } if (empty($current[$k])) { if ($current) { $row[] = ' '; } } else { $row[] = $current[$k]; } $data[] = $row; } if (count($data)) { $toAdd = array(' ', '<b>' . JText::_('Current') . '</b>'); if (!empty($this->_filesystemState)) { $toAdd[] = '<b>' . JText::_('Last Scan') . '</b>'; } array_unshift($data, $toAdd); } unset($this->_logRecord->url); // unset($this->_logRecord->status); return array($data); }