aboutsummaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-07-13 22:23:52 -0400
committerCash Costello <cash.costello@gmail.com>2012-07-13 22:23:52 -0400
commit54bc5844dfe6cb684c7aecaf1be5ee8071d98fe0 (patch)
tree90f4166d6cd605eb4d7e95d63682732a1c5476a5 /classes
parent695651451b262c526d6aaf9d0988ce557ff50e95 (diff)
parent894ea6758f3f99c49807df99ef4bbd95f74273dc (diff)
downloadelgg-54bc5844dfe6cb684c7aecaf1be5ee8071d98fe0.tar.gz
elgg-54bc5844dfe6cb684c7aecaf1be5ee8071d98fe0.tar.bz2
Merged notifications update from Brett's fork
Diffstat (limited to 'classes')
-rw-r--r--classes/TidypicsAlbum.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/classes/TidypicsAlbum.php b/classes/TidypicsAlbum.php
index e04344a6b..d069117bf 100644
--- a/classes/TidypicsAlbum.php
+++ b/classes/TidypicsAlbum.php
@@ -38,6 +38,10 @@ class TidypicsAlbum extends ElggObject {
$this->new_album = true;
}
+ if (!isset($this->last_notified)) {
+ $this->last_notified = 0;
+ }
+
if (!parent::save()) {
return false;
}
@@ -268,6 +272,15 @@ class TidypicsAlbum extends ElggObject {
}
/**
+ * Has enough time elapsed between the last_notified and notify_interval setting?
+ *
+ * @return bool
+ */
+ public function shouldNotify() {
+ return time() - $this->last_notified > elgg_get_plugin_setting('notify_interval', 'tidypics');
+ }
+
+ /**
* Delete all the images in this album
*/
protected function deleteImages() {