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

Last change on this file since 20323 was 20323, checked in by mistic100, 11 years ago

fix redirect error, provide 3 sizes of icons, display login info on register page

File size: 669 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      'identification_icon' => '38px',
14      'menubar_icon' => '26px',
15      ));
16 
17    conf_update_param('oauth', $oauth_default_config);
18    $conf['oauth'] = $oauth_default_config;
19  }
20 
21  $result = pwg_query('SHOW COLUMNS FROM `'.USERS_TABLE.'` LIKE "oauth_id";');
22  if (!pwg_db_num_rows($result))
23  {     
24    pwg_query('ALTER TABLE `' . USERS_TABLE . '` ADD `oauth_id` VARCHAR(255) DEFAULT NULL;');
25  }
26}
27
28?>
Note: See TracBrowser for help on using the repository browser.