forked from friendica/friendica-addons
use friendica temppath settings for cache data
This commit is contained in:
parent
867f48aebe
commit
02b29b2a6a
1 changed files with 2 additions and 1 deletions
|
@ -32,12 +32,13 @@ function curweather_uninstall() {
|
||||||
// The caching mechanism is taken from the cache example of the
|
// The caching mechanism is taken from the cache example of the
|
||||||
// OpenWeatherMap-PHP-API library and a bit customized to allow admins to set
|
// OpenWeatherMap-PHP-API library and a bit customized to allow admins to set
|
||||||
// the caching time depending on the plans they got from openweathermap.org
|
// the caching time depending on the plans they got from openweathermap.org
|
||||||
|
// and the usage of the friendica temppath
|
||||||
|
|
||||||
class ExampleCache extends AbstractCache
|
class ExampleCache extends AbstractCache
|
||||||
{
|
{
|
||||||
private function urlToPath($url)
|
private function urlToPath($url)
|
||||||
{
|
{
|
||||||
$tmp = sys_get_temp_dir();
|
$tmp = get_config('system','temppath');
|
||||||
$dir = $tmp . DIRECTORY_SEPARATOR . "OpenWeatherMapPHPAPI";
|
$dir = $tmp . DIRECTORY_SEPARATOR . "OpenWeatherMapPHPAPI";
|
||||||
if (!is_dir($dir)) {
|
if (!is_dir($dir)) {
|
||||||
mkdir($dir);
|
mkdir($dir);
|
||||||
|
|
Loading…
Reference in a new issue