diff options
author | tcitworld <tcit@tcit.fr> | 2014-07-17 15:34:55 +0200 |
---|---|---|
committer | tcitworld <tcit@tcit.fr> | 2014-07-17 15:34:55 +0200 |
commit | d259f73665170d2c54771d3726d7a150c8317c34 (patch) | |
tree | b68b0a5f4fd12eaef57b051860536c9d49569cc1 /inc/3rdparty/FlattrItem.class.php | |
parent | 4e067ceabd705201a16b4c92cf4b23f3b990326c (diff) | |
download | wallabag-d259f73665170d2c54771d3726d7a150c8317c34.tar.gz wallabag-d259f73665170d2c54771d3726d7a150c8317c34.tar.zst wallabag-d259f73665170d2c54771d3726d7a150c8317c34.zip |
camelCase for FlattrItem class
Diffstat (limited to 'inc/3rdparty/FlattrItem.class.php')
-rw-r--r-- | inc/3rdparty/FlattrItem.class.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/inc/3rdparty/FlattrItem.class.php b/inc/3rdparty/FlattrItem.class.php index 5cf9e5fc..97c92fd3 100644 --- a/inc/3rdparty/FlattrItem.class.php +++ b/inc/3rdparty/FlattrItem.class.php | |||
@@ -11,13 +11,13 @@ | |||
11 | class FlattrItem | 11 | class FlattrItem |
12 | { | 12 | { |
13 | public $status; | 13 | public $status; |
14 | public $urltoflattr; | 14 | public $urlToFlattr; |
15 | public $flattrItemURL; | 15 | public $flattrItemURL; |
16 | public $numflattrs; | 16 | public $numFlattrs; |
17 | 17 | ||
18 | public function checkItem($urltoflattr, $id) | 18 | public function checkItem($urlToFlattr, $id) |
19 | { | 19 | { |
20 | $this->_cacheflattrfile($urltoflattr, $id); | 20 | $this->_cacheflattrfile($urlToFlattr, $id); |
21 | $flattrResponse = file_get_contents(CACHE . "/flattr/".$id.".cache"); | 21 | $flattrResponse = file_get_contents(CACHE . "/flattr/".$id.".cache"); |
22 | if($flattrResponse != FALSE) { | 22 | if($flattrResponse != FALSE) { |
23 | $result = json_decode($flattrResponse); | 23 | $result = json_decode($flattrResponse); |
@@ -29,7 +29,7 @@ class FlattrItem | |||
29 | elseif (is_object($result) && $result->link) { | 29 | elseif (is_object($result) && $result->link) { |
30 | $this->status = FLATTRED; | 30 | $this->status = FLATTRED; |
31 | $this->flattrItemURL = $result->link; | 31 | $this->flattrItemURL = $result->link; |
32 | $this->numflattrs = $result->flattrs; | 32 | $this->numFlattrs = $result->flattrs; |
33 | } | 33 | } |
34 | else { | 34 | else { |
35 | $this->status = NOT_FLATTRABLE; | 35 | $this->status = NOT_FLATTRABLE; |
@@ -40,7 +40,7 @@ class FlattrItem | |||
40 | } | 40 | } |
41 | } | 41 | } |
42 | 42 | ||
43 | private function _cacheflattrfile($urltoflattr, $id) | 43 | private function _cacheFlattrFile($urlToFlattr, $id) |
44 | { | 44 | { |
45 | if (!is_dir(CACHE . '/flattr')) { | 45 | if (!is_dir(CACHE . '/flattr')) { |
46 | mkdir(CACHE . '/flattr', 0777); | 46 | mkdir(CACHE . '/flattr', 0777); |
@@ -48,10 +48,10 @@ class FlattrItem | |||
48 | 48 | ||
49 | // if a cache flattr file for this url already exists and it's been less than one day than it have been updated, see in /cache | 49 | // if a cache flattr file for this url already exists and it's been less than one day than it have been updated, see in /cache |
50 | if ((!file_exists(CACHE . "/flattr/".$id.".cache")) || (time() - filemtime(CACHE . "/flattr/".$id.".cache") > 86400)) { | 50 | if ((!file_exists(CACHE . "/flattr/".$id.".cache")) || (time() - filemtime(CACHE . "/flattr/".$id.".cache") > 86400)) { |
51 | $askForFlattr = Tools::getFile(FLATTR_API . $urltoflattr); | 51 | $askForFlattr = Tools::getFile(FLATTR_API . $urlToFlattr); |
52 | $flattrCacheFile = fopen(CACHE . "/flattr/".$id.".cache", 'w+'); | 52 | $flattrCacheFile = fopen(CACHE . "/flattr/".$id.".cache", 'w+'); |
53 | fwrite($flattrCacheFile, $askForFlattr); | 53 | fwrite($flattrCacheFile, $askForFlattr); |
54 | fclose($flattrCacheFile); | 54 | fclose($flattrCacheFile); |
55 | } | 55 | } |
56 | } | 56 | } |
57 | } \ No newline at end of file | 57 | } |