Skip to content

Commit

Permalink
Release v2 pre-release 2 update files
Browse files Browse the repository at this point in the history
Release v2 pre-release 2 update files
  • Loading branch information
samerton committed Jul 5, 2017
1 parent 60812dc commit cf9bb5a
Show file tree
Hide file tree
Showing 6 changed files with 248 additions and 8 deletions.
84 changes: 84 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
NamelessMC version 2 Changelog

2.0.0 pr-1
- Initial release

2.0.0 pr-2
- Fix issue with editing user in AdminCP
- Prevent non-moderators replying to locked topics
- Prevent signature image overflow
- Remove unnecessary header template file
- Fix registration issue
- Fix recaptcha issues in upgrade script
- Minor forum updates
- Update Mojang API URL
- Fix incorrect "last user" information in PMs
- Redirect to previous page after login
- Allow use of HTML in report content
- Add forum labels
- Update panels in AdminCP night theme
- Small AdminCP label fixes
- Update default template Bootstrap version
- Update core Bootstrap version
- Update profile template
- Fix signin issue with numeric usernames
- Fix negative reactions not creating
- Allow creating new instances of custom DB class
- Update AdminCP registrations graph
- Change popover placement in AdminCP
- Increase query interval
- Display success message upon sending PM reply
- Update installer and configuration methods
- Display errors if unable to create config + cache
- Update htaccess
- Fix installation detection
- Separate core JS into templates
- Add maintenance mode
- Allow logging in whilst in maintenance mode
- Prevent admin account switch in AdminCP
- Fix installer not loading
- Allow installer translations
- Add default database address to installer
- Update admin auth screen layout
- Remove deprecated mcrypt requirement, along with a now unused function
- Fix permission check for configuration file
- Add AuthMe integration and Minecraft service status
- Fix invalid charset in installer
- Fix AdminCP mobile navbar toggler not showing
- Update cp_dark.css
- Fix AdminCP auth + password changing
- Add switch to toggle error reporting
- Fix error in 404 page
- Update PasswordHash class
- Update form tokens
- Allow per-user timezones
- Add topics and posts to AdminCP overview stats graph
- Fix potentially incorrect news ordering
- Add card colour for Minecraft service status "Slow"
- Define page on register page
- Update post editor
- Fix minor login/logout issues
- Apply GeSHi to new topics and edited posts
- Fix AdminCP security log sorting
- Add force-HTTPS option to AdminCP
- Fix post word wrapping and temporarily disable the code editor
- Add Minecraft server query to homepage
- Allow editing + deleting Minecraft servers
- Fix sub-server queries
- Fix invalid MySQL column default value
- Fix timezone offsets not displaying minutes correctly
- Minor forum SEO improvements
- Add contact page, new email class and email errors + testing
- Add registration email verification toggle in AdminCP
- Add Minecraft server query error logging
- Add Minecraft server banners
- Allow purging Minecraft query errors
- Complete mcassoc integration
- Add terms and conditions page, and the ability to modify them
- Update installer
- Add avatar configuration, including the ability to upload a default avatar
- Fix AdminCP -> Minecraft PHP notice
- Add forgot password functionality
- Add forum topic label permissions
- Add forum search
- Update Font Awesome
115 changes: 115 additions & 0 deletions core/includes/updates/200-pr1.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<?php
// 2.0.0 pr-1 to 2.0.0 pr-2 updater

// Database changes
try {
$queries->alterTable('custom_pages', 'icon', "varchar(64) DEFAULT NULL");
} catch(Exception $e){
// Error, may have already been created - continue anyway
}

try {
$queries->createTable("forums_labels", " `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(16) NOT NULL, `html` varchar(64) NOT NULL, PRIMARY KEY (`id`)", "ENGINE=InnoDB DEFAULT CHARSET=latin1");
} catch(Exception $e){
// Error
}

try {
$queries->alterTable('forums_topic_labels', 'gids', "varchar(64) DEFAULT NULL");
} catch(Exception $e){
// Error
}

try {
$queries->createTable("mc_servers", " `id` int(11) NOT NULL AUTO_INCREMENT, `ip` varchar(64) NOT NULL, `query_ip` varchar(64) NOT NULL, `name` varchar(20) NOT NULL, `is_default` tinyint(1) NOT NULL DEFAULT '0', `display` tinyint(1) NOT NULL DEFAULT '1', `pre` tinyint(1) NOT NULL DEFAULT '0', `player_list` tinyint(1) NOT NULL DEFAULT '1', `parent_server` int(11) NOT NULL DEFAULT '0', `bungee` tinyint(1) NOT NULL DEFAULT '0', `port` int(11) DEFAULT NULL, `query_port` int(11) DEFAULT '25565', `banner_background` varchar(32) NOT NULL DEFAULT 'background.png', PRIMARY KEY (`id`)", "ENGINE=InnoDB DEFAULT CHARSET=latin1");
} catch(Exception $e){
// Error
try {
$queries->alterTable('mc_servers', 'banner_background', "varchar(32) NOT NULL DEFAULT 'background.png'");
} catch(Exception $ex){
// Error
}
}

