aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/upgrades/2011031400-1.8_svn-oauth_api-8f33ee79c3e66222.php
blob: e852684811c74b1dfd2feb9e413dc80cc1781862 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/**
 * Elgg 1.8-svn upgrade 2011031400
 * oauth_api
 *
 * Switches oauth_lib to oauth_api
 */

$ia = elgg_set_ignore_access(true);

// make sure we have updated plugins
elgg_generate_plugin_entities();

$show_hidden = access_get_show_hidden_status();
access_show_hidden_entities(true);

$old = elgg_get_plugin_from_id('oauth_lib');
$new = elgg_get_plugin_from_id('oauth_api');

if (!$old || !$new) {
	return true;
}

$old->deactivate();
$old->delete();

elgg_add_admin_notice('oauth_api:disabled', elgg_echo('update:oauth_api:deactivated'));

access_show_hidden_entities($show_hidden);
elgg_set_ignore_access($ia);