diff --git a/_sakura/changelog.json b/_sakura/changelog.json
index 36db544..bbafe29 100644
--- a/_sakura/changelog.json
+++ b/_sakura/changelog.json
@@ -1669,6 +1669,10 @@
{
"type": "UPD",
"change": "Redid filestructure."
+ },
+ {
+ "type": "FIX",
+ "change": "Fixed references to old urls variable."
}
]
diff --git a/_sakura/components/Main.php b/_sakura/components/Main.php
index 525bcdc..50d61c8 100644
--- a/_sakura/components/Main.php
+++ b/_sakura/components/Main.php
@@ -109,8 +109,11 @@ class Main {
$emotes = Database::fetch('emoticons');
// Do the replacements
- foreach($emotes as $emote)
- $text = str_replace($emote['emote_string'], '
', $text);
+ foreach($emotes as $emote) {
+
+ $text = str_replace($emote['emote_string'], '
', $text);
+
+ }
// Return the parsed text
return $text;
@@ -124,9 +127,12 @@ class Main {
$resp = @file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='. Configuration::getConfig('recaptcha_private') .'&response='. $response);
// In the highly unlikely case that it failed to get anything forge a false
- if(!$resp)
+ if(!$resp) {
+
return false;
+ }
+
// Decode the response JSON from the servers
$resp = json_decode($resp, true);
@@ -229,9 +235,9 @@ class Main {
$htmlMail = file_get_contents(ROOT .'_sakura/templates/htmlEmail.tpl');
// Replace template tags
- $htmlMail = str_replace('{{ sitename }}', Configuration::getConfig('sitename'), $htmlMail);
- $htmlMail = str_replace('{{ siteurl }}', '//'. Configuration::getLocalConfig('urls', 'main'), $htmlMail);
- $htmlMail = str_replace('{{ contents }}', self::mdParse($body), $htmlMail);
+ $htmlMail = str_replace('{{ sitename }}', Configuration::getConfig('sitename'), $htmlMail);
+ $htmlMail = str_replace('{{ siteurl }}', '//'. Configuration::getConfig('url_main'), $htmlMail);
+ $htmlMail = str_replace('{{ contents }}', self::mdParse($body), $htmlMail);
// Set HTML body
$mail->Body = $htmlMail;
diff --git a/_sakura/components/Users.php b/_sakura/components/Users.php
index 0e0c4d2..b1c899d 100644
--- a/_sakura/components/Users.php
+++ b/_sakura/components/Users.php
@@ -325,9 +325,9 @@ class Users {
$message = "Hello ". $user['username'] .",\r\n\r\n";
$message .= "You are receiving this notification because you have (or someone pretending to be you has) requested a password reset link to be sent for your account on \"". Configuration::getConfig('sitename') ."\". If you did not request this notification then please ignore it, if you keep receiving it please contact the site administrator.\r\n\r\n";
$message .= "To use this password reset key you need to go to a special page. To do this click the link provided below.\r\n\r\n";
- $message .= "http://". Configuration::getLocalConfig('urls', 'main') ."/forgotpassword?pw=true&uid=". $user['id'] ."&key=". $verk ."\r\n\r\n";
+ $message .= "http://". Configuration::getConfig('url_main') ."/forgotpassword?pw=true&uid=". $user['id'] ."&key=". $verk ."\r\n\r\n";
$message .= "If successful you should be able to change your password here.\r\n\r\n";
- $message .= "Alternatively if the above method fails for some reason you can go to http://". Configuration::getLocalConfig('urls', 'main') ."/forgotpassword?pw=true&uid=". $user['id'] ." and use the key listed below:\r\n\r\n";
+ $message .= "Alternatively if the above method fails for some reason you can go to http://". Configuration::getConfig('url_main') ."/forgotpassword?pw=true&uid=". $user['id'] ." and use the key listed below:\r\n\r\n";
$message .= "Verification key: ". $verk ."\r\n\r\n";
$message .= "You can of course change this password yourself via the profile page. If you have any difficulties please contact the site administrator.\r\n\r\n";
$message .= "--\r\n\r\nThanks\r\n\r\n". Configuration::getConfig('mail_signature');
@@ -496,10 +496,10 @@ class Users {
$message .= "Please keep this e-mail for your records. Your account intormation is as follows:\r\n\r\n";
$message .= "----------------------------\r\n\r\n";
$message .= "Username: ". $user['username'] ."\r\n\r\n";
- $message .= "Your profile: http://". Configuration::getLocalConfig('urls', 'main') ."/u/". $user['id'] ."\r\n\r\n";
+ $message .= "Your profile: http://". Configuration::getConfig('url_main') ."/u/". $user['id'] ."\r\n\r\n";
$message .= "----------------------------\r\n\r\n";
$message .= "Please visit the following link in order to activate your account:\r\n\r\n";
- $message .= "http://". Configuration::getLocalConfig('urls', 'main') ."/activate?mode=activate&u=". $user['id'] ."&k=". $activate ."\r\n\r\n";
+ $message .= "http://". Configuration::getConfig('url_main') ."/activate?mode=activate&u=". $user['id'] ."&k=". $activate ."\r\n\r\n";
$message .= "Your password has been securely stored in our database and cannot be retrieved. ";
$message .= "In the event that it is forgotten, you will be able to reset it using the email address associated with your account.\r\n\r\n";
$message .= "Thank you for registering.\r\n\r\n";
diff --git a/main/news.php b/main/news.php
index 3fd57ca..88d1e94 100644
--- a/main/news.php
+++ b/main/news.php
@@ -20,8 +20,8 @@ $disqus_data = [
$disqus_user['id'],
$disqus_user['username'],
$disqus_user['email'],
- 'http://'. Configuration::getLocalConfig('url_main') .'/a/'. $disqus_user['id'],
- 'http://'. Configuration::getLocalConfig('url_main') .'/u/'. $disqus_user['id']
+ 'http://'. Configuration::getConfig('url_main') .'/a/'. $disqus_user['id'],
+ 'http://'. Configuration::getConfig('url_main') .'/u/'. $disqus_user['id']
];
// Add page specific things
@@ -39,7 +39,7 @@ if(isset($_GET['xml'])) {
// Meta data attributes
$metaData = [
'title' => ($_FEED_TITLE = Configuration::getConfig('sitename')) .' News',
- 'link' => ($_FEED_URL = 'http://'. Configuration::getLocalConfig('url_main')),
+ 'link' => ($_FEED_URL = 'http://'. Configuration::getConfig('url_main')),
'description' => 'News about '. $_FEED_TITLE,
'language' => 'en-gb',
'webMaster' => Users::getUser(1)['email'] .' ('. $_FEED_TITLE .' Webmaster)',
diff --git a/main/settings.php b/main/settings.php
index a6f6b67..f83a1a6 100644
--- a/main/settings.php
+++ b/main/settings.php
@@ -171,8 +171,8 @@ if(isset($_REQUEST['request-notifications']) && $_REQUEST['request-notifications
sprintf($notifStrings[$action[1]][0], $user['username']),
$notifStrings[$action[1]][1],
60000,
- '//'. Configuration::getLocalConfig('url_main') .'/a/'. $user['id'],
- '//'. Configuration::getLocalConfig('url_main') .'/u/'. $user['id'],
+ '//'. Configuration::getConfig('url_main') .'/a/'. $user['id'],
+ '//'. Configuration::getConfig('url_main') .'/u/'. $user['id'],
'1'
);
diff --git a/main/support.php b/main/support.php
index 53046fd..d689135 100644
--- a/main/support.php
+++ b/main/support.php
@@ -55,7 +55,7 @@ if(isset($_REQUEST['mode']) && Users::checkLogin() && Permissions::check('SITE',
$itemName = 'Flashii Tenshi - '. (string)$_POST['months'] .' month'. ((int)$_POST['months'] == 1 ? '' : 's');
// Attempt to create a transaction
- if($transaction = Payments::createTransaction($total, $itemName, 'Flashii Tenshi Purchase', 'http://'. Configuration::getLocalConfig('url_main') .'/support')) {
+ if($transaction = Payments::createTransaction($total, $itemName, 'Flashii Tenshi Purchase', 'http://'. Configuration::getConfig('url_main') .'/support')) {
// Store the amount of months in the global session array
$_SESSION['premiumMonths'] = (int)$_POST['months'];