aboutsummaryrefslogtreecommitdiff
path: root/mod/riverdashboard/endpoint
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-25 22:00:44 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-25 22:00:44 +0000
commitc2e2d3ae222a55086bed95d897c6e8c50b066c37 (patch)
tree9039f6be684ab133c13e5f4cb8e36ff37f2aec5a /mod/riverdashboard/endpoint
parentd86408d2662b961645b4ed4cdbd37d5150819cf4 (diff)
downloadelgg-c2e2d3ae222a55086bed95d897c6e8c50b066c37.tar.gz
elgg-c2e2d3ae222a55086bed95d897c6e8c50b066c37.tar.bz2
Converting all line endings to unix style.
git-svn-id: http://code.elgg.org/elgg/trunk@5512 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/riverdashboard/endpoint')
-rw-r--r--mod/riverdashboard/endpoint/ping.php140
1 files changed, 70 insertions, 70 deletions
diff --git a/mod/riverdashboard/endpoint/ping.php b/mod/riverdashboard/endpoint/ping.php
index c5613dd0c..d41128e1f 100644
--- a/mod/riverdashboard/endpoint/ping.php
+++ b/mod/riverdashboard/endpoint/ping.php
@@ -1,70 +1,70 @@
-<?php
-/**
- * Check for new activity.
- * Outputs # of new activity items since $_GET['last_checked'] time
- */
-
-// Load Elgg engine will not include plugins
-require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php");
-
-// check for last checked time
-if (!$seconds_passed = get_input('seconds_passed', 0)) {
- echo '';
- exit;
-}
-
-$last_reload = time() - $seconds_passed;
-
-//grab any new annotations
-$annotations = count_annotations('', '', '', '', '', '', '', $last_reload);
-if(!$annotations)
- $annotations = 0;
-//grab all new objects created
-$entity_creation = elgg_get_entities(array(
- 'count' => TRUE,
- 'created_time_lower' => $last_reload,
- 'wheres' => array('e.type != \'user\'')
-));
-if(!$entity_creation)
- $entity_creation = 0;
-//grab any entities updated
-$entity_update = elgg_get_entities(array(
- 'count' => TRUE,
- 'modified_time_lower' => $last_reload,
- 'wheres' => array('e.type != \'user\'')
-));
-if(!$entity_update)
- $entity_update = 0;
-//get any relationships, such as friending - this is not working quite right yet
-//$relationship_action = elgg_get_entities_from_relationship(array('count' => TRUE));
-//if(!$relationship_action)
-// $relationship_action = 0;
-
-//sum all totals
-$all_activity = $annotations + $entity_creation + $entity_update;
-
-if ($all_activity > 0) {
- $s = ($all_activity == 1) ? '' : 's';
- echo "<a href='' onClick=\"window.location.reload();\" class='update_link'>$all_activity update$s!</a>";
-?>
- <script type="text/javascript">
- $(document).ready(function(){
-
- var pageTitleSubstring;
- var stringStartPosition = document.title.indexOf("]");
-
- if (stringStartPosition == -1) { // we haven't already altered page title
- pageTitleSubstring = document.title;
- } else { // we previously prepended to page title, need to remove it first
- pageTitleSubstring = document.title.substring( (stringStartPosition+2) );
- }
-
- document.title = "[<?php echo $all_activity; ?> update<?php echo $s; ?>] "+pageTitleSubstring;
- });
- </script>
-
-<?php
-} else {
- echo '';
- exit;
-}
+<?php
+/**
+ * Check for new activity.
+ * Outputs # of new activity items since $_GET['last_checked'] time
+ */
+
+// Load Elgg engine will not include plugins
+require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php");
+
+// check for last checked time
+if (!$seconds_passed = get_input('seconds_passed', 0)) {
+ echo '';
+ exit;
+}
+
+$last_reload = time() - $seconds_passed;
+
+//grab any new annotations
+$annotations = count_annotations('', '', '', '', '', '', '', $last_reload);
+if(!$annotations)
+ $annotations = 0;
+//grab all new objects created
+$entity_creation = elgg_get_entities(array(
+ 'count' => TRUE,
+ 'created_time_lower' => $last_reload,
+ 'wheres' => array('e.type != \'user\'')
+));
+if(!$entity_creation)
+ $entity_creation = 0;
+//grab any entities updated
+$entity_update = elgg_get_entities(array(
+ 'count' => TRUE,
+ 'modified_time_lower' => $last_reload,
+ 'wheres' => array('e.type != \'user\'')
+));
+if(!$entity_update)
+ $entity_update = 0;
+//get any relationships, such as friending - this is not working quite right yet
+//$relationship_action = elgg_get_entities_from_relationship(array('count' => TRUE));
+//if(!$relationship_action)
+// $relationship_action = 0;
+
+//sum all totals
+$all_activity = $annotations + $entity_creation + $entity_update;
+
+if ($all_activity > 0) {
+ $s = ($all_activity == 1) ? '' : 's';
+ echo "<a href='' onClick=\"window.location.reload();\" class='update_link'>$all_activity update$s!</a>";
+?>
+ <script type="text/javascript">
+ $(document).ready(function(){
+
+ var pageTitleSubstring;
+ var stringStartPosition = document.title.indexOf("]");
+
+ if (stringStartPosition == -1) { // we haven't already altered page title
+ pageTitleSubstring = document.title;
+ } else { // we previously prepended to page title, need to remove it first
+ pageTitleSubstring = document.title.substring( (stringStartPosition+2) );
+ }
+
+ document.title = "[<?php echo $all_activity; ?> update<?php echo $s; ?>] "+pageTitleSubstring;
+ });
+ </script>
+
+<?php
+} else {
+ echo '';
+ exit;
+}