From b9904a5eee0601866ea3efaab024a16c6c03f771 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Fri, 10 May 2013 19:59:54 +0200 Subject: [PATCH] properly use BASEPATH in global config, created shared file for crons --- cronjobs/findblock.php | 14 ++-------- cronjobs/shared.inc.php | 32 +++++++++++++++++++++++ public/include/autoloader.inc.php | 14 +++++----- public/include/config/global.inc.dist.php | 2 +- 4 files changed, 42 insertions(+), 20 deletions(-) create mode 100644 cronjobs/shared.inc.php diff --git a/cronjobs/findblock.php b/cronjobs/findblock.php index e313db57..9794ff26 100644 --- a/cronjobs/findblock.php +++ b/cronjobs/findblock.php @@ -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; diff --git a/cronjobs/shared.inc.php b/cronjobs/shared.inc.php new file mode 100644 index 00000000..70744716 --- /dev/null +++ b/cronjobs/shared.inc.php @@ -0,0 +1,32 @@ +