- Fix include path

- Add hack protection
- check for smarty cache path
This commit is contained in:
Matthias Gutjahr 2014-04-23 20:38:27 +02:00
parent d154d41ee3
commit 75578dbf0c
2 changed files with 8 additions and 1 deletions

View file

@ -1,5 +1,9 @@
<?php
if (IN_serendipity !== true) {
die ("Don't hack!");
}
@serendipity_plugin_api::load_language(dirname(__FILE__));
/**
@ -238,6 +242,9 @@ class serendipity_event_lsrstopper extends serendipity_event
protected function getCacheFilename($url)
{
global $serendipity;
if (!defined('PATH_SMARTY_COMPILE')) {
return '';
}
return $serendipity['serendipityPath'] . '/' . PATH_SMARTY_COMPILE . '/lsrstopper/' . md5($url);
}

View file

@ -1,7 +1,7 @@
<?php
require_once S9Y_INCLUDE_PATH . 'tests/plugins/PluginTest.php';
require_once S9Y_INCLUDE_PATH . 'plugins/serendipity_event_lsrstopper/serendipity_event_lsrstopper.php';
require_once S9Y_INCLUDE_PATH . 'plugins/additional_plugins/serendipity_event_lsrstopper/serendipity_event_lsrstopper.php';
/**
* Class serendipity_event_lsrstopperTest