aboutsummaryrefslogtreecommitdiff
path: root/mod/blog
diff options
context:
space:
mode:
Diffstat (limited to 'mod/blog')
-rw-r--r--mod/blog/actions/blog/auto_save_revision.php2
-rw-r--r--mod/blog/actions/blog/save.php4
-rw-r--r--mod/blog/lib/blog.php12
-rw-r--r--mod/blog/views/default/blog/sidebar/archives.php2
-rw-r--r--mod/blog/views/default/blog/sidebar/tagcloud.php2
5 files changed, 11 insertions, 11 deletions
diff --git a/mod/blog/actions/blog/auto_save_revision.php b/mod/blog/actions/blog/auto_save_revision.php
index d400dda90..86812c6d3 100644
--- a/mod/blog/actions/blog/auto_save_revision.php
+++ b/mod/blog/actions/blog/auto_save_revision.php
@@ -6,7 +6,7 @@
*/
$guid = get_input('guid');
-$user = get_loggedin_user();
+$user = elgg_get_logged_in_user_entity();
$title = get_input('title');
$description = get_input('description');
$excerpt = get_input('excerpt');
diff --git a/mod/blog/actions/blog/save.php b/mod/blog/actions/blog/save.php
index 4e6e9133b..dbbe25e04 100644
--- a/mod/blog/actions/blog/save.php
+++ b/mod/blog/actions/blog/save.php
@@ -11,7 +11,7 @@
// store errors to pass along
$error = FALSE;
$error_forward_url = REFERER;
-$user = get_loggedin_user();
+$user = elgg_get_logged_in_user_entity();
// edit or create a new entity
$guid = get_input('guid');
@@ -146,7 +146,7 @@ if (!$error) {
// @todo do we want to alert on updates?
if ($new_post && $blog->status == 'published') {
- add_to_river('river/object/blog/create', 'create', get_loggedin_userid(), $blog->getGUID());
+ add_to_river('river/object/blog/create', 'create', elgg_get_logged_in_user_guid(), $blog->getGUID());
}
if ($blog->status == 'published') {
forward($blog->getURL());
diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php
index 3a8985026..5e2cc7c52 100644
--- a/mod/blog/lib/blog.php
+++ b/mod/blog/lib/blog.php
@@ -67,7 +67,7 @@ function blog_get_page_content_list($container_guid = NULL) {
//'order_by_metadata' => array('name'=>'publish_date', 'direction'=>'DESC', 'as'=>'int')
);
- $loggedin_userid = get_loggedin_userid();
+ $loggedin_userid = elgg_get_logged_in_user_guid();
if ($container_guid) {
$options['container_guid'] = $container_guid;
$container = get_entity($container_guid);
@@ -90,7 +90,7 @@ function blog_get_page_content_list($container_guid = NULL) {
if (elgg_instanceof($container, 'group')) {
$return['filter'] = '';
- if ($container->isMember(get_loggedin_user())) {
+ if ($container->isMember(elgg_get_logged_in_user_entity())) {
$url = "pg/blog/add/$container->guid";
$params = array(
'href' => $url,
@@ -108,7 +108,7 @@ function blog_get_page_content_list($container_guid = NULL) {
// show all posts for admin or users looking at their own blogs
// show only published posts for other users.
- if (!(isadminloggedin() || (isloggedin() && $container_guid == $loggedin_userid))) {
+ if (!(elgg_is_admin_logged_in() || (elgg_is_logged_in() && $container_guid == $loggedin_userid))) {
$options['metadata_name_value_pairs'] = array(
array('name' => 'status', 'value' => 'published'),
//array('name' => 'publish_date', 'operand' => '<', 'value' => time())
@@ -162,7 +162,7 @@ function blog_get_page_content_friends($user_guid) {
// admin / owners can see any posts
// everyone else can only see published posts
- if (!(isadminloggedin() || (isloggedin() && $owner_guid == get_loggedin_userid()))) {
+ if (!(elgg_is_admin_logged_in() || (elgg_is_logged_in() && $owner_guid == elgg_get_logged_in_user_guid()))) {
if ($upper > $now) {
$upper = $now;
}
@@ -222,7 +222,7 @@ function blog_get_page_content_archive($owner_guid, $lower = 0, $upper = 0) {
// admin / owners can see any posts
// everyone else can only see published posts
- if (!(isadminloggedin() || (isloggedin() && $owner_guid == get_loggedin_userid()))) {
+ if (!(elgg_is_admin_logged_in() || (elgg_is_logged_in() && $owner_guid == elgg_get_logged_in_user_guid()))) {
if ($upper > $now) {
$upper = $now;
}
@@ -321,7 +321,7 @@ function blog_get_page_content_edit($page, $guid = 0, $revision = NULL) {
}
} else {
if (!$guid) {
- $container = get_loggedin_user();
+ $container = elgg_get_logged_in_user_entity();
} else {
$container = get_entity($guid);
}
diff --git a/mod/blog/views/default/blog/sidebar/archives.php b/mod/blog/views/default/blog/sidebar/archives.php
index 477e1261e..bd74500ca 100644
--- a/mod/blog/views/default/blog/sidebar/archives.php
+++ b/mod/blog/views/default/blog/sidebar/archives.php
@@ -3,7 +3,7 @@
* Blog archives
*/
-$loggedin_user = get_loggedin_user();
+$loggedin_user = elgg_get_logged_in_user_entity();
$page_owner = elgg_get_page_owner_entity();
// This is a limitation of the URL schema.
diff --git a/mod/blog/views/default/blog/sidebar/tagcloud.php b/mod/blog/views/default/blog/sidebar/tagcloud.php
index f1ef7ffdb..70c454390 100644
--- a/mod/blog/views/default/blog/sidebar/tagcloud.php
+++ b/mod/blog/views/default/blog/sidebar/tagcloud.php
@@ -3,7 +3,7 @@
* Blog tag cloud
*/
-$loggedin_user = get_loggedin_user();
+$loggedin_user = elgg_get_logged_in_user_entity();
$page_owner = elgg_get_page_owner_entity();
if ($page_owner && $vars['page'] != 'friends') {