aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-05-18 23:51:31 +0000
committerCash Costello <cash.costello@gmail.com>2009-05-18 23:51:31 +0000
commit718a5bffa4902f712f9cf9923172a0c1dc641d70 (patch)
tree40d7d7a5622cbfd295384f7ea13189fff4ceba22
parent1074834100d5191ecb9a6aa02a532fae485f9378 (diff)
downloadelgg-718a5bffa4902f712f9cf9923172a0c1dc641d70.tar.gz
elgg-718a5bffa4902f712f9cf9923172a0c1dc641d70.tar.bz2
added some defines to make the code easier to understand
-rw-r--r--actions/addalbum.php2
-rw-r--r--actions/upload.php4
-rw-r--r--start.php8
3 files changed, 10 insertions, 4 deletions
diff --git a/actions/addalbum.php b/actions/addalbum.php
index 329ebee48..909f04c9f 100644
--- a/actions/addalbum.php
+++ b/actions/addalbum.php
@@ -53,7 +53,7 @@
}
// we catch the adding images to new albums in the upload action and throw a river new album event
- $album->new_album = 1;
+ $album->new_album = TP_NEW_ALBUM;
// Success message
diff --git a/actions/upload.php b/actions/upload.php
index c37ce2b94..78d4b7889 100644
--- a/actions/upload.php
+++ b/actions/upload.php
@@ -231,10 +231,10 @@
// successful upload so check if this is a new album and throw river event if so
$album = get_entity($container_guid);
- if ($album->new_album == 1) {
+ if ($album->new_album == TP_NEW_ALBUM) {
if (function_exists('add_to_river'))
add_to_river('river/object/album/create', 'create', $album->owner_guid, $album->guid);
- $album->new_album = 0;
+ $album->new_album = TP_OLD_ALBUM;
}
// plugins can register to be told when a Tidypics album has had images added
trigger_elgg_event('upload', 'tp_album', $album);
diff --git a/start.php b/start.php
index 4a50c5092..6c22df63b 100644
--- a/start.php
+++ b/start.php
@@ -4,13 +4,19 @@
*
*/
+ // set some simple defines
+ define('TP_OLD_ALBUM', 0);
+ define('TP_NEW_ALBUM', 1);
+
+
// setup tidypics settings object
global $CONFIG;
if (!isset($CONFIG->tidypics))
$CONFIG->tidypics = new stdClass;
include dirname(__FILE__) . "/settings.php";
-
+
+
/**
* tidypics plugin initialisation functions.
*/