Commit 41faf774 by Scott

Merge branch 'pr/264' into dev

parents e43e3539 6cff546f
...@@ -437,6 +437,8 @@ ...@@ -437,6 +437,8 @@
if ($oldquestion['type']!='Q_HIDDEN') if ($oldquestion['type']!='Q_HIDDEN')
qa_fatal_error('Tried to delete a non-hidden question'); qa_fatal_error('Tried to delete a non-hidden question');
qa_report_event('q_delete_before', $userid, $handle, $cookieid, $params);
if (isset($oldclosepost) && ($oldclosepost['parentid']==$oldquestion['postid'])) { if (isset($oldclosepost) && ($oldclosepost['parentid']==$oldquestion['postid'])) {
qa_db_post_set_closed($oldquestion['postid'], null); // for foreign key constraint qa_db_post_set_closed($oldquestion['postid'], null); // for foreign key constraint
qa_post_unindex($oldclosepost['postid']); qa_post_unindex($oldclosepost['postid']);
...@@ -451,8 +453,6 @@ ...@@ -451,8 +453,6 @@
'oldquestion' => $oldquestion, 'oldquestion' => $oldquestion,
); );
qa_report_event('q_delete_before', $userid, $handle, $cookieid, $params);
qa_post_unindex($oldquestion['postid']); qa_post_unindex($oldquestion['postid']);
qa_db_post_delete($oldquestion['postid']); // also deletes any related voteds due to foreign key cascading qa_db_post_delete($oldquestion['postid']); // also deletes any related voteds due to foreign key cascading
qa_update_counts_for_q(null); qa_update_counts_for_q(null);
......
...@@ -1223,7 +1223,6 @@ ...@@ -1223,7 +1223,6 @@
$editors = qa_list_modules('editor'); $editors = qa_list_modules('editor');
$selectoptions = array(); $selectoptions = array();
$optionslinks = false;
foreach ($editors as $editor) { foreach ($editors as $editor) {
$selectoptions[qa_html($editor)] = strlen($editor) ? qa_html($editor) : qa_lang_html('admin/basic_editor'); $selectoptions[qa_html($editor)] = strlen($editor) ? qa_html($editor) : qa_lang_html('admin/basic_editor');
......
...@@ -194,17 +194,6 @@ ...@@ -194,17 +194,6 @@
)); ));
} }
// show T&Cs checkbox
if ($show_terms) {
$qa_content['form']['fields']['terms'] = array(
'type' => 'checkbox',
'label' => trim(qa_opt('register_terms')),
'tags' => 'name="terms" id="terms"',
'value' => qa_html(@$interms),
'error' => qa_html(@$errors['terms']),
);
}
foreach ($userfields as $userfield) { foreach ($userfields as $userfield) {
$value = @$inprofile[$userfield['fieldid']]; $value = @$inprofile[$userfield['fieldid']];
...@@ -224,6 +213,17 @@ ...@@ -224,6 +213,17 @@
if (qa_opt('captcha_on_register')) if (qa_opt('captcha_on_register'))
qa_set_up_captcha_field($qa_content, $qa_content['form']['fields'], @$errors); qa_set_up_captcha_field($qa_content, $qa_content['form']['fields'], @$errors);
// show T&Cs checkbox
if ($show_terms) {
$qa_content['form']['fields']['terms'] = array(
'type' => 'checkbox',
'label' => trim(qa_opt('register_terms')),
'tags' => 'name="terms" id="terms"',
'value' => qa_html(@$interms),
'error' => qa_html(@$errors['terms']),
);
}
$loginmodules = qa_load_modules_with('login', 'login_html'); $loginmodules = qa_load_modules_with('login', 'login_html');
foreach ($loginmodules as $module) { foreach ($loginmodules as $module) {
......
...@@ -22,14 +22,11 @@ ...@@ -22,14 +22,11 @@
class qa_facebook_login_page class qa_facebook_login_page
{ {
private $directory; private $directory;
private $urltoroot;
public function load_module($directory, $urltoroot) public function load_module($directory, $urltoroot)
{ {
$this->directory=$directory; $this->directory=$directory;
$this->urltoroot=$urltoroot;
} }
public function match_request($request) public function match_request($request)
......
...@@ -137,8 +137,6 @@ class qa_xml_sitemap ...@@ -137,8 +137,6 @@ class qa_xml_sitemap
{ {
@ini_set('display_errors', 0); // we don't want to show PHP errors inside XML @ini_set('display_errors', 0); // we don't want to show PHP errors inside XML
$siteurl=qa_opt('site_url');
header('Content-type: text/xml; charset=utf-8'); header('Content-type: text/xml; charset=utf-8');
echo '<?xml version="1.0" encoding="UTF-8"?>'."\n"; echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
...@@ -262,9 +260,6 @@ class qa_xml_sitemap ...@@ -262,9 +260,6 @@ class qa_xml_sitemap
} }
} }
// Finish up...
echo "</urlset>\n"; echo "</urlset>\n";
return null; return null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment