00001 <?php 00002 /* SVN FILE: $Id: vendors.php 7805 2008-10-30 17:30:26Z AD7six $ */ 00003 /** 00004 * Short description for file. 00005 * 00006 * This file includes js vendor-files from /vendor/ directory if they need to 00007 * be accessible to the public. 00008 * 00009 * PHP versions 4 and 5 00010 * 00011 * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) 00012 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) 00013 * 00014 * Licensed under The MIT License 00015 * Redistributions of files must retain the above copyright notice. 00016 * 00017 * @filesource 00018 * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) 00019 * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project 00020 * @package cake 00021 * @subpackage cake.app.webroot.js 00022 * @since CakePHP(tm) v 0.2.9 00023 * @version $Revision: 7805 $ 00024 * @modifiedby $LastChangedBy: AD7six $ 00025 * @lastmodified $Date: 2008-10-30 13:30:26 -0400 (Thu, 30 Oct 2008) $ 00026 * @license http://www.opensource.org/licenses/mit-license.php The MIT License 00027 */ 00028 /** 00029 * Enter description here... 00030 */ 00031 if (isset($_GET['file'])) { 00032 $file = $_GET['file']; 00033 $pos = strpos($file, '..'); 00034 if ($pos === false) { 00035 if (is_file('../../vendors/javascript/'.$file) && (preg_match('/(\/.+)\\.js/', $file))) { 00036 readfile('../../vendors/javascript/'.$file); 00037 return; 00038 } 00039 } 00040 } 00041 header('HTTP/1.1 404 Not Found'); 00042 ?>
1.4.7