| 1 |
lars |
1 |
<?php
|
|
|
2 |
/* SVN FILE: $Id: vendors.php 7945 2008-12-19 02:16:01Z gwoo $ */
|
|
|
3 |
/**
|
|
|
4 |
* Short description for file.
|
|
|
5 |
*
|
|
|
6 |
* This file includes js vendor-files from /vendor/ directory if they need to
|
|
|
7 |
* be accessible to the public.
|
|
|
8 |
*
|
|
|
9 |
* PHP versions 4 and 5
|
|
|
10 |
*
|
|
|
11 |
* CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
|
|
|
12 |
* Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
|
|
13 |
*
|
|
|
14 |
* Licensed under The MIT License
|
|
|
15 |
* Redistributions of files must retain the above copyright notice.
|
|
|
16 |
*
|
|
|
17 |
* @filesource
|
|
|
18 |
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
|
|
19 |
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
|
|
|
20 |
* @package cake
|
|
|
21 |
* @subpackage cake.app.webroot.js
|
|
|
22 |
* @since CakePHP(tm) v 0.2.9
|
|
|
23 |
* @version $Revision: 7945 $
|
|
|
24 |
* @modifiedby $LastChangedBy: gwoo $
|
|
|
25 |
* @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 2008) $
|
|
|
26 |
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
|
|
27 |
*/
|
|
|
28 |
/**
|
|
|
29 |
* Enter description here...
|
|
|
30 |
*/
|
|
|
31 |
if (isset($_GET['file'])) {
|
|
|
32 |
$file = $_GET['file'];
|
|
|
33 |
$pos = strpos($file, '..');
|
|
|
34 |
if ($pos === false) {
|
|
|
35 |
if (is_file('../../vendors/javascript/'.$file) && (preg_match('/(\/.+)\\.js/', $file))) {
|
|
|
36 |
readfile('../../vendors/javascript/'.$file);
|
|
|
37 |
return;
|
|
|
38 |
}
|
|
|
39 |
}
|
|
|
40 |
}
|
|
|
41 |
header('HTTP/1.1 404 Not Found');
|
|
|
42 |
?>
|