-
-
Notifications
You must be signed in to change notification settings - Fork 406
/
upgrade43.php
50 lines (40 loc) · 1.44 KB
/
upgrade43.php
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/**
* MyBB 1.8
* Copyright 2014 MyBB Group, All Rights Reserved
*
* Website: http://www.mybb.com
* License: http://www.mybb.com/about/license
*
*/
/**
* Upgrade Script: 1.8.15
*/
$upgrade_detail = array(
"revert_all_templates" => 0,
"revert_all_themes" => 0,
"revert_all_settings" => 0
);
@set_time_limit(0);
function upgrade43_dbchanges()
{
global $output, $mybb, $db, $cache;
$output->print_header("Updating Database");
echo "<p>Performing necessary upgrade queries...</p>";
flush();
$db->update_query('settings', array('optionscode' => 'numeric\r\nmin=0'), "name IN ('avatarsize', 'loginattemptstimeout', 'maxattachments', 'maxmultipagelinks', 'maxpolloptions')");
$db->update_query('settings', array('optionscode' => 'select\r\n0=No CAPTCHA\r\n1=MyBB Default CAPTCHA\r\n4=NoCAPTCHA reCAPTCHA\r\n5=reCAPTCHA invisible'), "name='captchaimage'");
if($mybb->settings['captchaimage'] == 2)
{
$db->update_query('settings', array('value' => 1), "name='captchaimage'"); // Reset CAPTCHA to MyBB Default
$db->update_query('settings', "value=''", 'name IN (\'captchapublickey\', \'captchaprivatekey\''); // Clean out stored credential keys
}
if($db->field_exists('aim', 'users'))
{
$db->drop_column('users', 'aim');
}
$db->delete_query("settings", "name='allowaimfield'");
$cache->delete("mybb_credits");
$output->print_contents("<p>Click next to continue with the upgrade process.</p>");
$output->print_footer("43_done");
}