aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets/feed_reader
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2010-07-04 19:43:29 +0000
committercash <cash.costello@gmail.com>2010-07-04 19:43:29 +0000
commit25581d5c26fb630dad768c82395c73f0e4b8ccf8 (patch)
tree157e5551353aa3cd03653e9abc3fa908d0bb336b /views/default/widgets/feed_reader
parent16da0ce0f606397012c65950b07262fbecb2fc84 (diff)
downloadelgg-25581d5c26fb630dad768c82395c73f0e4b8ccf8.tar.gz
elgg-25581d5c26fb630dad768c82395c73f0e4b8ccf8.tar.bz2
moved cache to data directory for better security
Diffstat (limited to 'views/default/widgets/feed_reader')
-rw-r--r--views/default/widgets/feed_reader/view.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/views/default/widgets/feed_reader/view.php b/views/default/widgets/feed_reader/view.php
index 56bf4482d..a8d589f98 100644
--- a/views/default/widgets/feed_reader/view.php
+++ b/views/default/widgets/feed_reader/view.php
@@ -15,9 +15,12 @@ if ($feed_url) {
$num_items = $vars['entity']->num_items;
$post_date = $vars['entity']->post_date;
- $cache_loc = $CONFIG->pluginspath . '/simplepie/cache';
+ $cache_location = $CONFIG->dataroot . '/simplepie_cache/';
+ if (!file_exists($cache_location)) {
+ mkdir($cache_location, 0777);
+ }
- $feed = new SimplePie($feed_url, $cache_loc);
+ $feed = new SimplePie($feed_url, $cache_location);
// doubles timeout if going through a proxy
//$feed->set_timeout(20);