| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/icd/administrator/components/com_akeeba/akeeba/filters/stack/ |
Upload File : |
<?php
/**
* Akeeba Engine
* The modular PHP5 site backup engine
* @copyright Copyright (c)2009-2011 Nicholas K. Dionysopoulos
* @license GNU GPL version 3 or, at your option, any later version
* @package akeebaengine
* @version $Id: dateconditional.php 410 2011-01-24 11:29:01Z nikosdion $
*/
// Protection against direct access
defined('AKEEBAENGINE') or die('Restricted access');
/**
* Date conditional filter
*
* It will only backup files modified after a specific date and time
*/
class AEFilterStackDateconditional extends AEAbstractFilter
{
function __construct()
{
$this->object = 'file';
$this->subtype = 'all';
$this->method = 'api';
}
protected function is_excluded_by_api($test, $root)
{
static $from_datetime;
$config =& AEFactory::getConfiguration();
if(is_null($from_datetime) && $filter_switch)
{
$user_setting = $config->get('core.filters.dateconditional.start');
$from_datetime = strtotime($user_setting);
}
// Get the filesystem path for $root
$fsroot = $config->get('volatile.filesystem.current_root','');
$ds = ($fsroot == '') || ($fsroot == '/') ? '' : DS;
$filename = $fsroot.$ds.$test;
// Get the timestamp of the file
$timestamp = @filemtime($filename);
// If we could not get this information, include the file in the archive
if($timestamp === false) return false;
// Compare it with the user-defined minimum timestamp and exclude if it's older than that
if($timestamp <= $from_datetime) {
return true;
}
// No match? Just include the file!
return false;
}
}