From 26b77483ee7545c0e4f8eeb205a5743bf3589adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 12 Jul 2014 16:39:31 +0200 Subject: remove PicoFarad MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I’ll implement it an other day. --- inc/3rdparty/PicoFarad/Request.php | 78 ------------------ inc/3rdparty/PicoFarad/Response.php | 156 ----------------------------------- inc/3rdparty/PicoFarad/Router.php | 157 ------------------------------------ inc/3rdparty/PicoFarad/Session.php | 57 ------------- inc/3rdparty/PicoFarad/Template.php | 36 --------- 5 files changed, 484 deletions(-) delete mode 100644 inc/3rdparty/PicoFarad/Request.php delete mode 100644 inc/3rdparty/PicoFarad/Response.php delete mode 100644 inc/3rdparty/PicoFarad/Router.php delete mode 100644 inc/3rdparty/PicoFarad/Session.php delete mode 100644 inc/3rdparty/PicoFarad/Template.php (limited to 'inc/3rdparty/PicoFarad') diff --git a/inc/3rdparty/PicoFarad/Request.php b/inc/3rdparty/PicoFarad/Request.php deleted file mode 100644 index 46c82bca..00000000 --- a/inc/3rdparty/PicoFarad/Request.php +++ /dev/null @@ -1,78 +0,0 @@ - $_FILES[$field]['name'], - 'mimetype' => $_FILES[$field]['type'], - 'size' => $_FILES[$field]['size'], - ); - } - - return false; -} - - -function file_move($field, $destination) -{ - if (isset($_FILES[$field]) && ! file_exists($destination)) { - @mkdir(dirname($destination), 0777, true); - move_uploaded_file($_FILES[$field]['tmp_name'], $destination); - } -} \ No newline at end of file diff --git a/inc/3rdparty/PicoFarad/Response.php b/inc/3rdparty/PicoFarad/Response.php deleted file mode 100644 index 9114fde0..00000000 --- a/inc/3rdparty/PicoFarad/Response.php +++ /dev/null @@ -1,156 +0,0 @@ - $hosts) { - - if (is_array($hosts)) { - - $acl = ''; - - foreach ($hosts as &$host) { - - if ($host === '*' || $host === 'self' || strpos($host, 'http') === 0) { - $acl .= $host.' '; - } - } - } - else { - - $acl = $hosts; - } - - $values .= $policy.' '.trim($acl).'; '; - } - - header('Content-Security-Policy: '.$values); -} - - -function nosniff() -{ - header('X-Content-Type-Options: nosniff'); -} - - -function xss() -{ - header('X-XSS-Protection: 1; mode=block'); -} - - -function hsts() -{ - header('Strict-Transport-Security: max-age=31536000'); -} - - -function xframe($mode = 'DENY', array $urls = array()) -{ - header('X-Frame-Options: '.$mode.' '.implode(' ', $urls)); -} \ No newline at end of file diff --git a/inc/3rdparty/PicoFarad/Router.php b/inc/3rdparty/PicoFarad/Router.php deleted file mode 100644 index b62b8e2d..00000000 --- a/inc/3rdparty/PicoFarad/Router.php +++ /dev/null @@ -1,157 +0,0 @@ - 'value']); -function load() -{ - if (func_num_args() < 1 || func_num_args() > 2) { - die('Invalid template arguments'); - } - - if (! file_exists(PATH.func_get_arg(0).'.php')) { - die('Unable to load the template: "'.func_get_arg(0).'"'); - } - - if (func_num_args() === 2) { - - if (! is_array(func_get_arg(1))) { - die('Template variables must be an array'); - } - - extract(func_get_arg(1)); - } - - ob_start(); - include PATH.func_get_arg(0).'.php'; - return ob_get_clean(); -} - - -function layout($template_name, array $template_args = array(), $layout_name = 'layout') -{ - return load($layout_name, $template_args + array('content_for_layout' => load($template_name, $template_args))); -} -- cgit v1.2.3