Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
2089b48f
Commit
2089b48f
authored
Jan 13, 2017
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coding style (misc)
parent
c1b82ae1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
64 changed files
with
52 additions
and
62 deletions
+52
-62
qa-config-example.php
qa-config-example.php
+1
-6
qa-external-users.php
qa-external-example/qa-external-users.php
+0
-0
install.php
qa-include/db/install.php
+2
-2
points.php
qa-include/db/points.php
+22
-22
account.php
qa-include/pages/account.php
+0
-0
activity.php
qa-include/pages/activity.php
+0
-0
admin-approve.php
qa-include/pages/admin/admin-approve.php
+0
-0
admin-categories.php
qa-include/pages/admin/admin-categories.php
+1
-1
admin-default.php
qa-include/pages/admin/admin-default.php
+1
-1
admin-flagged.php
qa-include/pages/admin/admin-flagged.php
+0
-0
admin-hidden.php
qa-include/pages/admin/admin-hidden.php
+1
-1
admin-moderate.php
qa-include/pages/admin/admin-moderate.php
+0
-0
admin-pages.php
qa-include/pages/admin/admin-pages.php
+1
-1
admin-plugins.php
qa-include/pages/admin/admin-plugins.php
+0
-0
admin-points.php
qa-include/pages/admin/admin-points.php
+0
-0
admin-recalc.php
qa-include/pages/admin/admin-recalc.php
+0
-0
admin-stats.php
qa-include/pages/admin/admin-stats.php
+0
-0
admin-userfields.php
qa-include/pages/admin/admin-userfields.php
+0
-0
admin-usertitles.php
qa-include/pages/admin/admin-usertitles.php
+0
-0
admin-widgets.php
qa-include/pages/admin/admin-widgets.php
+0
-0
answers.php
qa-include/pages/answers.php
+0
-0
categories.php
qa-include/pages/categories.php
+0
-0
comments.php
qa-include/pages/comments.php
+0
-0
confirm.php
qa-include/pages/confirm.php
+0
-0
default.php
qa-include/pages/default.php
+2
-2
favorites-list.php
qa-include/pages/favorites-list.php
+0
-0
favorites.php
qa-include/pages/favorites.php
+0
-0
feedback.php
qa-include/pages/feedback.php
+0
-0
forgot.php
qa-include/pages/forgot.php
+0
-0
hot.php
qa-include/pages/hot.php
+0
-0
ip.php
qa-include/pages/ip.php
+0
-0
login.php
qa-include/pages/login.php
+0
-0
message.php
qa-include/pages/message.php
+0
-0
messages.php
qa-include/pages/messages.php
+0
-0
question-post.php
qa-include/pages/question-post.php
+2
-2
question-submit.php
qa-include/pages/question-submit.php
+1
-1
question.php
qa-include/pages/question.php
+6
-11
questions.php
qa-include/pages/questions.php
+0
-0
register.php
qa-include/pages/register.php
+0
-0
reset.php
qa-include/pages/reset.php
+0
-0
search.php
qa-include/pages/search.php
+0
-0
tag.php
qa-include/pages/tag.php
+0
-0
tags.php
qa-include/pages/tags.php
+0
-0
unanswered.php
qa-include/pages/unanswered.php
+0
-0
unsubscribe.php
qa-include/pages/unsubscribe.php
+1
-1
updates.php
qa-include/pages/updates.php
+0
-0
user-activity.php
qa-include/pages/user-activity.php
+0
-0
user-answers.php
qa-include/pages/user-answers.php
+0
-0
user-profile.php
qa-include/pages/user-profile.php
+2
-2
user-questions.php
qa-include/pages/user-questions.php
+0
-0
user-wall.php
qa-include/pages/user-wall.php
+0
-0
user.php
qa-include/pages/user.php
+0
-0
users-blocked.php
qa-include/pages/users-blocked.php
+0
-0
users-newest.php
qa-include/pages/users-newest.php
+0
-0
users-special.php
qa-include/pages/users-special.php
+0
-0
users.php
qa-include/pages/users.php
+0
-0
qa-base.php
qa-include/qa-base.php
+1
-1
qa-check-lang.php
qa-include/qa-check-lang.php
+0
-0
qa-install.php
qa-include/qa-install.php
+1
-1
qa-page.php
qa-include/qa-page.php
+0
-0
qa-theme-base.php
qa-include/qa-theme-base.php
+4
-4
image.php
qa-include/util/image.php
+1
-1
qa-facebook-login.php
qa-plugin/facebook-login/qa-facebook-login.php
+1
-1
qa-xml-sitemap.php
qa-plugin/xml-sitemap/qa-xml-sitemap.php
+1
-1
No files found.
qa-config-example.php
View file @
2089b48f
...
...
@@ -108,7 +108,7 @@
and the value should be the replacement for that standard part, e.g. 'topics'. If you edit this
file in UTF-8 encoding you can also use non-ASCII characters in these URLs.
$QA_CONST_PATH_MAP
=
array(
$QA_CONST_PATH_MAP
=
array(
'questions' => 'topics',
'categories' => 'sections',
'users' => 'contributors',
...
...
@@ -197,7 +197,3 @@
file to override the default setting. Just make sure you know what you're doing!
*/
/*
Omit PHP closing tag to help avoid accidental output
*/
\ No newline at end of file
qa-external-example/qa-external-users.php
View file @
2089b48f
qa-include/db/install.php
View file @
2089b48f
...
...
@@ -573,7 +573,7 @@ function qa_db_missing_columns($table, $definition)
$missing
=
array
();
foreach
(
$definition
as
$colname
=>
$coldefn
)
if
(
(
!
is_int
(
$colname
)
)
&&
!
isset
(
$keycolumns
[
$colname
]))
if
(
!
is_int
(
$colname
)
&&
!
isset
(
$keycolumns
[
$colname
]))
$missing
[
$colname
]
=
$coldefn
;
return
$missing
;
...
...
@@ -649,7 +649,7 @@ function qa_db_check_tables()
$datamissing
++
;
}
if
(
(
$datacount
==
$datamissing
)
&&
(
$datamissing
==
count
(
$missing
)
))
if
(
$datacount
==
$datamissing
&&
$datamissing
==
count
(
$missing
))
return
'non-users-missing'
;
}
...
...
qa-include/db/points.php
View file @
2089b48f
...
...
@@ -148,45 +148,45 @@ function qa_db_points_update_ifuser($userid, $columns)
if
(
qa_to_override
(
__FUNCTION__
))
{
$args
=
func_get_args
();
return
qa_call_override
(
__FUNCTION__
,
$args
);
}
if
(
qa_should_update_counts
()
&&
isset
(
$userid
))
{
require_once
QA_INCLUDE_DIR
.
'app/options.php'
;
require_once
QA_INCLUDE_DIR
.
'app/cookies.php'
;
require_once
QA_INCLUDE_DIR
.
'app/options.php'
;
require_once
QA_INCLUDE_DIR
.
'app/cookies.php'
;
$calculations
=
qa_db_points_calculations
();
$calculations
=
qa_db_points_calculations
();
if
(
$columns
===
true
)
$keycolumns
=
$calculations
;
if
(
$columns
===
true
)
$keycolumns
=
$calculations
;
elseif
(
empty
(
$columns
))
$keycolumns
=
array
();
$keycolumns
=
array
();
elseif
(
is_array
(
$columns
))
$keycolumns
=
array_flip
(
$columns
);
$keycolumns
=
array_flip
(
$columns
);
else
$keycolumns
=
array
(
$columns
=>
true
);
$keycolumns
=
array
(
$columns
=>
true
);
$insertfields
=
'userid, '
;
$insertvalues
=
'$, '
;
$insertpoints
=
(
int
)
qa_opt
(
'points_base'
);
$insertfields
=
'userid, '
;
$insertvalues
=
'$, '
;
$insertpoints
=
(
int
)
qa_opt
(
'points_base'
);
$updates
=
''
;
$updatepoints
=
$insertpoints
;
$updates
=
''
;
$updatepoints
=
$insertpoints
;
foreach
(
$calculations
as
$field
=>
$calculation
)
{
$multiple
=
(
int
)
$calculation
[
'multiple'
];
$multiple
=
(
int
)
$calculation
[
'multiple'
];
if
(
isset
(
$keycolumns
[
$field
]))
{
$insertfields
.=
$field
.
', '
;
$insertvalues
.=
'@_'
.
$field
.
':=(SELECT '
.
$calculation
[
'formula'
]
.
'), '
;
$updates
.=
$field
.
'=@_'
.
$field
.
', '
;
$insertpoints
.=
'+('
.
(
int
)
$multiple
.
'*@_'
.
$field
.
')'
;
$insertfields
.=
$field
.
', '
;
$insertvalues
.=
'@_'
.
$field
.
':=(SELECT '
.
$calculation
[
'formula'
]
.
'), '
;
$updates
.=
$field
.
'=@_'
.
$field
.
', '
;
$insertpoints
.=
'+('
.
(
int
)
$multiple
.
'*@_'
.
$field
.
')'
;
}
$updatepoints
.=
'+('
.
$multiple
.
'*'
.
(
isset
(
$keycolumns
[
$field
])
?
'@_'
:
''
)
.
$field
.
')'
;
$updatepoints
.=
'+('
.
$multiple
.
'*'
.
(
isset
(
$keycolumns
[
$field
])
?
'@_'
:
''
)
.
$field
.
')'
;
}
$query
=
'INSERT INTO ^userpoints ('
.
$insertfields
.
'points) VALUES ('
.
$insertvalues
.
$insertpoints
.
') '
.
'ON DUPLICATE KEY UPDATE '
.
$updates
.
'points='
.
$updatepoints
.
'+bonus'
;
$query
=
'INSERT INTO ^userpoints ('
.
$insertfields
.
'points) VALUES ('
.
$insertvalues
.
$insertpoints
.
') '
.
'ON DUPLICATE KEY UPDATE '
.
$updates
.
'points='
.
$updatepoints
.
'+bonus'
;
qa_db_query_raw
(
str_replace
(
'~'
,
"='"
.
qa_db_escape_string
(
$userid
)
.
"'"
,
qa_db_apply_sub
(
$query
,
array
(
$userid
))));
// build like this so that a #, $ or ^ character in the $userid (if external integration) isn't substituted
qa_db_query_raw
(
str_replace
(
'~'
,
"='"
.
qa_db_escape_string
(
$userid
)
.
"'"
,
qa_db_apply_sub
(
$query
,
array
(
$userid
))));
if
(
qa_db_insert_on_duplicate_inserted
())
qa_db_userpointscount_update
();
...
...
qa-include/pages/account.php
View file @
2089b48f
qa-include/pages/activity.php
View file @
2089b48f
qa-include/pages/admin/admin-approve.php
View file @
2089b48f
qa-include/pages/admin/admin-categories.php
View file @
2089b48f
...
...
@@ -190,7 +190,7 @@ if (qa_clicked('docancel')) {
$errors
[
'slug'
]
=
qa_lang_sub
(
'main/max_length_x'
,
QA_DB_MAX_CAT_PAGE_TAGS_LENGTH
);
elseif
(
preg_match
(
'/[\\+\\/]/'
,
$inslug
))
$errors
[
'slug'
]
=
qa_lang_sub
(
'admin/slug_bad_chars'
,
'+ /'
);
elseif
(
(
!
isset
(
$inparentid
)
)
&&
qa_admin_is_slug_reserved
(
$inslug
))
// only top level is a problem
elseif
(
!
isset
(
$inparentid
)
&&
qa_admin_is_slug_reserved
(
$inslug
))
// only top level is a problem
$errors
[
'slug'
]
=
qa_lang
(
'admin/slug_reserved'
);
elseif
(
isset
(
$matchcategoryid
)
&&
strcmp
(
$matchcategoryid
,
@
$editcategory
[
'categoryid'
]))
$errors
[
'slug'
]
=
qa_lang
(
'admin/category_already_used'
);
...
...
qa-include/pages/admin/admin-default.php
View file @
2089b48f
...
...
@@ -1300,7 +1300,7 @@ foreach ($showoptions as $optionname) {
foreach
(
$searchmodules
as
$modulename
=>
$module
)
{
$selectoptions
[
qa_html
(
$modulename
)]
=
strlen
(
$modulename
)
?
qa_html
(
$modulename
)
:
qa_lang_html
(
'options/option_default'
);
if
(
(
$modulename
==
$value
)
&&
method_exists
(
$module
,
'admin_form'
))
{
if
(
$modulename
==
$value
&&
method_exists
(
$module
,
'admin_form'
))
{
$optionfield
[
'note'
]
=
'<a href="'
.
qa_admin_module_options_path
(
'search'
,
$modulename
)
.
'">'
.
qa_lang_html
(
'admin/options'
)
.
'</a>'
;
}
}
...
...
qa-include/pages/admin/admin-flagged.php
View file @
2089b48f
qa-include/pages/admin/admin-hidden.php
View file @
2089b48f
...
...
@@ -142,7 +142,7 @@ if (count($questions)) {
);
}
if
(
(
!
qa_user_post_permit_error
(
'permit_delete_hidden'
,
$question
)
)
&&
!
$dependcounts
[
$qhiddenpostid
[
$key
]])
{
if
(
!
qa_user_post_permit_error
(
'permit_delete_hidden'
,
$question
)
&&
!
$dependcounts
[
$qhiddenpostid
[
$key
]])
{
// Possible values for popup: delete_q_popup, delete_a_popup, delete_c_popup
$buttons
[
'delete'
]
=
array
(
'tags'
=>
'name="admin_'
.
qa_html
(
$qhiddenpostid
[
$key
])
.
'_delete" onclick="return qa_admin_click(this);"'
,
...
...
qa-include/pages/admin/admin-moderate.php
View file @
2089b48f
qa-include/pages/admin/admin-pages.php
View file @
2089b48f
...
...
@@ -319,7 +319,7 @@ if (isset($editpage)) {
}
}
if
(
(
!
isset
(
$editpage
[
'pageid'
])
)
||
$nav
!=
@
$editpage
[
'nav'
])
{
if
(
!
isset
(
$editpage
[
'pageid'
]
)
||
$nav
!=
@
$editpage
[
'nav'
])
{
$positionvalue
=
isset
(
$previous
)
?
qa_lang_html_sub
(
'admin/after_x_tab'
,
qa_html
(
$previous
[
'title'
]))
:
qa_lang_html
(
$langkey
);
$positionoptions
[
$nav
.
(
isset
(
$previous
)
?
(
1
+
$maxposition
)
:
1
)]
=
$positionvalue
;
}
...
...
qa-include/pages/admin/admin-plugins.php
View file @
2089b48f
qa-include/pages/admin/admin-points.php
View file @
2089b48f
qa-include/pages/admin/admin-recalc.php
View file @
2089b48f
qa-include/pages/admin/admin-stats.php
View file @
2089b48f
qa-include/pages/admin/admin-userfields.php
View file @
2089b48f
qa-include/pages/admin/admin-usertitles.php
View file @
2089b48f
qa-include/pages/admin/admin-widgets.php
View file @
2089b48f
qa-include/pages/answers.php
View file @
2089b48f
qa-include/pages/categories.php
View file @
2089b48f
qa-include/pages/comments.php
View file @
2089b48f
qa-include/pages/confirm.php
View file @
2089b48f
qa-include/pages/default.php
View file @
2089b48f
...
...
@@ -94,7 +94,7 @@ if ($explicitqa && (!qa_is_http_post()) && !qa_has_custom_home())
// Then, if there's a slug that matches no category, check page modules provided by plugins
if
(
(
!
$explicitqa
)
&&
$countslugs
&&
!
isset
(
$categoryid
))
{
if
(
!
$explicitqa
&&
$countslugs
&&
!
isset
(
$categoryid
))
{
$pagemodules
=
qa_load_modules_with
(
'page'
,
'match_request'
);
$request
=
qa_request
();
...
...
@@ -110,7 +110,7 @@ if ((!$explicitqa) && $countslugs && !isset($categoryid)) {
// Then, check whether we are showing a custom home page
if
(
(
!
$explicitqa
)
&&
(
!
$countslugs
)
&&
qa_opt
(
'show_custom_home'
))
{
if
(
!
$explicitqa
&&
!
$countslugs
&&
qa_opt
(
'show_custom_home'
))
{
qa_set_template
(
'custom'
);
$qa_content
=
qa_content_prepare
();
$qa_content
[
'title'
]
=
qa_html
(
qa_opt
(
'custom_home_heading'
));
...
...
qa-include/pages/favorites-list.php
View file @
2089b48f
qa-include/pages/favorites.php
View file @
2089b48f
qa-include/pages/feedback.php
View file @
2089b48f
qa-include/pages/forgot.php
View file @
2089b48f
qa-include/pages/hot.php
View file @
2089b48f
qa-include/pages/ip.php
View file @
2089b48f
qa-include/pages/login.php
View file @
2089b48f
qa-include/pages/message.php
View file @
2089b48f
qa-include/pages/messages.php
View file @
2089b48f
qa-include/pages/question-post.php
View file @
2089b48f
...
...
@@ -98,7 +98,7 @@ if ($question['closeable']) {
else
$formtype
=
'q_close'
;
// keep editing if an error
}
elseif
(
(
$pagestate
==
'close'
)
&&
qa_page_q_permit_edit
(
$question
,
'permit_close_q'
,
$pageerror
))
}
elseif
(
$pagestate
==
'close'
&&
qa_page_q_permit_edit
(
$question
,
'permit_close_q'
,
$pageerror
))
$formtype
=
'q_close'
;
}
...
...
@@ -220,7 +220,7 @@ foreach ($commentsfollows as $commentid => $comment) {
$formtype
=
'c_edit'
;
$formpostid
=
$commentid
;
// keep editing if an error
}
}
elseif
(
(
$pagestate
==
(
'edit-'
.
$commentid
)
)
&&
qa_page_q_permit_edit
(
$comment
,
'permit_edit_c'
,
$pageerror
))
{
}
elseif
(
$pagestate
==
(
'edit-'
.
$commentid
)
&&
qa_page_q_permit_edit
(
$comment
,
'permit_edit_c'
,
$pageerror
))
{
$formtype
=
'c_edit'
;
$formpostid
=
$commentid
;
}
...
...
qa-include/pages/question-submit.php
View file @
2089b48f
...
...
@@ -468,7 +468,7 @@ function qa_page_q_add_c_submit($question, $parent, $commentsfollows, $usecaptch
$testwords
=
implode
(
' '
,
qa_string_to_words
(
$in
[
'content'
]));
foreach
(
$commentsfollows
as
$comment
)
{
if
(
(
$comment
[
'basetype'
]
==
'C'
)
&&
(
$comment
[
'parentid'
]
==
$parentid
)
&&
!
$comment
[
'hidden'
])
{
if
(
$comment
[
'basetype'
]
==
'C'
&&
$comment
[
'parentid'
]
==
$parentid
&&
!
$comment
[
'hidden'
])
{
if
(
implode
(
' '
,
qa_string_to_words
(
$comment
[
'content'
]))
==
$testwords
)
{
$errors
[
'content'
]
=
qa_lang_html
(
'question/duplicate_content'
);
break
;
...
...
qa-include/pages/question.php
View file @
2089b48f
...
...
@@ -198,10 +198,10 @@ if (qa_is_http_post() || strlen($pagestate))
$formrequested
=
isset
(
$formtype
);
if
(
(
!
$formrequested
)
&&
$question
[
'answerbutton'
])
{
if
(
!
$formrequested
&&
$question
[
'answerbutton'
])
{
$immedoption
=
qa_opt
(
'show_a_form_immediate'
);
if
(
(
$immedoption
==
'always'
)
||
((
$immedoption
==
'if_no_as'
)
&&
(
!
$question
[
'isbyuser'
])
&&
(
!
$question
[
'acount'
])
))
if
(
$immedoption
==
'always'
||
(
$immedoption
==
'if_no_as'
&&
!
$question
[
'isbyuser'
]
&&
!
$question
[
'acount'
]
))
$formtype
=
'a_add'
;
// show answer form by default
}
...
...
@@ -275,7 +275,7 @@ if ($formtype == 'a_edit') {
$jumptoanchor
=
'a'
.
$formpostid
;
}
elseif
(
(
$formtype
==
'a_add'
)
||
(
$question
[
'answerbutton'
]
&&
!
$formrequested
))
{
}
elseif
(
$formtype
==
'a_add'
||
(
$question
[
'answerbutton'
]
&&
!
$formrequested
))
{
$qa_content
[
'a_form'
]
=
qa_page_q_add_a_form
(
$qa_content
,
'anew'
,
$captchareason
,
$question
,
@
$anewin
,
@
$anewerrors
,
$formtype
==
'a_add'
,
$formrequested
);
if
(
$formrequested
)
{
...
...
@@ -294,16 +294,16 @@ if ($formtype == 'q_close') {
$qa_content
[
'q_view'
][
'c_form'
]
=
qa_page_q_close_q_form
(
$qa_content
,
$question
,
'close'
,
@
$closein
,
@
$closeerrors
);
$jumptoanchor
=
'close'
;
}
elseif
((
(
$formtype
==
'c_add'
)
&&
(
$formpostid
==
$questionid
)
)
||
(
$question
[
'commentbutton'
]
&&
!
$formrequested
))
{
// ...to be added
}
elseif
((
$formtype
==
'c_add'
&&
$formpostid
==
$questionid
)
||
(
$question
[
'commentbutton'
]
&&
!
$formrequested
))
{
// ...to be added
$qa_content
[
'q_view'
][
'c_form'
]
=
qa_page_q_add_c_form
(
$qa_content
,
$question
,
$question
,
'c'
.
$questionid
,
$captchareason
,
@
$cnewin
[
$questionid
],
@
$cnewerrors
[
$questionid
],
$formtype
==
'c_add'
);
if
(
(
$formtype
==
'c_add'
)
&&
(
$formpostid
==
$questionid
)
)
{
if
(
$formtype
==
'c_add'
&&
$formpostid
==
$questionid
)
{
$jumptoanchor
=
'c'
.
$questionid
;
$commentsall
=
$questionid
;
}
}
elseif
(
(
$formtype
==
'c_edit'
)
&&
(
@
$commentsfollows
[
$formpostid
][
'parentid'
]
==
$questionid
)
)
{
// ...being edited
}
elseif
(
$formtype
==
'c_edit'
&&
@
$commentsfollows
[
$formpostid
][
'parentid'
]
==
$questionid
)
{
// ...being edited
$qa_content
[
'q_view'
][
'c_form'
]
=
qa_page_q_edit_c_form
(
$qa_content
,
'c'
.
$formpostid
,
$commentsfollows
[
$formpostid
],
@
$ceditin
[
$formpostid
],
@
$cediterrors
[
$formpostid
]);
...
...
@@ -470,8 +470,3 @@ if (
return
$qa_content
;
/*
Omit PHP closing tag to help avoid accidental output
*/
qa-include/pages/questions.php
View file @
2089b48f
qa-include/pages/register.php
View file @
2089b48f
qa-include/pages/reset.php
View file @
2089b48f
qa-include/pages/search.php
View file @
2089b48f
qa-include/pages/tag.php
View file @
2089b48f
qa-include/pages/tags.php
View file @
2089b48f
qa-include/pages/unanswered.php
View file @
2089b48f
qa-include/pages/unsubscribe.php
View file @
2089b48f
...
...
@@ -51,7 +51,7 @@ if (!empty($inhandle)) { // match based on code and handle provided on URL
}
}
if
(
(
!
$unsubscribed
)
&&
isset
(
$loginuserid
))
{
// as a backup, also unsubscribe logged in user
if
(
!
$unsubscribed
&&
isset
(
$loginuserid
))
{
// as a backup, also unsubscribe logged in user
qa_db_user_set_flag
(
$loginuserid
,
QA_USER_FLAGS_NO_MAILINGS
,
true
);
$unsubscribed
=
true
;
}
...
...
qa-include/pages/updates.php
View file @
2089b48f
qa-include/pages/user-activity.php
View file @
2089b48f
qa-include/pages/user-answers.php
View file @
2089b48f
qa-include/pages/user-profile.php
View file @
2089b48f
...
...
@@ -75,7 +75,7 @@ $loginlevel = qa_get_logged_in_level();
if
(
!
QA_FINAL_EXTERNAL_USERS
)
{
// if we're using integrated user management, we can know and show more
require_once
QA_INCLUDE_DIR
.
'app/messages.php'
;
if
(
(
!
is_array
(
$userpoints
)
)
&&
!
is_array
(
$useraccount
))
if
(
!
is_array
(
$userpoints
)
&&
!
is_array
(
$useraccount
))
return
include
QA_INCLUDE_DIR
.
'qa-page-not-found.php'
;
$userid
=
$useraccount
[
'userid'
];
...
...
@@ -435,7 +435,7 @@ if (!QA_FINAL_EXTERNAL_USERS) {
if
(
qa_using_categories
())
{
$catleveladd
=
strlen
(
qa_get
(
'catleveladd'
))
>
0
;
if
(
(
!
$catleveladd
)
&&
!
count
(
$userlevels
))
{
if
(
!
$catleveladd
&&
!
count
(
$userlevels
))
{
$qa_content
[
'form_profile'
][
'fields'
][
'level'
][
'suffix'
]
=
strtr
(
qa_lang_html
(
'users/category_level_add'
),
array
(
'^1'
=>
'<a href="'
.
qa_path_html
(
qa_request
(),
array
(
'state'
=>
'edit'
,
'catleveladd'
=>
1
))
.
'">'
,
'^2'
=>
'</a>'
,
...
...
qa-include/pages/user-questions.php
View file @
2089b48f
qa-include/pages/user-wall.php
View file @
2089b48f
qa-include/pages/user.php
View file @
2089b48f
qa-include/pages/users-blocked.php
View file @
2089b48f
qa-include/pages/users-newest.php
View file @
2089b48f
qa-include/pages/users-special.php
View file @
2089b48f
qa-include/pages/users.php
View file @
2089b48f
qa-include/qa-base.php
View file @
2089b48f
...
...
@@ -1843,7 +1843,7 @@ function qa_suspend_event_reports($suspend = true)
* @param array $params
* @return mixed|void
*/
function
qa_report_event
(
$event
,
$userid
,
$handle
,
$cookieid
,
$params
=
array
())
function
qa_report_event
(
$event
,
$userid
,
$handle
,
$cookieid
,
$params
=
array
())
{
if
(
qa_to_override
(
__FUNCTION__
))
{
$args
=
func_get_args
();
return
qa_call_override
(
__FUNCTION__
,
$args
);
}
...
...
qa-include/qa-check-lang.php
View file @
2089b48f
This diff is collapsed.
Click to expand it.
qa-include/qa-install.php
View file @
2089b48f
...
...
@@ -40,7 +40,7 @@ if (!function_exists('qa_install_db_fail_handler')) {
* @param string $error
* @param string $query
*/
function
qa_install_db_fail_handler
(
$type
,
$errno
=
null
,
$error
=
null
,
$query
=
null
)
function
qa_install_db_fail_handler
(
$type
,
$errno
=
null
,
$error
=
null
,
$query
=
null
)
{
global
$pass_failure_from_install
;
...
...
qa-include/qa-page.php
View file @
2089b48f
qa-include/qa-theme-base.php
View file @
2089b48f
...
...
@@ -244,10 +244,10 @@ class qa_html_theme_base
}
//
From here on, we have a large number of class methods which output particular pieces of HTML markup
//
The calling chain is initiated from qa-page.php, or qa-ajax-*.php for refreshing parts of a page,
//
For most HTML elements, the name of the function is similar to the element's CSS class, for example:
//
search() outputs <div class="qa-search">, q_list() outputs <div class="qa-q-list">, etc...
//
From here on, we have a large number of class methods which output particular pieces of HTML markup
//
The calling chain is initiated from qa-page.php, or qa-ajax-*.php for refreshing parts of a page,
//
For most HTML elements, the name of the function is similar to the element's CSS class, for example:
//
search() outputs <div class="qa-search">, q_list() outputs <div class="qa-q-list">, etc...
public
function
doctype
()
{
...
...
qa-include/util/image.php
View file @
2089b48f
...
...
@@ -127,7 +127,7 @@ function qa_image_constrain(&$width, &$height, $maxwidth, $maxheight = null)
if
(
!
isset
(
$maxheight
))
$maxheight
=
$maxwidth
;
if
(
(
$width
>
$maxwidth
)
||
(
$height
>
$maxheight
)
)
{
if
(
$width
>
$maxwidth
||
$height
>
$maxheight
)
{
$multiplier
=
min
(
$maxwidth
/
$width
,
$maxheight
/
$height
);
$width
=
floor
(
$width
*
$multiplier
);
$height
=
floor
(
$height
*
$multiplier
);
...
...
qa-plugin/facebook-login/qa-facebook-login.php
View file @
2089b48f
...
...
@@ -52,7 +52,7 @@ class qa_facebook_login
public
function
facebook_html
(
$tourl
,
$logout
,
$context
)
{
if
(
(
$context
==
'login'
)
||
(
$context
==
'register'
)
)
if
(
$context
==
'login'
||
$context
==
'register'
)
$size
=
'large'
;
else
$size
=
'medium'
;
...
...
qa-plugin/xml-sitemap/qa-xml-sitemap.php
View file @
2089b48f
...
...
@@ -173,7 +173,7 @@ class qa_xml_sitemap
// User pages
if
(
(
!
QA_FINAL_EXTERNAL_USERS
)
&&
qa_opt
(
'xml_sitemap_show_users'
))
{
if
(
!
QA_FINAL_EXTERNAL_USERS
&&
qa_opt
(
'xml_sitemap_show_users'
))
{
$nextuserid
=
0
;
while
(
1
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment