aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/upgrades/2011031400-1.8_svn-oauth_api-8f33ee79c3e66222.php
blob: 98c00f50611398a0a02e9c7571c23254d9bfb1ef (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
<?php
/**
 * Elgg 1.8-svn upgrade 2011031400
 * oauth_api
 *
 * Switches oauth_lib to oauth_api
 */

// make sure we have the latest plugin objects.
elgg_generate_plugin_entities();

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

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

if ($old->isActive()) {
	$old->deactivate();
	$new->activate();
}

$old->delete();