From: cash Date: Sat, 19 Feb 2011 03:05:45 +0000 (+0000) Subject: Fixes #2428 last of the $CONFIG removals. Anything missed can be individual tickets X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=e0ef12b0954d085fa0620e2414ceb24e88121c12;p=lorea%2Felgg.git 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 --- 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) { diff --git a/mod/thewire/tests/regex.php b/mod/thewire/tests/regex.php index 9e187cf29..5b53c69d6 100644 --- a/mod/thewire/tests/regex.php +++ b/mod/thewire/tests/regex.php @@ -39,13 +39,15 @@ class TheWireRegexTest extends ElggCoreUnitTest { } protected function getUserWireLink($username) { - global $CONFIG; - return "wwwroot}pg/thewire/owner/$username\">@$username"; + $url = "pg/thewire/owner/$username"; + $url = elgg_normalize_url($url); + return "@$username"; } protected function getHashtagLink($tag) { - global $CONFIG; - return "wwwroot}pg/thewire/tag/$tag\">#$tag"; + $url = "pg/thewire/tag/$tag"; + $url = elgg_normalize_url($url); + return "#$tag"; } protected function getEmailLink($address) { diff --git a/views/default/admin/plugins/advanced.php b/views/default/admin/plugins/advanced.php index 1c42be14d..6b32035f3 100644 --- a/views/default/admin/plugins/advanced.php +++ b/views/default/admin/plugins/advanced.php @@ -39,8 +39,6 @@ foreach ($installed_plugins as $plugin) { } } -$ts = time(); -$token = generate_action_token($ts); $categories = array_merge(array('' => elgg_echo('admin:plugins:categories:all')), $categories); $category_dropdown = elgg_view('input/dropdown', array( @@ -60,8 +58,10 @@ $category_form = elgg_view('input/form', array( // @todo Until "en/deactivate all" means "All plugins on this page" hide when not looking at all. if (!isset($show_category) || empty($show_category)) { - $activate_url = "{$CONFIG->url}action/admin/plugins/activate_all?__elgg_token=$token&__elgg_ts=$ts"; - $deactivate_url = "{$CONFIG->url}action/admin/plugins/deactivate_all?__elgg_token=$token&__elgg_ts=$ts"; + $activate_url = "action/admin/plugins/activate_all"; + $activate_url = elgg_add_action_tokens_to_url($activate_url); + $deactivate_url = "action/admin/plugins/deactivate_all"; + $deactivate_url = elgg_add_action_tokens_to_url($deactivate_url); $buttons = "
"; $buttons .= "" . elgg_echo('admin:plugins:activate_all') . ' '; diff --git a/views/default/forms/admin/menu/save.php b/views/default/forms/admin/menu/save.php index 2cafaa89b..c55ff3367 100644 --- a/views/default/forms/admin/menu/save.php +++ b/views/default/forms/admin/menu/save.php @@ -4,8 +4,8 @@ */ // get site menu items -global $CONFIG; -$menu = $CONFIG->menus['site']; +$menu = elgg_get_config('menus'); +$menu = $menu['site']; $builder = new ElggMenuBuilder($menu); $menu = $builder->getMenu('name'); $menu_items = $menu['default'];