outputWritable = $this->status['output']; $this->tempWritable = $this->status['temporary']; $this->status = AEUtilQuirks::get_status(); $this->quirks = AEUtilQuirks::get_quirks(); } /** * Returns the HTML for the backup status cell * * @return string HTML */ public function getStatusCell() { $status = AEUtilQuirks::get_status(); $quirks = AEUtilQuirks::get_quirks(); if($status && empty($quirks)) { $html = '

'.JText::_('STATUS_OK').'

'; } elseif($status && !empty($quirks)) { $html = '

'.JText::_('STATUS_WARNING').'

'; } else { $html = '

'.JText::_('STATUS_ERROR').'

'; } return $html; } /** * render news feed from Akeeba Backup site */ public function getNewsCell() { // Permanent Fix 2.2: Display feed button, powered by FeedBurner :) Ah, at last! $output = ''; $output .= ''; $output .= '
'.JText::_('NEWS_INTRODUCTION').'
'; $output .= << ENDCODE; $output .= '
'; return $output; } /** * Returns HTML for the warnings (status details) * * @return string HTML */ public function getQuirksCell($onlyErrors = false) { $html = ''; $quirks = AEUtilQuirks::get_quirks(); if(!empty($quirks)) { $html = "\n"; } else { $html = '

'.JText::_('QNONE').'

'; } return $html; } /** * Returns a boolean value, indicating if quirks have been detected * @return bool True if there is at least one quirk detected */ public function hasQuirks() { $quirks = AEUtilQuirks::get_quirks(); return !empty($quirks); } /** * Gets the HTML for a single line of the quirks cell, based on quirks settings * * @param array $quirk A quirk definition array */ public function _renderQuirk($quirk, $onlyErrors = false) { if( $onlyErrors && ($quirk['severity'] != 'critical') ) return ''; $quirk['severity'] = $quirk['severity'] == 'critical' ? 'high' : $quirk['severity']; $out = '
  • '.$quirk['description'].''."\n"; return $out; } }