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
69f0154b
Commit
69f0154b
authored
Apr 16, 2014
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reformat code for users pages, tags page, and base theme
And normalize some line endings
parent
e707b833
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
45 additions
and
45 deletions
+45
-45
qa-page-messages.php
qa-include/qa-page-messages.php
+0
-0
qa-page-tags.php
qa-include/qa-page-tags.php
+15
-15
qa-page-users-blocked.php
qa-include/qa-page-users-blocked.php
+9
-9
qa-page-users-special.php
qa-include/qa-page-users-special.php
+9
-9
qa-page-users.php
qa-include/qa-page-users.php
+12
-12
qa-theme-base.php
qa-include/qa-theme-base.php
+0
-0
PHPMailerAutoload.php
qa-include/vendor/PHPMailer/PHPMailerAutoload.php
+0
-0
class.phpmailer.php
qa-include/vendor/PHPMailer/class.phpmailer.php
+0
-0
class.smtp.php
qa-include/vendor/PHPMailer/class.smtp.php
+0
-0
htmLawed.php
qa-include/vendor/htmLawed.php
+0
-0
No files found.
qa-include/qa-page-messages.php
View file @
69f0154b
qa-include/qa-page-tags.php
View file @
69f0154b
...
...
@@ -35,49 +35,49 @@
// Get popular tags
$start
=
qa_get_start
();
$userid
=
qa_get_logged_in_userid
();
$populartags
=
qa_db_select_with_pending
(
$start
=
qa_get_start
();
$userid
=
qa_get_logged_in_userid
();
$populartags
=
qa_db_select_with_pending
(
qa_db_popular_tags_selectspec
(
$start
,
qa_opt_if_loaded
(
'page_size_tags'
))
);
$tagcount
=
qa_opt
(
'cache_tagcount'
);
$pagesize
=
qa_opt
(
'page_size_tags'
);
$tagcount
=
qa_opt
(
'cache_tagcount'
);
$pagesize
=
qa_opt
(
'page_size_tags'
);
// Prepare content for theme
$qa_content
=
qa_content_prepare
();
$qa_content
=
qa_content_prepare
();
$qa_content
[
'title'
]
=
qa_lang_html
(
'main/popular_tags'
);
$qa_content
[
'title'
]
=
qa_lang_html
(
'main/popular_tags'
);
$qa_content
[
'ranking'
]
=
array
(
$qa_content
[
'ranking'
]
=
array
(
'items'
=>
array
(),
'rows'
=>
ceil
(
$pagesize
/
qa_opt
(
'columns_tags'
)),
'type'
=>
'tags'
);
if
(
count
(
$populartags
))
{
$favoritemap
=
qa_get_favorite_non_qs_map
();
$favoritemap
=
qa_get_favorite_non_qs_map
();
$output
=
0
;
$output
=
0
;
foreach
(
$populartags
as
$word
=>
$count
)
{
$qa_content
[
'ranking'
][
'items'
][]
=
array
(
$qa_content
[
'ranking'
][
'items'
][]
=
array
(
'label'
=>
qa_tag_html
(
$word
,
false
,
@
$favoritemap
[
'tag'
][
qa_strtolower
(
$word
)]),
'count'
=>
number_format
(
$count
),
);
if
((
++
$output
)
>=
$pagesize
)
if
((
++
$output
)
>=
$pagesize
)
break
;
}
}
else
$qa_content
[
'title'
]
=
qa_lang_html
(
'main/no_tags_found'
);
$qa_content
[
'title'
]
=
qa_lang_html
(
'main/no_tags_found'
);
$qa_content
[
'page_links'
]
=
qa_html_page_links
(
qa_request
(),
$start
,
$pagesize
,
$tagcount
,
qa_opt
(
'pages_prev_next'
));
$qa_content
[
'page_links'
]
=
qa_html_page_links
(
qa_request
(),
$start
,
$pagesize
,
$tagcount
,
qa_opt
(
'pages_prev_next'
));
if
(
empty
(
$qa_content
[
'page_links'
]))
$qa_content
[
'suggest_next'
]
=
qa_html_suggest_ask
();
$qa_content
[
'suggest_next'
]
=
qa_html_suggest_ask
();
return
$qa_content
;
...
...
qa-include/qa-page-users-blocked.php
View file @
69f0154b
...
...
@@ -42,44 +42,44 @@
// Get list of blocked users
$users
=
qa_db_select_with_pending
(
qa_db_users_with_flag_selectspec
(
QA_USER_FLAGS_USER_BLOCKED
));
$users
=
qa_db_select_with_pending
(
qa_db_users_with_flag_selectspec
(
QA_USER_FLAGS_USER_BLOCKED
));
// Check we have permission to view this page (moderator or above)
if
(
qa_get_logged_in_level
()
<
QA_USER_LEVEL_MODERATOR
)
{
$qa_content
=
qa_content_prepare
();
$qa_content
[
'error'
]
=
qa_lang_html
(
'users/no_permission'
);
$qa_content
=
qa_content_prepare
();
$qa_content
[
'error'
]
=
qa_lang_html
(
'users/no_permission'
);
return
$qa_content
;
}
// Get userids and handles of retrieved users
$usershtml
=
qa_userids_handles_html
(
$users
);
$usershtml
=
qa_userids_handles_html
(
$users
);
// Prepare content for theme
$qa_content
=
qa_content_prepare
();
$qa_content
=
qa_content_prepare
();
$qa_content
[
'title'
]
=
count
(
$users
)
?
qa_lang_html
(
'users/blocked_users'
)
:
qa_lang_html
(
'users/no_blocked_users'
);
$qa_content
[
'title'
]
=
count
(
$users
)
?
qa_lang_html
(
'users/blocked_users'
)
:
qa_lang_html
(
'users/no_blocked_users'
);
$qa_content
[
'ranking'
]
=
array
(
$qa_content
[
'ranking'
]
=
array
(
'items'
=>
array
(),
'rows'
=>
ceil
(
count
(
$users
)
/
qa_opt
(
'columns_users'
)),
'type'
=>
'users'
);
foreach
(
$users
as
$user
)
{
$qa_content
[
'ranking'
][
'items'
][]
=
array
(
$qa_content
[
'ranking'
][
'items'
][]
=
array
(
'label'
=>
$usershtml
[
$user
[
'userid'
]],
'score'
=>
qa_html
(
qa_user_level_string
(
$user
[
'level'
])),
'raw'
=>
$user
,
);
}
$qa_content
[
'navigation'
][
'sub'
]
=
qa_users_sub_navigation
();
$qa_content
[
'navigation'
][
'sub'
]
=
qa_users_sub_navigation
();
return
$qa_content
;
...
...
qa-include/qa-page-users-special.php
View file @
69f0154b
...
...
@@ -42,44 +42,44 @@
// Get list of special users
$users
=
qa_db_select_with_pending
(
qa_db_users_from_level_selectspec
(
QA_USER_LEVEL_EXPERT
));
$users
=
qa_db_select_with_pending
(
qa_db_users_from_level_selectspec
(
QA_USER_LEVEL_EXPERT
));
// Check we have permission to view this page (moderator or above)
if
(
qa_get_logged_in_level
()
<
QA_USER_LEVEL_MODERATOR
)
{
$qa_content
=
qa_content_prepare
();
$qa_content
[
'error'
]
=
qa_lang_html
(
'users/no_permission'
);
$qa_content
=
qa_content_prepare
();
$qa_content
[
'error'
]
=
qa_lang_html
(
'users/no_permission'
);
return
$qa_content
;
}
// Get userids and handles of retrieved users
$usershtml
=
qa_userids_handles_html
(
$users
);
$usershtml
=
qa_userids_handles_html
(
$users
);
// Prepare content for theme
$qa_content
=
qa_content_prepare
();
$qa_content
=
qa_content_prepare
();
$qa_content
[
'title'
]
=
qa_lang_html
(
'users/special_users'
);
$qa_content
[
'title'
]
=
qa_lang_html
(
'users/special_users'
);
$qa_content
[
'ranking'
]
=
array
(
$qa_content
[
'ranking'
]
=
array
(
'items'
=>
array
(),
'rows'
=>
ceil
(
qa_opt
(
'page_size_users'
)
/
qa_opt
(
'columns_users'
)),
'type'
=>
'users'
);
foreach
(
$users
as
$user
)
{
$qa_content
[
'ranking'
][
'items'
][]
=
array
(
$qa_content
[
'ranking'
][
'items'
][]
=
array
(
'label'
=>
$usershtml
[
$user
[
'userid'
]],
'score'
=>
qa_html
(
qa_user_level_string
(
$user
[
'level'
])),
'raw'
=>
$user
,
);
}
$qa_content
[
'navigation'
][
'sub'
]
=
qa_users_sub_navigation
();
$qa_content
[
'navigation'
][
'sub'
]
=
qa_users_sub_navigation
();
return
$qa_content
;
...
...
qa-include/qa-page-users.php
View file @
69f0154b
...
...
@@ -36,22 +36,22 @@
// Get list of all users
$start
=
qa_get_start
();
$users
=
qa_db_select_with_pending
(
qa_db_top_users_selectspec
(
$start
,
qa_opt_if_loaded
(
'page_size_users'
)));
$start
=
qa_get_start
();
$users
=
qa_db_select_with_pending
(
qa_db_top_users_selectspec
(
$start
,
qa_opt_if_loaded
(
'page_size_users'
)));
$usercount
=
qa_opt
(
'cache_userpointscount'
);
$pagesize
=
qa_opt
(
'page_size_users'
);
$users
=
array_slice
(
$users
,
0
,
$pagesize
);
$usershtml
=
qa_userids_handles_html
(
$users
);
$usercount
=
qa_opt
(
'cache_userpointscount'
);
$pagesize
=
qa_opt
(
'page_size_users'
);
$users
=
array_slice
(
$users
,
0
,
$pagesize
);
$usershtml
=
qa_userids_handles_html
(
$users
);
// Prepare content for theme
$qa_content
=
qa_content_prepare
();
$qa_content
=
qa_content_prepare
();
$qa_content
[
'title'
]
=
qa_lang_html
(
'main/highest_users'
);
$qa_content
[
'title'
]
=
qa_lang_html
(
'main/highest_users'
);
$qa_content
[
'ranking'
]
=
array
(
$qa_content
[
'ranking'
]
=
array
(
'items'
=>
array
(),
'rows'
=>
ceil
(
$pagesize
/
qa_opt
(
'columns_users'
)),
'type'
=>
'users'
...
...
@@ -76,11 +76,11 @@
}
}
else
$qa_content
[
'title'
]
=
qa_lang_html
(
'main/no_active_users'
);
$qa_content
[
'title'
]
=
qa_lang_html
(
'main/no_active_users'
);
$qa_content
[
'page_links'
]
=
qa_html_page_links
(
qa_request
(),
$start
,
$pagesize
,
$usercount
,
qa_opt
(
'pages_prev_next'
));
$qa_content
[
'page_links'
]
=
qa_html_page_links
(
qa_request
(),
$start
,
$pagesize
,
$usercount
,
qa_opt
(
'pages_prev_next'
));
$qa_content
[
'navigation'
][
'sub'
]
=
qa_users_sub_navigation
();
$qa_content
[
'navigation'
][
'sub'
]
=
qa_users_sub_navigation
();
return
$qa_content
;
...
...
qa-include/qa-theme-base.php
View file @
69f0154b
This diff is collapsed.
Click to expand it.
qa-include/vendor/PHPMailer/PHPMailerAutoload.php
View file @
69f0154b
qa-include/vendor/PHPMailer/class.phpmailer.php
View file @
69f0154b
qa-include/vendor/PHPMailer/class.smtp.php
View file @
69f0154b
qa-include/vendor/htmLawed.php
View file @
69f0154b
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