try {
$queries->createTable("email_errors", " `id` int(11) NOT NULL AUTO_INCREMENT, `type` int(11) NOT NULL, `content` text NOT NULL, `at` int(11) NOT NULL, `user_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`)", "ENGINE=InnoDB DEFAULT CHARSET=latin1");
} catch(Exception $e){
// Error
}

// New settings
$update_check = $queries->getWhere('settings', array('name', '=', 'maintenance_message'));
if(!count($update_check)){
$queries->create('settings', array(
'name' => 'maintenance_message',
'value' => 'This website is currently in maintenance mode.'
));
$cache->setCache('maintenance_cache');
$cache->store('maintenance', array('maintenance' => 'false', 'message' => 'This website is currently in maintenance mode.'));
}

$update_check = $queries->getWhere('settings', array('name', '=', 'authme'));
if(!count($update_check)){
$queries->create('settings', array(
'name' => 'authme',
'value' => 0
));
}

$update_check = $queries->getWhere('settings', array('name', '=', 'authme_db'));
if(!count($update_check)){
$queries->create('settings', array(
'name' => 'authme_db',
'value' => null
));
}

$update_check = $queries->getWhere('settings', array('name', '=', 'force_https'));
if(!count($update_check)){
$queries->create('settings', array(
'name' => 'force_https',
'value' => 'false'
));
}

$update_check = $queries->getWhere('settings', array('name', '=', 'default_avatar_type'));
if(!count($update_check)){
$queries->create('settings', array(
'name' => 'default_avatar_type',
'value' => 'minecraft'
));
}

$update_check = $queries->getWhere('settings', array('name', '=', 'custom_default_avatar'));
if(!count($update_check)){
$queries->create('settings', array(
'name' => 'custom_default_avatar',
'value' => null
));
}

$update_check = null;

// Update version number
$version_number_id = $queries->getWhere('settings', array('name', '=', 'nameless_version'));
$version_number_id = $version_number_id[0]->id;

if(count($version_number_id)){
$queries->update('settings', $version_number_id, array(
'value' => '2.0.0-pr2'
));
} else {
$version_number_id = $queries->getWhere('settings', array('name', '=', 'version'));
$version_number_id = $version_number_id[0]->id;

$queries->update('settings', $version_number_id, array(
'value' => '2.0.0-pr2'
));
}

$version_update_id = $queries->getWhere('settings', array('name', '=', 'version_update'));
$version_update_id = $version_update_id[0]->id;

$queries->update('settings', $version_update_id, array(
'value' => 'false'
));
3 changes: 2 additions & 1 deletion core/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@

if(isset($conf) && is_array($conf))
$GLOBALS['config'] = $conf;
else $page = 'install';
else if(!isset($GLOBALS['config']))
$page = 'install';

/*
* Autoload classes
Expand Down
48 changes: 44 additions & 4 deletions core/installation/views/installer.view.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,18 +458,43 @@
));

// Languages
$queries->create('languages', array(
'name' => 'Czech',
'is_default' => 0
));

$queries->create('languages', array(
'name' => 'Dutch',
'is_default' => 0
));

$queries->create('languages', array(
'name' => 'EnglishUK',
'is_default' => 1
));

$queries->create('languages', array(
'name' => 'EnglishUS',
'is_default' => 0
));

$queries->create('languages', array(
'name' => 'German',
'is_default' => 0
));

$queries->create('languages', array(
'name' => 'EnglishUS',
'name' => 'Greek',
'is_default' => 0
));

$queries->create('languages', array(
'name' => 'Norwegian',
'is_default' => 0
));

$queries->create('languages', array(
'name' => 'Portuguese',
'is_default' => 0
));

Expand Down Expand Up @@ -565,7 +590,7 @@

$queries->create('settings', array(
'name' => 'nameless_version',
'value' => '2.0.0-pr1'
'value' => '2.0.0-pr2'
));

$queries->create('settings', array(
Expand Down Expand Up @@ -754,6 +779,21 @@
'name' => 'authme_db',
'value' => null
));

$queries->create('settings', array(
'name' => 'force_https',
'value' => 'false'
));

$queries->create('settings', array(
'name' => 'default_avatar_type',
'value' => 'minecraft'
));

$queries->create('settings', array(
'name' => 'custom_default_avatar',
'value' => null
));

// Templates
$queries->create('templates', array(
Expand Down Expand Up @@ -1879,12 +1919,12 @@
if(count($version)){
$queries->update('settings', $version[0]->id, array(
'name' => 'nameless_version',
'value' => '2.0.0-pr1'
'value' => '2.0.0-pr2'
));
} else {
$queries->create('settings', array(
'name' => 'nameless_version',
'value' => '2.0.0-pr1'
'value' => '2.0.0-pr2'
));
}

Expand Down
4 changes: 2 additions & 2 deletions custom/languages/Czech/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
*
* License: MIT
*
* EnglishUS Language - Language version
* Czech Language - Language version
*/

// Which version of NamelessMC is this language file updated to?
$language_version = '2.0.0-pr1';
$language_html = 'en';
$language_html = 'cs';
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
Redirect::to('install.php');
}

if(FRIENDLY_URLS == true){
if(defined('FRIENDLY_URLS') && FRIENDLY_URLS == true){
// Load the main page content

// Check modules
Expand Down

0 comments on commit cf9bb5a

Please sign in to comment.