src/Resources/contao/classes/Backup.php
/**
	 * This function prepares data which is needed by the template $strTemplate.
	 * The data has to be stored as properties of $this->Template.
	 **/
This function prepares data which is needed by the template $strTemplate.
The data has to be stored as properties of $this->Template.
This function prepares data which is needed by the template $strTemplate . The data has to be stored as properties of $this - > Template .
protected function compile() {
		$this->Template->referer = \Input::get('ref');
		$this->Template->exportReady = $this->checkExportFile();
		$this->Template->importReady = $this->checkImportFile();
		$this->Template->importAnalysis = $this->importGrabAnalysis();
		if ($this->Template->importReady['ts']) {
			$this->Template->importReadyMoment = sprintf(
				$GLOBALS['TL_LANG']['tl_isobackup']['import-timestamp-date'],
				date('r', $this->Template->importReady['ts'])
			);
			$diff = time() - $this->Template->importReady['ts'];
			if ($diff <= 120) {
				$this->Template->importReadyMoment = sprintf($GLOBALS['TL_LANG']['tl_isobackup']['import-timestamp-seconds'], $diff);
			}
			else if ($diff <= 120 * 60) {
				$this->Template->importReadyMoment = sprintf($GLOBALS['TL_LANG']['tl_isobackup']['import-timestamp-minutes'], floor($diff / 60));
			}
			else if ($diff <= 48 * 3600) {
				$this->Template->importReadyMoment = sprintf($GLOBALS['TL_LANG']['tl_isobackup']['import-timestamp-hours'], floor($diff / 3600));
			}
			else if ($diff <= 14 * 86400) {
				$this->Template->importReadyMoment = sprintf($GLOBALS['TL_LANG']['tl_isobackup']['import-timestamp-days'], floor($diff / 86400));
			}
		}
		if (!$this->Template->lexA) {
			$this->Template->lexA = "compile";
		}
		else {
			$this->Template->lexA .= ",compile";
		}
	}
protected function compile ( ) { $ this -> Template -> referer = \ Input :: get ( 'ref' ) ; $ this -> Template -> exportReady = $ this -> checkExportFile ( ) ; $ this -> Template -> importReady = $ this -> checkImportFile ( ) ; $ this -> Template -> importAnalysis = $ this -> importGrabAnalysis ( ) ; if ( $ this -> Template -> importReady [ 'ts' ] ) { $ this -> Template -> importReadyMoment = sprintf ( $ GLOBALS [ 'TL_LANG' ] [ 'tl_isobackup' ] [ 'import-timestamp-date' ] , date ( 'r' , $ this -> Template -> importReady [ 'ts' ] ) ) ; $ diff = time ( ) - $ this -> Template -> importReady [ 'ts' ] ; if ( $ diff <= 120 ) { $ this -> Template -> importReadyMoment = sprintf ( $ GLOBALS [ 'TL_LANG' ] [ 'tl_isobackup' ] [ 'import-timestamp-seconds' ] , $ diff ) ; } else if ( $ diff <= 120 * 60 ) { $ this -> Template -> importReadyMoment = sprintf ( $ GLOBALS [ 'TL_LANG' ] [ 'tl_isobackup' ] [ 'import-timestamp-minutes' ] , floor ( $ diff / 60 ) ) ; } else if ( $ diff <= 48 * 3600 ) { $ this -> Template -> importReadyMoment = sprintf ( $ GLOBALS [ 'TL_LANG' ] [ 'tl_isobackup' ] [ 'import-timestamp-hours' ] , floor ( $ diff / 3600 ) ) ; } else if ( $ diff <= 14 * 86400 ) { $ this -> Template -> importReadyMoment = sprintf ( $ GLOBALS [ 'TL_LANG' ] [ 'tl_isobackup' ] [ 'import-timestamp-days' ] , floor ( $ diff / 86400 ) ) ; } } if ( ! $ this -> Template -> lexA ) { $ this -> Template -> lexA = " compile " ; } else { $ this -> Template -> lexA .= " ,compile " ; } }
This function prepares data which is needed by the template $strTemplate.
This function prepares data which is needed by the template $strTemplate .