diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-19 03:05:45 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-19 03:05:45 +0000 |
commit | e0ef12b0954d085fa0620e2414ceb24e88121c12 (patch) | |
tree | 399d78e796a4dc79535322e0d66e3c3e2e62b4fa /mod/blog | |
parent | 2dd0ecb8e13c48da7872a650d03a3aa006838aa9 (diff) | |
download | elgg-e0ef12b0954d085fa0620e2414ceb24e88121c12.tar.gz elgg-e0ef12b0954d085fa0620e2414ceb24e88121c12.tar.bz2 |
Fixes #2428 last of the $CONFIG removals. Anything missed can be individual tickets
git-svn-id: http://code.elgg.org/elgg/trunk@8305 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog')
-rw-r--r-- | mod/blog/lib/blog.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index 6ab51ccbd..7fa1b9c5b 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -407,15 +407,16 @@ function blog_prepare_form_vars($post = NULL, $revision = NULL) { * @return array */ function blog_get_blog_months($user_guid = NULL, $container_guid = NULL) { - global $CONFIG; + + $db_prefix = elgg_get_config('dbprefix'); $subtype = get_subtype_id('object', 'blog'); $q = "SELECT DISTINCT EXTRACT(YEAR_MONTH FROM FROM_UNIXTIME(mdv.string)) AS yearmonth - FROM {$CONFIG->dbprefix}entities e, {$CONFIG->dbprefix}metadata, {$CONFIG->dbprefix}metastrings mdn, {$CONFIG->dbprefix}metastrings mdv - WHERE e.guid = {$CONFIG->dbprefix}metadata.entity_guid - AND {$CONFIG->dbprefix}metadata.name_id = mdn.id - AND {$CONFIG->dbprefix}metadata.value_id = mdv.id + FROM {$db_prefix}entities e, {$db_prefix}metadata, {$db_prefix}metastrings mdn, {$db_prefix}metastrings mdv + WHERE e.guid = {$db_prefix}metadata.entity_guid + AND {$db_prefix}metadata.name_id = mdn.id + AND {$db_prefix}metadata.value_id = mdv.id AND mdn.string = 'publish_date'"; if ($user_guid) { |