Merge pull request #5 from TheSerapher/include-fixes
properly use BASEPATH in global config, created shared file for crons
This commit is contained in:
commit
0d4e5ff237
@ -18,18 +18,8 @@ limitations under the License.
|
||||
|
||||
*/
|
||||
|
||||
// MODIFY THIS
|
||||
// We need to find our include files so set this properly
|
||||
define("BASEPATH", "../public/");
|
||||
|
||||
// Our security check
|
||||
define("SECURITY", 1);
|
||||
|
||||
// Include our configuration (holding defines for the requires)
|
||||
require_once(BASEPATH . '/include/config/global.inc.php');
|
||||
|
||||
// We include all needed files here, even though our templates could load them themself
|
||||
require_once(BASEPATH . INCLUDE_DIR . '/autoloader.inc.php');
|
||||
// Include all settings and classes
|
||||
require_once('shared.inc.php');
|
||||
|
||||
// Fetch our last block found from the DB as a starting point
|
||||
$strLastBlockHash = $block->getLast()->blockhash;
|
||||
|
||||
32
cronjobs/shared.inc.php
Normal file
32
cronjobs/shared.inc.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|
||||
Copyright:: 2013, Sebastian Grewe
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
*/
|
||||
|
||||
// MODIFY THIS
|
||||
// We need to find our include files so set this properly
|
||||
define("BASEPATH", "../public/");
|
||||
|
||||
// Our security check
|
||||
define("SECURITY", 1);
|
||||
|
||||
// Include our configuration (holding defines for the requires)
|
||||
require_once(BASEPATH . '/include/config/global.inc.php');
|
||||
|
||||
// We include all needed files here, even though our templates could load them themself
|
||||
require_once(BASEPATH . INCLUDE_DIR . '/autoloader.inc.php');
|
||||
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
require_once(BASEPATH . CLASS_DIR . '/debug.class.php');
|
||||
require_once(BASEPATH . CLASS_DIR . '/bitcoin.class.php');
|
||||
require_once(BASEPATH . INCLUDE_DIR . '/database.inc.php');
|
||||
require_once(BASEPATH . INCLUDE_DIR . '/smarty.inc.php');
|
||||
require_once(CLASS_DIR . '/debug.class.php');
|
||||
require_once(CLASS_DIR . '/bitcoin.class.php');
|
||||
require_once(INCLUDE_DIR . '/database.inc.php');
|
||||
require_once(INCLUDE_DIR . '/smarty.inc.php');
|
||||
// Load classes that need the above as dependencies
|
||||
require_once(BASEPATH . CLASS_DIR . '/user.class.php');
|
||||
require_once(BASEPATH . CLASS_DIR . '/block.class.php');
|
||||
require_once(BASEPATH . CLASS_DIR . '/settings.class.php');
|
||||
require_once(CLASS_DIR . '/user.class.php');
|
||||
require_once(CLASS_DIR . '/block.class.php');
|
||||
require_once(CLASS_DIR . '/settings.class.php');
|
||||
|
||||
@ -7,7 +7,7 @@ if (!defined('SECURITY'))
|
||||
define('THEME', 'mmcFE');
|
||||
|
||||
// Our include directory for additional features
|
||||
define('INCLUDE_DIR', 'include');
|
||||
define('INCLUDE_DIR', BASEPATH . 'include');
|
||||
|
||||
// Our class directory
|
||||
define('CLASS_DIR', INCLUDE_DIR . '/classes');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user