mirror of https://github.com/MISP/MISP
chg: [internal] Install CakePHP by Composer
parent
c6bf55cc73
commit
74eccfe919
|
@ -1,7 +1,3 @@
|
||||||
[submodule "app/Lib/cakephp"]
|
|
||||||
path = app/Lib/cakephp
|
|
||||||
url = https://github.com/cakephp/cakephp.git
|
|
||||||
branch = 2.x
|
|
||||||
[submodule "PyMISP"]
|
[submodule "PyMISP"]
|
||||||
path = PyMISP
|
path = PyMISP
|
||||||
url = https://github.com/MISP/PyMISP.git
|
url = https://github.com/MISP/PyMISP.git
|
||||||
|
|
|
@ -3,30 +3,45 @@
|
||||||
/**
|
/**
|
||||||
* Command-line code generation utility to automate programmer chores.
|
* Command-line code generation utility to automate programmer chores.
|
||||||
*
|
*
|
||||||
* PHP 5
|
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||||
*
|
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
|
||||||
* Copyright 2005-2012, Cake Software Foundation, Inc.
|
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
|
* For full copyright and license information, please see the LICENSE.txt
|
||||||
* Redistributions of files must retain the above copyright notice.
|
* Redistributions of files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||||
* @link http://cakephp.org CakePHP(tm) Project
|
* @link https://cakephp.org CakePHP(tm) Project
|
||||||
* @package app.Console
|
* @package app.Console
|
||||||
* @since CakePHP(tm) v 2.0
|
* @since CakePHP(tm) v 2.0
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license https://opensource.org/licenses/mit-license.php MIT License
|
||||||
*/
|
*/
|
||||||
$ds = DIRECTORY_SEPARATOR;
|
|
||||||
$dispatcher = dirname(__DIR__) . $ds . 'Lib' . $ds . 'cakephp' . $ds . 'lib' . $ds . 'Cake' . $ds . 'Console' . $ds . 'ShellDispatcher.php';
|
if (!defined('DS')) {
|
||||||
if (function_exists('ini_set')) {
|
define('DS', DIRECTORY_SEPARATOR);
|
||||||
$root = dirname(dirname(dirname(__FILE__)));
|
|
||||||
ini_set('include_path', $root . $ds . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!include ($dispatcher)) {
|
$dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php';
|
||||||
trigger_error('Could not locate CakePHP core files.', E_USER_ERROR);
|
|
||||||
|
if (function_exists('ini_set')) {
|
||||||
|
$root = dirname(dirname(dirname(__FILE__)));
|
||||||
|
$appDir = basename(dirname(dirname(__FILE__)));
|
||||||
|
$install = $root . DS . 'lib';
|
||||||
|
$composerInstall = $root . DS . $appDir . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
|
||||||
|
|
||||||
|
// the following lines differ from its sibling
|
||||||
|
// /lib/Cake/Console/Templates/skel/Console/cake.php
|
||||||
|
if (file_exists($composerInstall . DS . $dispatcher)) {
|
||||||
|
$install = $composerInstall;
|
||||||
|
}
|
||||||
|
|
||||||
|
ini_set('include_path', $install . PATH_SEPARATOR . ini_get('include_path'));
|
||||||
|
unset($root, $appDir, $install, $composerInstall);
|
||||||
}
|
}
|
||||||
unset($paths, $path, $dispatcher, $root, $ds);
|
|
||||||
|
if (!include $dispatcher) {
|
||||||
|
trigger_error('Could not locate CakePHP core files.', E_USER_ERROR);
|
||||||
|
}
|
||||||
|
unset($dispatcher);
|
||||||
|
|
||||||
return ShellDispatcher::run($argv);
|
return ShellDispatcher::run($argv);
|
||||||
|
|
|
@ -476,7 +476,7 @@ class SecurityAudit
|
||||||
*/
|
*/
|
||||||
private function getCakeVersion()
|
private function getCakeVersion()
|
||||||
{
|
{
|
||||||
$filePath = APP . 'Lib/cakephp/lib/Cake/VERSION.txt';
|
$filePath = CAKE_CORE_INCLUDE_PATH . '/Cake/VERSION.txt';
|
||||||
$version = file_get_contents($filePath);
|
$version = file_get_contents($filePath);
|
||||||
if (!$version) {
|
if (!$version) {
|
||||||
throw new RuntimeException("Could not open CakePHP version file '$filePath'.");
|
throw new RuntimeException("Could not open CakePHP version file '$filePath'.");
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit cf14e6546ec44e3369e3531add11fdb946656280
|
|
|
@ -9,6 +9,7 @@
|
||||||
"ext-dom": "*",
|
"ext-dom": "*",
|
||||||
"ext-simplexml": "*",
|
"ext-simplexml": "*",
|
||||||
"ext-pcre": "*",
|
"ext-pcre": "*",
|
||||||
|
"cakephp/cakephp": "2.10.24",
|
||||||
"kamisama/cake-resque": "4.1.2",
|
"kamisama/cake-resque": "4.1.2",
|
||||||
"pear/crypt_gpg": "1.6.3",
|
"pear/crypt_gpg": "1.6.3",
|
||||||
"monolog/monolog": "1.24.0"
|
"monolog/monolog": "1.24.0"
|
||||||
|
|
|
@ -56,7 +56,17 @@ if (!defined('APP_DIR')) {
|
||||||
*
|
*
|
||||||
* Leaving this constant undefined will result in it being defined in Cake/bootstrap.php
|
* Leaving this constant undefined will result in it being defined in Cake/bootstrap.php
|
||||||
*/
|
*/
|
||||||
define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . APP_DIR . DS .'Lib' . DS . 'cakephp' . DS . 'lib');
|
// define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . APP_DIR . DS .'Lib' . DS . 'cakephp' . DS . 'lib');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This auto-detects CakePHP as a composer installed library.
|
||||||
|
* You may remove this if you are not planning to use composer (not recommended, though).
|
||||||
|
*/
|
||||||
|
$vendorPath = ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
|
||||||
|
$dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php';
|
||||||
|
if (!defined('CAKE_CORE_INCLUDE_PATH') && file_exists($vendorPath . DS . $dispatcher)) {
|
||||||
|
define('CAKE_CORE_INCLUDE_PATH', $vendorPath);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Editing below this line should NOT be necessary.
|
* Editing below this line should NOT be necessary.
|
||||||
|
|
Loading…
Reference in New Issue