diff options
author | cash <cash.costello@gmail.com> | 2011-12-23 15:20:57 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-12-23 15:20:57 -0500 |
commit | c0f3b8d03f260c5ab83289bdf4c7cf6a6c5aa6a6 (patch) | |
tree | d408643823a0a1372765c7ff79ff69061248a1bb /mod/blog/start.php | |
parent | 23a912aa6678bb16f866b01c175b8e73e7bf417d (diff) | |
download | elgg-c0f3b8d03f260c5ab83289bdf4c7cf6a6c5aa6a6.tar.gz elgg-c0f3b8d03f260c5ab83289bdf4c7cf6a6c5aa6a6.tar.bz2 |
Fixes #4179 not setting excerpt if none set
Diffstat (limited to 'mod/blog/start.php')
-rw-r--r-- | mod/blog/start.php | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/mod/blog/start.php b/mod/blog/start.php index 4b825fc1f..53a4dcadf 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -234,7 +234,7 @@ function blog_ecml_views_hook($hook, $entity_type, $return_value, $params) { * Upgrade from 1.7 to 1.8. */ function blog_run_upgrades($event, $type, $details) { - $blog_upgrade_version = get_plugin_setting('upgrade_version', 'blogs'); + $blog_upgrade_version = elgg_get_plugin_setting('upgrade_version', 'blogs'); if (!$blog_upgrade_version) { // When upgrading, check if the ElggBlog class has been registered as this @@ -243,24 +243,6 @@ function blog_run_upgrades($event, $type, $details) { add_subtype('object', 'blog', 'ElggBlog'); } - // only run this on the first migration to 1.8 - // add excerpt to all blogs that don't have it. - $ia = elgg_set_ignore_access(true); - $options = array( - 'type' => 'object', - 'subtype' => 'blog', - 'limit' => 0, - ); - - $blogs = new ElggBatch('elgg_get_entities', $options); - foreach ($blogs as $blog) { - if (!$blog->excerpt) { - $blog->excerpt = elgg_get_excerpt($blog->description); - } - } - - elgg_set_ignore_access($ia); - elgg_set_plugin_setting('upgrade_version', 1, 'blogs'); } } |