a bit of cleanup

This commit is contained in:
flash 2016-02-27 18:28:45 +01:00
parent d55ae7e936
commit 03ba7e9ffe
20 changed files with 15 additions and 36 deletions

View file

@ -14,7 +14,7 @@
"AT": "Austria",
"AU": "Australia",
"AW": "Aruba",
"AX": "Åland Islands",
"AX": "Åland Islands",
"AZ": "Azerbaijan",
"BA": "Bosnia and Herzegovina",
"BB": "Barbados",
@ -25,7 +25,7 @@
"BH": "Bahrain",
"BI": "Burundi",
"BJ": "Benin",
"BL": "Saint Barthélemy",
"BL": "Saint Barthélemy",
"BM": "Bermuda",
"BN": "Brunei Darussalam",
"BO": "Plurinational State of Bolivia",
@ -43,7 +43,7 @@
"CF": "Central African Republic",
"CG": "Congo",
"CH": "Switzerland",
"CI": "Côte d'Ivoire",
"CI": "Côte d'Ivoire",
"CK": "Cook Islands",
"CL": "Chile",
"CM": "Cameroon",
@ -52,7 +52,7 @@
"CR": "Costa Rica",
"CU": "Cuba",
"CV": "Cabo Verde",
"CW": "Curaçao",
"CW": "Curaçao",
"CX": "Christmas Island",
"CY": "Cyprus",
"CZ": "Czech Republic",
@ -187,7 +187,7 @@
"PW": "Palau",
"PY": "Paraguay",
"QA": "Qatar",
"RE": "Réunion",
"RE": "Réunion",
"RO": "Romania",
"RS": "Serbia",
"RU": "Russian Federation",

View file

@ -126,7 +126,7 @@ class BBcode
public static function text($text)
{
// Check if $bbcode is still null
if (self::$bbcode == null) {
if (!self::$bbcode) {
self::init();
}

View file

@ -7,7 +7,6 @@
namespace Sakura\BBcodeDefinitions;
use JBBCode\Parser;
use JBBCode\CodeDefinition;
use JBBCode\ElementNode;

View file

@ -7,7 +7,6 @@
namespace Sakura\BBcodeDefinitions;
use JBBCode\Parser;
use JBBCode\CodeDefinition;
use JBBCode\ElementNode;

View file

@ -7,7 +7,6 @@
namespace Sakura\BBcodeDefinitions;
use JBBCode\Parser;
use JBBCode\CodeDefinition;
use JBBCode\ElementNode;

View file

@ -7,7 +7,6 @@
namespace Sakura\BBcodeDefinitions;
use JBBCode\Parser;
use JBBCode\CodeDefinition;
use JBBCode\ElementNode;

View file

@ -7,7 +7,6 @@
namespace Sakura\BBcodeDefinitions;
use JBBCode\Parser;
use JBBCode\CodeDefinition;
use JBBCode\ElementNode;

View file

@ -7,7 +7,6 @@
namespace Sakura\BBcodeDefinitions;
use JBBCode\Parser;
use JBBCode\CodeDefinition;
use JBBCode\ElementNode;

View file

@ -7,15 +7,12 @@
namespace Sakura\Controllers;
use Sakura\Config;
use Sakura\DB;
use Sakura\DBv2;
use Sakura\Forum;
use Sakura\Perms\Forum as ForumPerms;
use Sakura\Template;
use Sakura\User;
use Sakura\Users;
use Sakura\Utils;
/**
* Forum page controllers.
@ -122,8 +119,6 @@ class ForumController extends Controller
return Template::render('global/information');
}
$renderData['forum'] = $forum;
// Set parse variables
Template::vars([
'forum' => $forum,

View file

@ -9,12 +9,10 @@ namespace Sakura\Controllers;
use Sakura\Config;
use Sakura\DB;
use Sakura\DBv2;
use Sakura\News;
use Sakura\Template;
use Sakura\User;
use Sakura\Users;
use Sakura\Utils;
/**
* Meta page controllers (sections that aren't big enough to warrant a dedicated controller).

View file

@ -7,8 +7,8 @@
namespace Sakura\Controllers;
use Exception;
use Sakura\Config;
use Sakura\News;
use Sakura\Template;
use Sakura\User;
use Sakura\Users;

View file

@ -9,10 +9,9 @@ namespace Sakura\Controllers;
use Sakura\Config;
use Sakura\DB;
use Sakura\DBv2;
use Sakura\Rank;
use Sakura\Template;
use Sakura\User as UserContext;
use Sakura\User;
use Sakura\Utils;
/**
@ -35,7 +34,7 @@ class UserController extends Controller
global $currentUser;
// Get the user's context
$profile = UserContext::construct($id);
$profile = User::construct($id);
// If the user id is zero check if there was a namechange
if ($profile->id == 0) {

View file

@ -8,9 +8,6 @@
namespace Sakura\Forum;
use Sakura\DB;
use Sakura\DBv2;
use Sakura\Users;
use Sakura\User;
use Sakura\Perms;
/**

View file

@ -7,9 +7,7 @@
namespace Sakura\Forum;
use Sakura\Utils;
use Sakura\DB;
use Sakura\DBv2;
use Sakura\User;
use Sakura\BBcode;
use Sakura\Config;

View file

@ -8,8 +8,6 @@
namespace Sakura\Forum;
use Sakura\DB;
use Sakura\DBv2;
use Sakura\Utils;
/**
* Used to serve, create and update threads.

View file

@ -310,7 +310,7 @@ class Urls
}
// Check if mod_rewrite is enabled
$rewrite = 0; //($rewrite === null ? Config::get('url_rewrite') : $rewrite) ? 1 : 0;
$rewrite = 0; // Pretty much disabled forever because of the router -- ($rewrite === null ? Config::get('url_rewrite') : $rewrite) ? 1 : 0;
// Format urls
$formatted = vsprintf($this->urls[$lid][$rewrite], $args);

View file

@ -873,7 +873,7 @@ class User
}
// Check if we have additional options as well
if ($field['field_additional'] != null) {
if (!$field['field_additional']) {
// Decode the json of the additional stuff
$additional = json_decode($field['field_additional'], true);

View file

@ -27,7 +27,7 @@ class Utils
public static function verifyCaptcha($response)
{
// Attempt to get the response
$resp = @file_get_contents(
$resp = file_get_contents(
'https://www.google.com/recaptcha/api/siteverify?secret='
. Config::get('recaptcha_private')
. '&response='
@ -36,7 +36,7 @@ class Utils
// In the highly unlikely case that it failed to get anything forge a false
if (!$resp) {
return false;
return [];
}
// Decode the response JSON from the servers

View file

@ -539,7 +539,7 @@ if (isset($_REQUEST['request-notifications']) && $_REQUEST['request-notification
$metadata = getimagesize($_FILES[$mode]['tmp_name']);
// Check if the image is actually an image
if ($metadata == false) {
if (!$metadata) {
// Set render data
$renderData['page'] = [
'redirect' => $redirect,

View file

@ -1,4 +1,4 @@
<div class="box">
<h1>There's nothing here yet...</h1>
<h3>...aside from <a href="{{ urls.format('SETTING_MODE', ['general', 'options']) }}">Site Options</a>.</h3>
</div>
</div>