fix
This commit is contained in:
parent
8d23b2fa67
commit
d6703959d9
6 changed files with 26 additions and 16 deletions
|
@ -1669,6 +1669,10 @@
|
||||||
{
|
{
|
||||||
"type": "UPD",
|
"type": "UPD",
|
||||||
"change": "Redid filestructure."
|
"change": "Redid filestructure."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "FIX",
|
||||||
|
"change": "Fixed references to old urls variable."
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
|
@ -109,8 +109,11 @@ class Main {
|
||||||
$emotes = Database::fetch('emoticons');
|
$emotes = Database::fetch('emoticons');
|
||||||
|
|
||||||
// Do the replacements
|
// Do the replacements
|
||||||
foreach($emotes as $emote)
|
foreach($emotes as $emote) {
|
||||||
$text = str_replace($emote['emote_string'], '<img src="//'. Configuration::getLocalConfig('urls', 'content') .'/'. $emote['emote_path'] .'" class="emoticon" alt="'. $emote['emote_string'] .'" />', $text);
|
|
||||||
|
$text = str_replace($emote['emote_string'], '<img src="'. $emote['emote_path'] .'" class="emoticon" alt="'. $emote['emote_string'] .'" />', $text);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// Return the parsed text
|
// Return the parsed text
|
||||||
return $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);
|
$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
|
// In the highly unlikely case that it failed to get anything forge a false
|
||||||
if(!$resp)
|
if(!$resp) {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// Decode the response JSON from the servers
|
// Decode the response JSON from the servers
|
||||||
$resp = json_decode($resp, true);
|
$resp = json_decode($resp, true);
|
||||||
|
|
||||||
|
@ -229,9 +235,9 @@ class Main {
|
||||||
$htmlMail = file_get_contents(ROOT .'_sakura/templates/htmlEmail.tpl');
|
$htmlMail = file_get_contents(ROOT .'_sakura/templates/htmlEmail.tpl');
|
||||||
|
|
||||||
// Replace template tags
|
// Replace template tags
|
||||||
$htmlMail = str_replace('{{ sitename }}', Configuration::getConfig('sitename'), $htmlMail);
|
$htmlMail = str_replace('{{ sitename }}', Configuration::getConfig('sitename'), $htmlMail);
|
||||||
$htmlMail = str_replace('{{ siteurl }}', '//'. Configuration::getLocalConfig('urls', 'main'), $htmlMail);
|
$htmlMail = str_replace('{{ siteurl }}', '//'. Configuration::getConfig('url_main'), $htmlMail);
|
||||||
$htmlMail = str_replace('{{ contents }}', self::mdParse($body), $htmlMail);
|
$htmlMail = str_replace('{{ contents }}', self::mdParse($body), $htmlMail);
|
||||||
|
|
||||||
// Set HTML body
|
// Set HTML body
|
||||||
$mail->Body = $htmlMail;
|
$mail->Body = $htmlMail;
|
||||||
|
|
|
@ -325,9 +325,9 @@ class Users {
|
||||||
$message = "Hello ". $user['username'] .",\r\n\r\n";
|
$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 .= "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 .= "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 .= "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 .= "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 .= "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');
|
$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 .= "Please keep this e-mail for your records. Your account intormation is as follows:\r\n\r\n";
|
||||||
$message .= "----------------------------\r\n\r\n";
|
$message .= "----------------------------\r\n\r\n";
|
||||||
$message .= "Username: ". $user['username'] ."\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 .= "----------------------------\r\n\r\n";
|
||||||
$message .= "Please visit the following link in order to activate your account:\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 .= "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 .= "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";
|
$message .= "Thank you for registering.\r\n\r\n";
|
||||||
|
|
|
@ -20,8 +20,8 @@ $disqus_data = [
|
||||||
$disqus_user['id'],
|
$disqus_user['id'],
|
||||||
$disqus_user['username'],
|
$disqus_user['username'],
|
||||||
$disqus_user['email'],
|
$disqus_user['email'],
|
||||||
'http://'. Configuration::getLocalConfig('url_main') .'/a/'. $disqus_user['id'],
|
'http://'. Configuration::getConfig('url_main') .'/a/'. $disqus_user['id'],
|
||||||
'http://'. Configuration::getLocalConfig('url_main') .'/u/'. $disqus_user['id']
|
'http://'. Configuration::getConfig('url_main') .'/u/'. $disqus_user['id']
|
||||||
];
|
];
|
||||||
|
|
||||||
// Add page specific things
|
// Add page specific things
|
||||||
|
@ -39,7 +39,7 @@ if(isset($_GET['xml'])) {
|
||||||
// Meta data attributes
|
// Meta data attributes
|
||||||
$metaData = [
|
$metaData = [
|
||||||
'title' => ($_FEED_TITLE = Configuration::getConfig('sitename')) .' News',
|
'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,
|
'description' => 'News about '. $_FEED_TITLE,
|
||||||
'language' => 'en-gb',
|
'language' => 'en-gb',
|
||||||
'webMaster' => Users::getUser(1)['email'] .' ('. $_FEED_TITLE .' Webmaster)',
|
'webMaster' => Users::getUser(1)['email'] .' ('. $_FEED_TITLE .' Webmaster)',
|
||||||
|
|
|
@ -171,8 +171,8 @@ if(isset($_REQUEST['request-notifications']) && $_REQUEST['request-notifications
|
||||||
sprintf($notifStrings[$action[1]][0], $user['username']),
|
sprintf($notifStrings[$action[1]][0], $user['username']),
|
||||||
$notifStrings[$action[1]][1],
|
$notifStrings[$action[1]][1],
|
||||||
60000,
|
60000,
|
||||||
'//'. Configuration::getLocalConfig('url_main') .'/a/'. $user['id'],
|
'//'. Configuration::getConfig('url_main') .'/a/'. $user['id'],
|
||||||
'//'. Configuration::getLocalConfig('url_main') .'/u/'. $user['id'],
|
'//'. Configuration::getConfig('url_main') .'/u/'. $user['id'],
|
||||||
'1'
|
'1'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -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');
|
$itemName = 'Flashii Tenshi - '. (string)$_POST['months'] .' month'. ((int)$_POST['months'] == 1 ? '' : 's');
|
||||||
|
|
||||||
// Attempt to create a transaction
|
// 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
|
// Store the amount of months in the global session array
|
||||||
$_SESSION['premiumMonths'] = (int)$_POST['months'];
|
$_SESSION['premiumMonths'] = (int)$_POST['months'];
|
||||||
|
|
Reference in a new issue