Zeile 25 | Zeile 25 |
---|
// We need to globalize $db here because when this script is called // during load_module $db is not globalized in the function global $db;
|
// We need to globalize $db here because when this script is called // during load_module $db is not globalized in the function global $db;
|
$collation = $db->build_create_table_collation();
| |
// FIRST STEP IS FOR INTEGER CONVERSION PROJECT
| // FIRST STEP IS FOR INTEGER CONVERSION PROJECT
|
Zeile 52 | Zeile 50 |
---|
"privatemessages" => array("pmid", "includesig","smilieoff"), "profilefields" => array("fid", "required","editable","hidden"), "smilies" => array("sid", "showclickable"),
|
"privatemessages" => array("pmid", "includesig","smilieoff"), "profilefields" => array("fid", "required","editable","hidden"), "smilies" => array("sid", "showclickable"),
|
"usergroups" => array("gid","isbannedgroup","canview","canviewthreads","canviewprofiles","candlattachments","canpostthreads","canpostreplys","canpostattachments","canratethreads","caneditposts","candeleteposts","candeletethreads","caneditattachments","canpostpolls","canvotepolls","canusepms","cansendpms","cantrackpms","candenypmreceipts","cansendemail","canviewmemberlist","canviewcalendar","canviewonline","canviewwolinvis","canviewonlineips","cancp","issupermod","cansearch","canusercp","canuploadavatars","canratemembers","canchangename","showforumteam","usereputationsystem","cangivereputations"),
| "usergroups" => array("gid","isbannedgroup","canview","canviewthreads","canviewprofiles","candlattachments","canpostthreads","canpostreplys","canpostattachments","canratethreads","caneditposts","candeleteposts","candeletethreads","caneditattachments","canpostpolls","canvotepolls","canusepms","cansendpms","cantrackpms","candenypmreceipts","cansendemail","canviewmemberlist","canviewcalendar","canviewonline","canviewwolinvis","canviewonlineips","cancp","issupermod","cansearch","canusercp","canuploadavatars","canratemembers","canchangename","showforumteam","usereputationsystem","cangivereputations","candisplaygroup","cancustomtitle"),
|
"users" => array("uid","allownotices","hideemail","invisible","receivepms","pmpopup","pmnotify","remember","showsigs","showavatars","showquickreply","showredirect","away"), "threads" => array("tid", "closed") );
| "users" => array("uid","allownotices","hideemail","invisible","receivepms","pmpopup","pmnotify","remember","showsigs","showavatars","showquickreply","showredirect","away"), "threads" => array("tid", "closed") );
|
Zeile 268 | Zeile 266 |
---|
echo "<p>Adding longipaddress column to posts table ... "; flush();
|
echo "<p>Adding longipaddress column to posts table ... "; flush();
|
$db->write_query("ALTER TABLE ".TABLE_PREFIX."posts ADD longipaddress int(10) NOT NULL default '0' AFTER ipaddress");
| $db->write_query("ALTER TABLE ".TABLE_PREFIX."posts ADD longipaddress int(11) NOT NULL default '0' AFTER ipaddress");
|
echo "done.</p>"; flush();
| echo "done.</p>"; flush();
|
Zeile 426 | Zeile 424 |
---|
$db->drop_table("promotions"); $db->drop_table("promotionlogs"); $db->drop_table("massemails");
|
$db->drop_table("promotions"); $db->drop_table("promotionlogs"); $db->drop_table("massemails");
|
| $collation = $db->build_create_table_collation();
|
$db->write_query("CREATE TABLE ".TABLE_PREFIX."massemails ( mid int unsigned NOT NULL auto_increment,
| $db->write_query("CREATE TABLE ".TABLE_PREFIX."massemails ( mid int unsigned NOT NULL auto_increment,
|
Zeile 615 | Zeile 615 |
---|
if($db->field_exists('emailnotify', "users")) {
|
if($db->field_exists('emailnotify', "users")) {
|
$db->update_query("users", array('emailnotify' => 1), "emailnotify='no' OR emailnotify='0'");
| $db->update_query("users", array('emailnotify' => 0), "emailnotify='no' OR emailnotify='0'");
|
$db->update_query("users", array('emailnotify' => 2), "emailnotify='yes' OR emailnotify='1'"); $db->update_query("users", array('emailnotify' => 0), "emailnotify != 1 AND emailnotify != 2"); $db->write_query("ALTER TABLE ".TABLE_PREFIX."users CHANGE emailnotify subscriptionmethod int(1) NOT NULL default '0'");
| $db->update_query("users", array('emailnotify' => 2), "emailnotify='yes' OR emailnotify='1'"); $db->update_query("users", array('emailnotify' => 0), "emailnotify != 1 AND emailnotify != 2"); $db->write_query("ALTER TABLE ".TABLE_PREFIX."users CHANGE emailnotify subscriptionmethod int(1) NOT NULL default '0'");
|
Zeile 706 | Zeile 706 |
---|
{ $db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP longregip;"); }
|
{ $db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP longregip;"); }
|
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD longregip int(10) NOT NULL default '0' AFTER lastip");
| $db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD longregip int(11) NOT NULL default '0' AFTER lastip");
|
if($db->field_exists('longlastip', "users")) { $db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP longlastip;"); }
|
if($db->field_exists('longlastip', "users")) { $db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP longlastip;"); }
|
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD longlastip int(10) NOT NULL default '0' AFTER lastip");
| $db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD longlastip int(11) NOT NULL default '0' AFTER lastip");
|
// Unused column if($db->field_exists('titles', "searchlog"))
| // Unused column if($db->field_exists('titles', "searchlog"))
|
Zeile 1147 | Zeile 1147 |
---|
{ $db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP KEY username"); }
|
{ $db->write_query("ALTER TABLE ".TABLE_PREFIX."users DROP KEY username"); }
|
$db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD KEY username (username)");
| $db->write_query("ALTER TABLE ".TABLE_PREFIX."users ADD UNIQUE KEY username (username)");
|
if($db->field_exists('statustime', "privatemessages")) {
| if($db->field_exists('statustime', "privatemessages")) {
|
Zeile 1795 | Zeile 1795 |
---|
else { @fclose($cachewritable);
|
else { @fclose($cachewritable);
|
@my_chmod(MYBB_ROOT.'cache', 0777); @my_chmod(MYBB_ROOT.'cache/test.write', 0777);
| @my_chmod(MYBB_ROOT.'cache', '0777'); @my_chmod(MYBB_ROOT.'cache/test.write', '0777');
|
@unlink(MYBB_ROOT.'cache/test.write'); }
| @unlink(MYBB_ROOT.'cache/test.write'); }
|
Zeile 1826 | Zeile 1826 |
---|
else { @fclose($themewritable);
|
else { @fclose($themewritable);
|
@my_chmod(MYBB_ROOT.'cache/themes', 0777); @my_chmod(MYBB_ROOT.'cache/themes/test.write', 0777);
| @my_chmod(MYBB_ROOT.'cache/themes', '0777'); @my_chmod(MYBB_ROOT.'cache/themes/test.write', '0777');
|
@unlink(MYBB_ROOT.'cache/themes/test.write'); }
| @unlink(MYBB_ROOT.'cache/themes/test.write'); }
|
Zeile 1892 | Zeile 1892 |
---|
}
// Import master theme
|
}
// Import master theme
|
import_theme_xml($contents, array("tid" => 1, "no_templates" => 1));
| if(import_theme_xml($contents, array("tid" => 1, "no_templates" => 1, "version_compat" => 1)) === -1) { $output->print_error("Please make sure your install/resources/mybb_theme.xml file is uploaded correctly."); }
|
// Fetch out default stylesheets from master $query = $db->simple_select("themes", "*", "tid=1"); $master_theme = $db->fetch_array($query);
$master_stylesheets = unserialize($master_theme['stylesheets']);
|
// Fetch out default stylesheets from master $query = $db->simple_select("themes", "*", "tid=1"); $master_theme = $db->fetch_array($query);
$master_stylesheets = unserialize($master_theme['stylesheets']);
|
// Note: 1.4 only ships with one global|global stylesheet foreach($master_stylesheets as $location => $sheets)
| if(is_array($master_stylesheets))
|
{
|
{
|
foreach($sheets as $action => $sheets)
| // Note: 1.4 only ships with one global|global stylesheet foreach($master_stylesheets as $location => $sheets)
|
{
|
{
|
foreach($sheets as $stylesheet)
| foreach($sheets as $action => $sheets)
|
{
|
{
|
if($location == "global" && $action == "global")
| foreach($sheets as $stylesheet)
|
{
|
{
|
continue; // Skip global
| if($location == "global" && $action == "global") { continue; // Skip global } $default_stylesheets[$location][$action][] = $stylesheet; $default_stylesheets['inherited']["{$location}_{$action}"][$stylesheet] = 1; // This stylesheet is inherited from the master
|
}
|
}
|
$default_stylesheets[$location][$action][] = $stylesheet; $default_stylesheets['inherited']["{$location}_{$action}"][$stylesheet] = 1; // This stylesheet is inherited from the master
| |
} } }
| } } }
|