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
a86b3426
Commit
a86b3426
authored
Aug 06, 2017
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix file references in comments
parent
5206a7ff
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
50 additions
and
50 deletions
+50
-50
format.php
qa-include/app/format.php
+2
-2
options.php
qa-include/app/options.php
+1
-1
page.php
qa-include/app/page.php
+3
-3
post-create.php
qa-include/app/post-create.php
+3
-3
post-update.php
qa-include/app/post-update.php
+14
-14
posts.php
qa-include/app/posts.php
+1
-1
recalc.php
qa-include/app/recalc.php
+1
-1
users-edit.php
qa-include/app/users-edit.php
+1
-1
users.php
qa-include/app/users.php
+1
-1
events.php
qa-include/db/events.php
+1
-1
favorites.php
qa-include/db/favorites.php
+4
-4
install.php
qa-include/db/install.php
+10
-10
selects.php
qa-include/db/selects.php
+1
-1
question-post.php
qa-include/pages/question-post.php
+1
-1
user-activity.php
qa-include/pages/user-activity.php
+1
-1
user-answers.php
qa-include/pages/user-answers.php
+1
-1
user-profile.php
qa-include/pages/user-profile.php
+1
-1
user-questions.php
qa-include/pages/user-questions.php
+1
-1
user-wall.php
qa-include/pages/user-wall.php
+1
-1
qa-theme-base.php
qa-include/qa-theme-base.php
+1
-1
No files found.
qa-include/app/format.php
View file @
a86b3426
...
...
@@ -278,7 +278,7 @@ function qa_ip_anchor_html($ip, $anchorhtml = null)
* $userid and $cookieid refer to the user *viewing* the page.
* $usershtml is an array of [user id] => [HTML representation of user] built ahead of time.
* $dummy is a placeholder (used to be $categories parameter but that's no longer needed)
* $options is an array which sets what is displayed (see qa_post_html_defaults() in
qa-app-
options.php)
* $options is an array which sets what is displayed (see qa_post_html_defaults() in
/qa-include/app/
options.php)
* If something is missing from $post (e.g. ['content']), correponding HTML also omitted.
* @param $post
* @param $userid
...
...
@@ -679,7 +679,7 @@ function qa_post_html_fields($post, $userid, $cookieid, $usershtml, $dummy, $opt
* Generate array of mostly HTML representing a message, to be passed to theme layer.
*
* @param array $message The message object (as retrieved from database).
* @param array $options Viewing options (see qa_message_html_defaults() in app/options.php).
* @param array $options Viewing options (see qa_message_html_defaults() in
/qa-include/
app/options.php).
* @return array The HTML.
*/
function
qa_message_html_fields
(
$message
,
$options
=
array
())
...
...
qa-include/app/options.php
View file @
a86b3426
...
...
@@ -641,7 +641,7 @@ function qa_message_html_defaults()
/**
* Return $voteview parameter to pass to qa_post_html_fields() in
qa-app-
format.php.
* Return $voteview parameter to pass to qa_post_html_fields() in
/qa-include/app/
format.php.
* @param $postorbasetype The post, or for compatibility just a basetype, i.e. 'Q', 'A' or 'C'
* @param bool $full Whether full post is shown
* @param bool $enabledif Whether to do checks for voting buttons (i.e. will always disable voting if false)
...
...
qa-include/app/page.php
View file @
a86b3426
...
...
@@ -167,7 +167,7 @@ function qa_check_page_clicks()
/**
* Run the appropriate
qa-page-
*.php file for this request and return back the $qa_content it passed
* Run the appropriate
/qa-include/pages/
*.php file for this request and return back the $qa_content it passed
*/
function
qa_get_request_content
()
{
...
...
@@ -387,7 +387,7 @@ function qa_do_content_stats($qa_content)
// Other functions which might be called from anywhere
/**
* Return an array of the default Q2A requests and which
qa-page-
*.php file implements them
* Return an array of the default Q2A requests and which
/qa-include/pages/
*.php file implements them
* If the key of an element ends in /, it should be used for any request with that key as its prefix
*/
function
qa_page_routing
()
...
...
@@ -615,7 +615,7 @@ function qa_content_prepare($voting = false, $categoryids = null)
);
}
// Only the 'level' permission error prevents the menu option being shown - others reported on
qa-page-
ask.php
// Only the 'level' permission error prevents the menu option being shown - others reported on
/qa-include/pages/
ask.php
if
(
qa_opt
(
'nav_ask'
)
&&
qa_user_maximum_permit_error
(
'permit_post_q'
)
!=
'level'
)
{
$qa_content
[
'navigation'
][
'main'
][
'ask'
]
=
array
(
...
...
qa-include/app/post-create.php
View file @
a86b3426
...
...
@@ -47,7 +47,7 @@ function qa_combine_notify_email($userid, $notify, $email)
/**
* Add a question (application level) - create record, update appropriate counts, index it, send notifications.
* If question is follow-on from an answer, $followanswer should contain answer database record, otherwise null.
* See
qa-app-
posts.php for a higher-level function which is easier to use.
* See
/qa-include/app/
posts.php for a higher-level function which is easier to use.
* @param $followanswer
* @param $userid
* @param $handle
...
...
@@ -191,7 +191,7 @@ function qa_post_index($postid, $type, $questionid, $parentid, $title, $content,
/**
* Add an answer (application level) - create record, update appropriate counts, index it, send notifications.
* $question should contain database record for the question this is an answer to.
* See
qa-app-
posts.php for a higher-level function which is easier to use.
* See
/qa-include/app/
posts.php for a higher-level function which is easier to use.
* @param $userid
* @param $handle
* @param $cookieid
...
...
@@ -261,7 +261,7 @@ function qa_update_q_counts_for_a($questionid)
* If this is a comment on an answer, $answer should contain database record for the answer, otherwise null.
* $commentsfollows should contain database records for all previous comments on the same question or answer,
* but it can also contain other records that are ignored.
* See
qa-app-
posts.php for a higher-level function which is easier to use.
* See
/qa-include/app/
posts.php for a higher-level function which is easier to use.
* @param $userid
* @param $handle
* @param $cookieid
...
...
qa-include/app/post-update.php
View file @
a86b3426
...
...
@@ -42,7 +42,7 @@ define('QA_POST_STATUS_QUEUED', 2);
* and $name, then reindex based on $text. For backwards compatibility if $name is null then the name will not be
* changed. Pass the question's database record before changes in $oldquestion and details of the user doing this in
* $userid, $handle and $cookieid. Set $remoderate to true if the question should be requeued for moderation if
* modified. Set $silent to true to not mark the question as edited. Reports event as appropriate. See
qa-app-
posts.php
* modified. Set $silent to true to not mark the question as edited. Reports event as appropriate. See
/qa-include/app/
posts.php
* for a higher-level function which is easier to use.
* @param $oldquestion
* @param $title
...
...
@@ -140,7 +140,7 @@ function qa_question_set_content($oldquestion, $title, $content, $format, $text,
* Set the selected answer (application level) of $oldquestion to $selchildid. Pass details of the user doing this
* in $userid, $handle and $cookieid, and the database records for the selected and deselected answers in $answers.
* Handles user points values and notifications.
* See
qa-app-
posts.php for a higher-level function which is easier to use.
* See
/qa-include/app/
posts.php for a higher-level function which is easier to use.
* @param $userid
* @param $handle
* @param $cookieid
...
...
@@ -183,7 +183,7 @@ function qa_question_set_selchildid($userid, $handle, $cookieid, $oldquestion, $
/**
* Reopen $oldquestion if it was closed. Pass details of the user doing this in $userid, $handle and $cookieid, and the
* $oldclosepost (to match $oldquestion['closedbyid']) if any.
* See
qa-app-
posts.php for a higher-level function which is easier to use.
* See
/qa-include/app/
posts.php for a higher-level function which is easier to use.
* @param $oldquestion
* @param $oldclosepost
* @param $userid
...
...
@@ -211,7 +211,7 @@ function qa_question_close_clear($oldquestion, $oldclosepost, $userid, $handle,
/**
* Close $oldquestion as a duplicate of the question with id $originalpostid. Pass details of the user doing this in
* $userid, $handle and $cookieid, and the $oldclosepost (to match $oldquestion['closedbyid']) if any. See
*
qa-app-
posts.php for a higher-level function which is easier to use.
*
/qa-include/app/
posts.php for a higher-level function which is easier to use.
* @param $oldquestion
* @param $oldclosepost
* @param $originalpostid
...
...
@@ -237,7 +237,7 @@ function qa_question_close_duplicate($oldquestion, $oldclosepost, $originalposti
/**
* Close $oldquestion with the reason given in $note. Pass details of the user doing this in $userid, $handle and
* $cookieid, and the $oldclosepost (to match $oldquestion['closedbyid']) if any.
* See
qa-app-
posts.php for a higher-level function which is easier to use.
* See
/qa-include/app/
posts.php for a higher-level function which is easier to use.
* @param $oldquestion
* @param $oldclosepost
* @param $note
...
...
@@ -292,7 +292,7 @@ function qa_question_set_hidden($oldquestion, $hidden, $userid, $handle, $cookie
* question in $answers, the database records for all comments on the question or the question's answers in
* $commentsfollows ($commentsfollows can also contain records for follow-on questions which are ignored), and
* $closepost to match $oldquestion['closedbyid'] (if any). Handles indexing, user points, cached counts and event
* reports. See
qa-app-
posts.php for a higher-level function which is easier to use.
* reports. See
/qa-include/app/
posts.php for a higher-level function which is easier to use.
* @param $oldquestion
* @param $status
* @param $userid
...
...
@@ -440,7 +440,7 @@ function qa_question_set_status($oldquestion, $status, $userid, $handle, $cookie
* records for all comments on the question or the question's answers in $commentsfollows ($commentsfollows can also
* contain records for follow-on questions which are ignored), and $closepost to match $oldquestion['closedbyid'] (if any).
* Set $silent to true to not mark the question as edited. Handles cached counts and event reports and will reset category
* IDs and paths for all answers and comments. See
qa-app-
posts.php for a higher-level function which is easier to use.
* IDs and paths for all answers and comments. See
/qa-include/app/
posts.php for a higher-level function which is easier to use.
* @param $oldquestion
* @param $categoryid
* @param $userid
...
...
@@ -499,7 +499,7 @@ function qa_question_set_category($oldquestion, $categoryid, $userid, $handle, $
* Permanently delete a question (application level) from the database. The question must not have any answers or
* comments on it. Pass details of the user doing this in $userid, $handle and $cookieid, and $closepost to match
* $oldquestion['closedbyid'] (if any). Handles unindexing, votes, points, cached counts and event reports.
* See
qa-app-
posts.php for a higher-level function which is easier to use.
* See
/qa-include/app/
posts.php for a higher-level function which is easier to use.
* @param $oldquestion
* @param $userid
* @param $handle
...
...
@@ -598,7 +598,7 @@ function qa_post_unindex($postid)
* record before changes in $oldanswer, the question's in $question, and details of the user doing this in $userid,
* $handle and $cookieid. Set $remoderate to true if the question should be requeued for moderation if modified. Set
* $silent to true to not mark the question as edited. Handle indexing and event reports as appropriate. See
*
qa-app-
posts.php for a higher-level function which is easier to use.
*
/qa-include/app/
posts.php for a higher-level function which is easier to use.
* @param $oldanswer
* @param $content
* @param $format
...
...
@@ -689,7 +689,7 @@ function qa_answer_set_hidden($oldanswer, $hidden, $userid, $handle, $cookieid,
* Set the status (application level) of $oldanswer to $status, one of the QA_POST_STATUS_* constants above. Pass
* details of the user doing this in $userid, $handle and $cookieid, the database record for the question in $question,
* and the database records for all comments on the answer in $commentsfollows ($commentsfollows can also contain other
* records which are ignored). Handles indexing, user points, cached counts and event reports. See
qa-app-
posts.php for
* records which are ignored). Handles indexing, user points, cached counts and event reports. See
/qa-include/app/
posts.php for
* a higher-level function which is easier to use.
* @param $oldanswer
* @param $status
...
...
@@ -809,7 +809,7 @@ function qa_answer_set_status($oldanswer, $status, $userid, $handle, $cookieid,
* Permanently delete an answer (application level) from the database. The answer must not have any comments or
* follow-on questions. Pass the database record for the question in $question and details of the user doing this
* in $userid, $handle and $cookieid. Handles unindexing, votes, points, cached counts and event reports.
* See
qa-app-
posts.php for a higher-level function which is easier to use.
* See
/qa-include/app/
posts.php for a higher-level function which is easier to use.
* @param $oldanswer
* @param $question
* @param $userid
...
...
@@ -889,7 +889,7 @@ function qa_answer_set_userid($oldanswer, $userid, $handle, $cookieid)
* record before changes in $oldcomment, details of the user doing this in $userid, $handle and $cookieid, the
* antecedent question in $question and the answer's database record in $answer if this is a comment on an answer,
* otherwise null. Set $remoderate to true if the question should be requeued for moderation if modified. Set $silent
* to true to not mark the question as edited. Handles unindexing and event reports. See
qa-app-
posts.php for a
* to true to not mark the question as edited. Handles unindexing and event reports. See
/qa-include/app/
posts.php for a
* higher-level function which is easier to use.
* @param $oldcomment
* @param $content
...
...
@@ -1083,7 +1083,7 @@ function qa_comment_set_hidden($oldcomment, $hidden, $userid, $handle, $cookieid
* Set the status (application level) of $oldcomment to $status, one of the QA_POST_STATUS_* constants above. Pass the
* antecedent question's record in $question, details of the user doing this in $userid, $handle and $cookieid, and the
* answer's database record in $answer if this is a comment on an answer, otherwise null. Handles indexing, user
* points, cached counts and event reports. See
qa-app-
posts.php for a higher-level function which is easier to use.
* points, cached counts and event reports. See
/qa-include/app/
posts.php for a higher-level function which is easier to use.
* @param $oldcomment
* @param $status
* @param $userid
...
...
@@ -1203,7 +1203,7 @@ function qa_comment_set_status($oldcomment, $status, $userid, $handle, $cookieid
* Permanently delete a comment in $oldcomment (application level) from the database. Pass the database question in $question
* and the answer's database record in $answer if this is a comment on an answer, otherwise null. Pass details of the user
* doing this in $userid, $handle and $cookieid. Handles unindexing, points, cached counts and event reports.
* See
qa-app-
posts.php for a higher-level function which is easier to use.
* See
/qa-include/app/
posts.php for a higher-level function which is easier to use.
* @param $oldcomment
* @param $question
* @param $parent
...
...
qa-include/app/posts.php
View file @
a86b3426
...
...
@@ -250,7 +250,7 @@ function qa_post_set_hidden($postid, $hidden = true, $byuserid = null)
/**
* Change the status of $postid to $status, which should be one of the QA_POST_STATUS_* constants defined in
*
qa-app-
post-update.php. Pass the identify of the user making this change in $byuserid (or null for a silent change).
*
/qa-include/app/
post-update.php. Pass the identify of the user making this change in $byuserid (or null for a silent change).
* @param $postid
* @param $status
* @param $byuserid
...
...
qa-include/app/recalc.php
View file @
a86b3426
...
...
@@ -49,7 +49,7 @@
Recalculated in dorebuildupdates:
=================================
^sharedevents (all): per-entity event streams (see big comment in
qa-db-
favorites.php)
^sharedevents (all): per-entity event streams (see big comment in
/qa-include/db/
favorites.php)
^userevents (all): per-subscriber event streams
[but these are not entirely redundant since they can contain historical information no longer in ^posts]
...
...
qa-include/app/users-edit.php
View file @
a86b3426
...
...
@@ -330,7 +330,7 @@ function qa_complete_confirm($userid, $email, $handle)
/**
* Set the user level of user $userid with $handle to $level (one of the QA_USER_LEVEL_* constraints in
qa-app-
users.php)
* Set the user level of user $userid with $handle to $level (one of the QA_USER_LEVEL_* constraints in
/qa-include/app/
users.php)
* Pass the previous user level in $oldlevel. Reports the appropriate event, assumes change performed by the logged in user.
* @param $userid
* @param $handle
...
...
qa-include/app/users.php
View file @
a86b3426
...
...
@@ -1008,7 +1008,7 @@ function qa_user_maximum_permit_error($permitoption, $limitaction = null, $check
* Check whether the logged in user has permission to perform an action.
*
* @param string $permitoption The permission to check (if null, this simply checks whether the user is blocked).
* @param string $limitaction Constant from
qa-app-
limits.php to check against user or IP rate limits.
* @param string $limitaction Constant from
/qa-include/app/
limits.php to check against user or IP rate limits.
* @param int $userlevel A QA_USER_LEVEL_* constant to consider the user at a different level to usual (e.g. if
* they are performing this action in a category for which they have elevated privileges).
* @param bool $checkblocks Whether to check the user's blocked status.
...
...
qa-include/db/events.php
View file @
a86b3426
...
...
@@ -30,7 +30,7 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
* $lastpostid whose antecedent question is $questionid, and was caused by $lastuserid. Pass a unix $timestamp for the
* event time or leave as null to use now. This will add the event both to the entity's shared stream, and the
* individual user streams for any users following the entity not via its shared stream (See long comment in
*
qa-db-
favorites.php). Also handles truncation.
*
/qa-include/db/
favorites.php). Also handles truncation.
* @param $entitytype
* @param $entityid
* @param $questionid
...
...
qa-include/db/favorites.php
View file @
a86b3426
...
...
@@ -92,10 +92,10 @@ if (!defined('QA_VERSION')) { // don't allow this page to be requested directly
So we could keep track of the maximum number of event streams any user is subscribed to, and use its square root.
Instead of that, we adopt an on-the-fly approach. We start by setting T=10 (see 'max_copy_user_updates' in
qa-app-options.php) since it's no big deal to write 10 rows to a table. Recall that whenever an event stream gets
more than T subscribers, we switch those subscribers over to the shared stream. At that point, we check the maximum
number of (total) shared streams that any of those users are subscribed to. If this is above T, that means that our
maximum cost of retrieving a list of news updates is starting to go past our maximum cost of recording an event. So
/qa-include/app/options.php) since it's no big deal to write 10 rows to a table. Recall that whenever an event stream
gets more than T subscribers, we switch those subscribers over to the shared stream. At that point, we check the
maximum number of (total) shared streams that any of those users are subscribed to. If this is above T, that means that
our
maximum cost of retrieving a list of news updates is starting to go past our maximum cost of recording an event. So
we rebalance things out by increasing T as appropriate, for use in future cases.
Note that once an event stream has made this switch, to be accessed only via its shared stream, we don't go back.
...
...
qa-include/db/install.php
View file @
a86b3426
...
...
@@ -78,7 +78,7 @@ function qa_db_table_definitions()
* In MySQL versions prior to 5.0.3, VARCHAR(x) columns will be silently converted to TEXT where x>255
* See box at top of
qa-app-
recalc.php for a list of redundant (non-normal) information in the database
* See box at top of
/qa-include/app/
recalc.php for a list of redundant (non-normal) information in the database
* Starting in version 1.2, we explicitly name keys and foreign key constraints, instead of allowing MySQL
to name these by default. Our chosen names match the default names that MySQL would have assigned, and
...
...
@@ -116,7 +116,7 @@ function qa_db_table_definitions()
'emailcode'
=>
'CHAR(8) CHARACTER SET ascii NOT NULL DEFAULT \'\''
,
// for email confirmation or password reset
'sessioncode'
=>
'CHAR(8) CHARACTER SET ascii NOT NULL DEFAULT \'\''
,
// for comparing against session cookie in browser
'sessionsource'
=>
'VARCHAR (16) CHARACTER SET ascii DEFAULT \'\''
,
// e.g. facebook, openid, etc...
'flags'
=>
'SMALLINT UNSIGNED NOT NULL DEFAULT 0'
,
// see constants at top of
qa-app-
users.php
'flags'
=>
'SMALLINT UNSIGNED NOT NULL DEFAULT 0'
,
// see constants at top of
/qa-include/app/
users.php
'wallposts'
=>
'MEDIUMINT NOT NULL DEFAULT 0'
,
// cached count of wall posts
'PRIMARY KEY (userid)'
,
'KEY email (email)'
,
...
...
@@ -136,7 +136,7 @@ function qa_db_table_definitions()
'userlevels'
=>
array
(
'userid'
=>
$useridcoltype
.
' NOT NULL'
,
// the user who has this level
'entitytype'
=>
'CHAR(1) CHARACTER SET ascii NOT NULL'
,
// see
qa-app-
updates.php
'entitytype'
=>
'CHAR(1) CHARACTER SET ascii NOT NULL'
,
// see
/qa-include/app/
updates.php
'entityid'
=>
'INT UNSIGNED NOT NULL'
,
// relevant postid / userid / tag wordid / categoryid
'level'
=>
'TINYINT UNSIGNED'
,
// if not NULL, special permission level for that user and that entity
'UNIQUE userid (userid, entitytype, entityid)'
,
...
...
@@ -155,7 +155,7 @@ function qa_db_table_definitions()
'title'
=>
'VARCHAR('
.
QA_DB_MAX_PROFILE_TITLE_LENGTH
.
') NOT NULL'
,
// to match title column in userprofile table
'content'
=>
'VARCHAR('
.
QA_DB_MAX_PROFILE_TITLE_LENGTH
.
')'
,
// label for display on user profile pages - NULL means use default
'position'
=>
'SMALLINT UNSIGNED NOT NULL'
,
'flags'
=>
'TINYINT UNSIGNED NOT NULL'
,
// QA_FIELD_FLAGS_* at top of
qa-app-
users.php
'flags'
=>
'TINYINT UNSIGNED NOT NULL'
,
// QA_FIELD_FLAGS_* at top of
/qa-include/app/
users.php
'permit'
=>
'TINYINT UNSIGNED'
,
// minimum user level required to view (uses QA_PERMIT_* constants), null means no restriction
'PRIMARY KEY (fieldid)'
,
),
...
...
@@ -179,7 +179,7 @@ function qa_db_table_definitions()
'userfavorites'
=>
array
(
'userid'
=>
$useridcoltype
.
' NOT NULL'
,
// the user who favorited the entity
'entitytype'
=>
'CHAR(1) CHARACTER SET ascii NOT NULL'
,
// see
qa-app-
updates.php
'entitytype'
=>
'CHAR(1) CHARACTER SET ascii NOT NULL'
,
// see
/qa-include/app/
updates.php
'entityid'
=>
'INT UNSIGNED NOT NULL'
,
// favorited postid / userid / tag wordid / categoryid
'nouserevents'
=>
'TINYINT UNSIGNED NOT NULL'
,
// do we skip writing events to the user stream?
'PRIMARY KEY (userid, entitytype, entityid)'
,
...
...
@@ -200,11 +200,11 @@ function qa_db_table_definitions()
'userevents'
=>
array
(
'userid'
=>
$useridcoltype
.
' NOT NULL'
,
// the user to be informed about this event in their updates
'entitytype'
=>
'CHAR(1) CHARACTER SET ascii NOT NULL'
,
// see
qa-app-
updates.php
'entitytype'
=>
'CHAR(1) CHARACTER SET ascii NOT NULL'
,
// see
/qa-include/app/
updates.php
'entityid'
=>
'INT UNSIGNED NOT NULL'
,
// favorited source of event - see userfavorites table - 0 means not from a favorite
'questionid'
=>
'INT UNSIGNED NOT NULL'
,
// the affected question
'lastpostid'
=>
'INT UNSIGNED NOT NULL'
,
// what part of question was affected
'updatetype'
=>
'CHAR(1) CHARACTER SET ascii'
,
// what was done to this part - see
qa-app-
updates.php
'updatetype'
=>
'CHAR(1) CHARACTER SET ascii'
,
// what was done to this part - see
/qa-include/app/
updates.php
'lastuserid'
=>
$useridcoltype
,
// which user (if any) did this action
'updated'
=>
'DATETIME NOT NULL'
,
// when the event happened
'KEY userid (userid, updated)'
,
// for truncation
...
...
@@ -212,7 +212,7 @@ function qa_db_table_definitions()
),
'sharedevents'
=>
array
(
'entitytype'
=>
'CHAR(1) CHARACTER SET ascii NOT NULL'
,
// see
qa-app-
updates.php
'entitytype'
=>
'CHAR(1) CHARACTER SET ascii NOT NULL'
,
// see
/qa-include/app/
updates.php
'entityid'
=>
'INT UNSIGNED NOT NULL'
,
// see userfavorites table
'questionid'
=>
'INT UNSIGNED NOT NULL'
,
// see userevents table
'lastpostid'
=>
'INT UNSIGNED NOT NULL'
,
// see userevents table
...
...
@@ -305,7 +305,7 @@ function qa_db_table_definitions()
'format'
=>
'VARCHAR('
.
QA_DB_MAX_FORMAT_LENGTH
.
') CHARACTER SET ascii NOT NULL DEFAULT \'\''
,
// format of content, e.g. 'html'
'created'
=>
'DATETIME NOT NULL'
,
'updated'
=>
'DATETIME'
,
// time of last update
'updatetype'
=>
'CHAR(1) CHARACTER SET ascii'
,
// see
qa-app-
updates.php
'updatetype'
=>
'CHAR(1) CHARACTER SET ascii'
,
// see
/qa-include/app/
updates.php
'title'
=>
'VARCHAR('
.
QA_DB_MAX_TITLE_LENGTH
.
')'
,
'content'
=>
'VARCHAR('
.
QA_DB_MAX_CONTENT_LENGTH
.
')'
,
'tags'
=>
'VARCHAR('
.
QA_DB_MAX_TAGS_LENGTH
.
')'
,
// string of tags separated by commas
...
...
@@ -445,7 +445,7 @@ function qa_db_table_definitions()
'userlimits'
=>
array
(
'userid'
=>
$useridcoltype
.
' NOT NULL'
,
'action'
=>
'CHAR(1) CHARACTER SET ascii NOT NULL'
,
// see constants at top of
qa-app-
limits.php
'action'
=>
'CHAR(1) CHARACTER SET ascii NOT NULL'
,
// see constants at top of
/qa-include/app/
limits.php
'period'
=>
'INT UNSIGNED NOT NULL'
,
// integer representing hour of last action
'count'
=>
'SMALLINT UNSIGNED NOT NULL'
,
// how many of this action has been performed within that hour
'UNIQUE userid (userid, action)'
,
...
...
qa-include/db/selects.php
View file @
a86b3426
...
...
@@ -1890,7 +1890,7 @@ function qa_db_user_favorite_non_qs_selectspec($userid)
* Return the selectspec to retrieve the list of recent updates for $userid. Set $forfavorites to whether this should
* include updates on the user's favorites and $forcontent to whether it should include responses to user's content.
* This combines events from both the user's stream and the the shared stream for any entities which the user has
* favorited and which no longer post to user streams (see long comment in
qa-db-
favorites.php).
* favorited and which no longer post to user streams (see long comment in
/qa-include/db/
favorites.php).
* @param $userid
* @param bool $forfavorites
* @param bool $forcontent
...
...
qa-include/pages/question-post.php
View file @
a86b3426
...
...
@@ -228,7 +228,7 @@ foreach ($commentsfollows as $commentid => $comment) {
}
// Functions used above - also see functions in
qa-page-
question-submit.php (which are shared with Ajax)
// Functions used above - also see functions in
/qa-include/pages/
question-submit.php (which are shared with Ajax)
/*
Redirects back to the question page, with the specified parameters
...
...
qa-include/pages/user-activity.php
View file @
a86b3426
...
...
@@ -28,7 +28,7 @@ require_once QA_INCLUDE_DIR . 'db/selects.php';
require_once
QA_INCLUDE_DIR
.
'app/format.php'
;
// $handle, $userhtml are already set by
qa-page-
user.php - also $userid if using external user integration
// $handle, $userhtml are already set by
/qa-include/page/
user.php - also $userid if using external user integration
// Find the recent activity for this user
...
...
qa-include/pages/user-answers.php
View file @
a86b3426
...
...
@@ -28,7 +28,7 @@ require_once QA_INCLUDE_DIR . 'db/selects.php';
require_once
QA_INCLUDE_DIR
.
'app/format.php'
;
// $handle, $userhtml are already set by
qa-page-
user.php - also $userid if using external user integration
// $handle, $userhtml are already set by
/qa-include/page/
user.php - also $userid if using external user integration
$start
=
qa_get_start
();
...
...
qa-include/pages/user-profile.php
View file @
a86b3426
...
...
@@ -30,7 +30,7 @@ require_once QA_INCLUDE_DIR . 'app/limits.php';
require_once
QA_INCLUDE_DIR
.
'app/updates.php'
;
// $handle, $userhtml are already set by
qa-page-
user.php - also $userid if using external user integration
// $handle, $userhtml are already set by
/qa-include/page/
user.php - also $userid if using external user integration
// Redirect to 'My Account' page if button clicked
...
...
qa-include/pages/user-questions.php
View file @
a86b3426
...
...
@@ -28,7 +28,7 @@ require_once QA_INCLUDE_DIR . 'db/selects.php';
require_once
QA_INCLUDE_DIR
.
'app/format.php'
;
// $handle, $userhtml are already set by
qa-page-
user.php - also $userid if using external user integration
// $handle, $userhtml are already set by
/qa-include/page/
user.php - also $userid if using external user integration
$start
=
qa_get_start
();
...
...
qa-include/pages/user-wall.php
View file @
a86b3426
...
...
@@ -34,7 +34,7 @@ if (QA_FINAL_EXTERNAL_USERS)
qa_fatal_error
(
'User accounts are handled by external code'
);
// $handle, $userhtml are already set by
qa-page-
user.php
// $handle, $userhtml are already set by
/qa-include/page/
user.php
$start
=
qa_get_start
();
...
...
qa-include/qa-theme-base.php
View file @
a86b3426
...
...
@@ -246,7 +246,7 @@ 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,
// The calling chain is initiated from qa-page.php, or
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...
...
...
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