- Fix include path
- Add hack protection - check for smarty cache path
This commit is contained in:
parent
d154d41ee3
commit
75578dbf0c
2 changed files with 8 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue