This commit is contained in:
flash 2015-06-21 15:41:07 +02:00
parent 59661114ee
commit c8c1c155c6
6 changed files with 51 additions and 3 deletions

View file

@ -21,7 +21,8 @@
"20150602",
"20150604",
"20150619",
"20150620"
"20150620",
"20150621"
]
@ -1279,6 +1280,19 @@
"change": "Removed remaining code for the old profile API."
}
],
"20150621": [
{
"type": "UPD",
"change": "Changed the options next to the avatar on the index panel."
},
{
"type": "ADD",
"change": "Added a bbcode parser."
}
]
}

View file

@ -60,6 +60,30 @@ class Main {
}
// Parse bbcodes
public static function bbParse($text) {
// Get bbcode regex from the database
$bbcodes = Database::fetch('bbcodes');
// Split the regex
$regex = array_map(function($arr) {
return $arr['regex'];
}, $bbcodes);
// Split the replacement
$replace = array_map(function($arr) {
return $arr['replace'];
}, $bbcodes);
// Do the replacement
$text = preg_replace($regex, $replace, $text);
// Return the parsed text
return $text;
}
// Verify ReCAPTCHA
public static function verifyCaptcha($response) {

View file

@ -8,7 +8,7 @@
namespace Sakura;
// Define Sakura version
define('SAKURA_VERSION', '20150620');
define('SAKURA_VERSION', '20150621');
define('SAKURA_VLABEL', 'Eminence');
define('SAKURA_VTYPE', 'Development');
define('SAKURA_COLOUR', '#6C3082');

10
main/report.php Normal file
View file

@ -0,0 +1,10 @@
<?php
/*
* Sakura Reporting
*/
// Declare Namespace
namespace Sakura;
// Include components
require_once str_replace(basename(__DIR__), '', dirname(__FILE__)) .'_sakura/sakura.php';