source: extensions/oAuth/include/install.inc.php @ 20293

Last change on this file since 20293 was 20293, checked in by mistic100, 12 years ago

first commit of oAuth plugin, still in developpement

File size: 598 bytes
Line 
1<?php
2defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
3
4function oauth_install() 
5{
6  global $conf;
7 
8  if (empty($conf['oauth']))
9  {
10    $oauth_default_config = serialize(array(
11      'display_menubar' => true,
12      'display_register' => true,
13      ));
14 
15    conf_update_param('oauth', $oauth_default_config);
16    $conf['oauth'] = $oauth_default_config;
17  }
18 
19  $result = pwg_query('SHOW COLUMNS FROM `'.USERS_TABLE.'` LIKE "oauth_id";');
20  if (!pwg_db_num_rows($result))
21  {     
22    pwg_query('ALTER TABLE `' . USERS_TABLE . '` ADD `oauth_id` VARCHAR(255) DEFAULT NULL;');
23  }
24}
25
26?>
Note: See TracBrowser for help on using the repository browser.