aboutsummaryrefslogtreecommitdiff
path: root/views/json
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-08-31 19:05:21 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-08-31 19:05:21 +0000
commitc5cc2821311012a8a4385a304a043c4b41f2afbb (patch)
tree3703351e4b5d56905eb52547d6129ffa14cb2a32 /views/json
parent775a5f08c501acc565c69659022bc31052677485 (diff)
downloadelgg-c5cc2821311012a8a4385a304a043c4b41f2afbb.tar.gz
elgg-c5cc2821311012a8a4385a304a043c4b41f2afbb.tar.bz2
All line endings are now Unix-style.
git-svn-id: https://code.elgg.org/elgg/trunk@3451 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/json')
-rw-r--r--views/json/api/output.php6
-rw-r--r--views/json/canvas/default.php4
-rw-r--r--views/json/export/entity.php8
-rw-r--r--views/json/export/metadata.php4
-rw-r--r--views/json/export/relationship.php4
-rw-r--r--views/json/messages/exceptions/exception.php4
-rw-r--r--views/json/page_elements/contentwrapper.php8
-rw-r--r--views/json/pageshells/pageshell.php16
-rw-r--r--views/json/river/item/list.php96
9 files changed, 75 insertions, 75 deletions
diff --git a/views/json/api/output.php b/views/json/api/output.php
index eeea0400e..94aaaae60 100644
--- a/views/json/api/output.php
+++ b/views/json/api/output.php
@@ -13,8 +13,8 @@
$result = $vars['result'];
$export = $result->export();
- // echo json_encode($export);
- global $jsonexport;
- $jsonexport['api'][] = $export;
+ // echo json_encode($export);
+ global $jsonexport;
+ $jsonexport['api'][] = $export;
?> \ No newline at end of file
diff --git a/views/json/canvas/default.php b/views/json/canvas/default.php
index 3aab42f49..4978b00e7 100644
--- a/views/json/canvas/default.php
+++ b/views/json/canvas/default.php
@@ -8,8 +8,8 @@
* @author Curverider Ltd
* @link http://elgg.org/
*/
-
-
+
+
global $jsonexport;
?> \ No newline at end of file
diff --git a/views/json/export/entity.php b/views/json/export/entity.php
index 9eeec770f..8c253d9b0 100644
--- a/views/json/export/entity.php
+++ b/views/json/export/entity.php
@@ -9,16 +9,16 @@
* @link http://elgg.org/
*/
- $entity = $vars['entity'];
+ $entity = $vars['entity'];
$export = new stdClass;
$exportable_values = $entity->getExportableValues();
foreach ($exportable_values as $v)
- $export->$v = $entity->$v;
-
+ $export->$v = $entity->$v;
+
$export->url = $entity->getURL();
-
+
global $jsonexport;
$jsonexport[$entity->getType()][$entity->getSubtype()][] = $export;
?> \ No newline at end of file
diff --git a/views/json/export/metadata.php b/views/json/export/metadata.php
index 01df5567e..10aceb9df 100644
--- a/views/json/export/metadata.php
+++ b/views/json/export/metadata.php
@@ -16,8 +16,8 @@
foreach ($exportable_values as $v)
$export->$v = $m->$v;
-
- global $jsonexport;
+
+ global $jsonexport;
$jsonexport['metadata'][] = $entity;
// echo json_encode($export);
?> \ No newline at end of file
diff --git a/views/json/export/relationship.php b/views/json/export/relationship.php
index 07b7e3b0e..dd1adb4d8 100644
--- a/views/json/export/relationship.php
+++ b/views/json/export/relationship.php
@@ -18,7 +18,7 @@
foreach ($exportable_values as $v)
$export->$v = $r->$v;
- global $jsonexport;
- $jsonexport['relationships'][] = $export;
+ global $jsonexport;
+ $jsonexport['relationships'][] = $export;
?> \ No newline at end of file
diff --git a/views/json/messages/exceptions/exception.php b/views/json/messages/exceptions/exception.php
index 3a5888af4..6255f08a6 100644
--- a/views/json/messages/exceptions/exception.php
+++ b/views/json/messages/exceptions/exception.php
@@ -13,7 +13,7 @@
$export = $vars['object'];
- global $jsonexport;
- $jsonexport['exceptions'][] = $export;
+ global $jsonexport;
+ $jsonexport['exceptions'][] = $export;
?> \ No newline at end of file
diff --git a/views/json/page_elements/contentwrapper.php b/views/json/page_elements/contentwrapper.php
index 640dd8104..15397d552 100644
--- a/views/json/page_elements/contentwrapper.php
+++ b/views/json/page_elements/contentwrapper.php
@@ -1,5 +1,5 @@
-<?php
-
- echo $vars['body'];
-
+<?php
+
+ echo $vars['body'];
+
?> \ No newline at end of file
diff --git a/views/json/pageshells/pageshell.php b/views/json/pageshells/pageshell.php
index ca1f41a28..2d2526e38 100644
--- a/views/json/pageshells/pageshell.php
+++ b/views/json/pageshells/pageshell.php
@@ -8,14 +8,14 @@
* @link http://elgg.org/
*
*/
-
- if(stristr($_SERVER["HTTP_ACCEPT"],"application/json")) {
- header("Content-Type: application/json");
- } else {
- header("Content-Type: application/javascript");
+
+ if(stristr($_SERVER["HTTP_ACCEPT"],"application/json")) {
+ header("Content-Type: application/json");
+ } else {
+ header("Content-Type: application/javascript");
}
- // echo $vars['body'];
-
- global $jsonexport;
+ // echo $vars['body'];
+
+ global $jsonexport;
echo json_encode($jsonexport);
?> \ No newline at end of file
diff --git a/views/json/river/item/list.php b/views/json/river/item/list.php
index 8ab836f0a..149212135 100644
--- a/views/json/river/item/list.php
+++ b/views/json/river/item/list.php
@@ -1,49 +1,49 @@
-<?php
-
- global $jsonexport;
- if (isset($vars['items']) && is_array($vars['items'])) {
-
- $i = 0;
- if (!empty($vars['items']))
- foreach($vars['items'] as $item) {
-
- // echo elgg_view_river_item($item);
- if (elgg_view_exists($item->view,'default')) {
- $body = elgg_view($item->view,array(
- 'item' => $item
- ),false,false,'default');
- $time = date("r",$item->posted);
- if ($entity = get_entity($item->object_guid)) {
- $url = htmlspecialchars($entity->getURL());
- } else {
- $url = $vars['url'];
- }
- $title = strip_tags($body);
-
- $jsonitem = $item;
- $jsonitem->url = $url;
- $jsonitem->description = autop($body);
- $jsonitem->title = $title;
- unset($jsonitem->view);
-
- if ($subject = get_entity($item->subject_guid)) {
- elgg_view_entity($subject);
- }
- if ($object = get_entity($item->object_guid)) {
- elgg_view_entity($object);
- }
-
- $jsonexport['activity'][] = $jsonitem;
-
- }
-
- $i++;
- if ($i >= $vars['limit']) break;
-
- }
-
- }
- echo "!";
-
-
+<?php
+
+ global $jsonexport;
+ if (isset($vars['items']) && is_array($vars['items'])) {
+
+ $i = 0;
+ if (!empty($vars['items']))
+ foreach($vars['items'] as $item) {
+
+ // echo elgg_view_river_item($item);
+ if (elgg_view_exists($item->view,'default')) {
+ $body = elgg_view($item->view,array(
+ 'item' => $item
+ ),false,false,'default');
+ $time = date("r",$item->posted);
+ if ($entity = get_entity($item->object_guid)) {
+ $url = htmlspecialchars($entity->getURL());
+ } else {
+ $url = $vars['url'];
+ }
+ $title = strip_tags($body);
+
+ $jsonitem = $item;
+ $jsonitem->url = $url;
+ $jsonitem->description = autop($body);
+ $jsonitem->title = $title;
+ unset($jsonitem->view);
+
+ if ($subject = get_entity($item->subject_guid)) {
+ elgg_view_entity($subject);
+ }
+ if ($object = get_entity($item->object_guid)) {
+ elgg_view_entity($object);
+ }
+
+ $jsonexport['activity'][] = $jsonitem;
+
+ }
+
+ $i++;
+ if ($i >= $vars['limit']) break;
+
+ }
+
+ }
+ echo "!";
+
+
?> \ No newline at end of file