Example #1
0
 /**
  * @param string $internalPath
  * @param int $time
  * @param int $sizeDifference number of bytes the file has grown
  * @return array[] all propagated entries
  */
 public function propagateChange($internalPath, $time, $sizeDifference = 0)
 {
     list($baseFolder) = explode('/', $internalPath, 2);
     if (in_array($baseFolder, $this->ignoredBaseFolders)) {
         return [];
     } else {
         return parent::propagateChange($internalPath, $time, $sizeDifference);
     }
 }
Example #2
0
 * 
 **/
/**
 * This file and others in this project are forked from Box Anemometer, 
 * see https://github.com/box/Anemometer
 * Box Anemometer authors and license are:
 * 
 *   @author Gavin Towey <*****@*****.**> and Geoff Anderson <*****@*****.**>
 *   @license Apache 2.0 license.  See LICENSE document for more info
 * 
 **/
set_include_path(get_include_path() . PATH_SEPARATOR . "./lib");
require "Helpers.php";
require "Propagator.php";
error_reporting(E_WARNING);
$action = isset($_REQUEST['action']) && !empty($_REQUEST['action']) ? $_REQUEST['action'] : 'index';
$conf = array();
include "conf/config.inc.php";
if (empty($conf)) {
    $action = 'noconfig';
}
$controller = new Propagator($conf);
if (!$controller->get_auth_user()) {
    print "Unauthorized access";
    throw new Exception("Unauthorized access");
}
if (is_callable(array($controller, $action))) {
    $controller->{$action}();
} else {
    print "Invalid action ({$action})";
}