Skip to content

Commit

Permalink
chore: deprecated function use
Browse files Browse the repository at this point in the history
  • Loading branch information
jeabakker committed Aug 18, 2015
1 parent 03c1838 commit e59e23e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion actions/pages/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
));
if ($children) {
$db_prefix = elgg_get_config('dbprefix');
$subtype_id = (int)get_subtype_id('object', 'page_top');
$subtype_id = (int) get_subtype_id('object', 'page_top');
$newentity_cache = is_memcache_available() ? new ElggMemcache('new_entity_cache') : null;

foreach ($children as $child) {
Expand Down
7 changes: 6 additions & 1 deletion actions/pages/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,12 @@
system_message(elgg_echo("pages:saved"));

if ($new_page && !$page->unpublished) {
add_to_river("river/object/page/create", "create", $user->getGUID(), $page->getGUID());
elgg_create_river_item(array(
'view' => 'river/object/page/create',
'action_type' => 'create',
'subject_guid' => $user->getGUID(),
'object_guid' => $page->getGUID(),
));
} elseif ($page->getOwnerGUID() != $user->getGUID()) {
// not the owner edited the page, notify the owner
$subject = elgg_echo("pages_tools:notify:edit:subject", array($page->title));
Expand Down
7 changes: 6 additions & 1 deletion lib/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,12 @@ function pages_tools_daily_cron_hook($hook, $type, $return_value, $params) {
if (!empty($entities)) {
foreach ($entities as $entity) {
// add river event
add_to_river("river/object/page/create", "create", $entity->getOwner(), $entity->getGUID());
elgg_create_river_item(array(
'view' => 'river/object/page/create',
'action_type' => 'create',
'subject_guid' => $entity->getOwnerGUID(),
'object_guid' => $entity->getGUID(),
));

// set time created
$entity->time_created = $time;
Expand Down

0 comments on commit e59e23e

Please sign in to comment.