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
dc4e335d
Commit
dc4e335d
authored
May 07, 2015
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix calls to qa_format_number
Decimals parameter takes effect when compact option is off.
parent
8f780c62
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
15 deletions
+15
-15
favorites.php
qa-include/app/favorites.php
+3
-3
format.php
qa-include/app/format.php
+8
-8
categories.php
qa-include/pages/categories.php
+1
-1
tags.php
qa-include/pages/tags.php
+1
-1
users.php
qa-include/pages/users.php
+1
-1
qa-widget-activity-count.php
qa-include/plugins/qa-widget-activity-count.php
+1
-1
No files found.
qa-include/app/favorites.php
View file @
dc4e335d
...
@@ -138,7 +138,7 @@
...
@@ -138,7 +138,7 @@
$ranking
[
'items'
][]
=
array
(
$ranking
[
'items'
][]
=
array
(
'avatar'
=>
$avatarhtml
,
'avatar'
=>
$avatarhtml
,
'label'
=>
$usershtml
[
$user
[
'userid'
]],
'label'
=>
$usershtml
[
$user
[
'userid'
]],
'score'
=>
qa_html
(
qa_format_number
(
$user
[
'points'
],
1
,
true
)),
'score'
=>
qa_html
(
qa_format_number
(
$user
[
'points'
],
0
,
true
)),
'raw'
=>
$user
,
'raw'
=>
$user
,
);
);
}
}
...
@@ -163,7 +163,7 @@
...
@@ -163,7 +163,7 @@
foreach
(
$tags
as
$tag
)
{
foreach
(
$tags
as
$tag
)
{
$ranking
[
'items'
][]
=
array
(
$ranking
[
'items'
][]
=
array
(
'label'
=>
qa_tag_html
(
$tag
[
'word'
],
false
,
true
),
'label'
=>
qa_tag_html
(
$tag
[
'word'
],
false
,
true
),
'count'
=>
qa_html
(
qa_format_number
(
$tag
[
'tagcount'
],
1
,
true
)),
'count'
=>
qa_html
(
qa_format_number
(
$tag
[
'tagcount'
],
0
,
true
)),
);
);
}
}
...
@@ -187,7 +187,7 @@
...
@@ -187,7 +187,7 @@
$cat_url
=
qa_path_html
(
'questions/'
.
implode
(
'/'
,
array_reverse
(
explode
(
'/'
,
$category
[
'backpath'
]))
)
);
$cat_url
=
qa_path_html
(
'questions/'
.
implode
(
'/'
,
array_reverse
(
explode
(
'/'
,
$category
[
'backpath'
]))
)
);
$cat_anchor
=
$category
[
'qcount'
]
==
1
$cat_anchor
=
$category
[
'qcount'
]
==
1
?
qa_lang_html_sub
(
'main/1_question'
,
'1'
,
'1'
)
?
qa_lang_html_sub
(
'main/1_question'
,
'1'
,
'1'
)
:
qa_lang_html_sub
(
'main/x_questions'
,
qa_format_number
(
$category
[
'qcount'
],
1
,
true
));
:
qa_lang_html_sub
(
'main/x_questions'
,
qa_format_number
(
$category
[
'qcount'
],
0
,
true
));
$cat_descr
=
strlen
(
$category
[
'content'
])
?
qa_html
(
' - '
.
$category
[
'content'
])
:
''
;
$cat_descr
=
strlen
(
$category
[
'content'
])
?
qa_html
(
' - '
.
$category
[
'content'
])
:
''
;
$nav_list_categories
[
'nav'
][
$category
[
'categoryid'
]]
=
array
(
$nav_list_categories
[
'nav'
][
$category
[
'categoryid'
]]
=
array
(
...
...
qa-include/app/format.php
View file @
dc4e335d
...
@@ -318,7 +318,7 @@
...
@@ -318,7 +318,7 @@
$fields
[
'answers_raw'
]
=
$post
[
'acount'
];
$fields
[
'answers_raw'
]
=
$post
[
'acount'
];
$fields
[
'answers'
]
=
(
$post
[
'acount'
]
==
1
)
?
qa_lang_html_sub_split
(
'main/1_answer'
,
'1'
,
'1'
)
$fields
[
'answers'
]
=
(
$post
[
'acount'
]
==
1
)
?
qa_lang_html_sub_split
(
'main/1_answer'
,
'1'
,
'1'
)
:
qa_lang_html_sub_split
(
'main/x_answers'
,
qa_format_number
(
$post
[
'acount'
],
1
,
true
));
:
qa_lang_html_sub_split
(
'main/x_answers'
,
qa_format_number
(
$post
[
'acount'
],
0
,
true
));
$fields
[
'answer_selected'
]
=
isset
(
$post
[
'selchildid'
]);
$fields
[
'answer_selected'
]
=
isset
(
$post
[
'selchildid'
]);
}
}
...
@@ -327,7 +327,7 @@
...
@@ -327,7 +327,7 @@
$fields
[
'views_raw'
]
=
$post
[
'views'
];
$fields
[
'views_raw'
]
=
$post
[
'views'
];
$fields
[
'views'
]
=
(
$post
[
'views'
]
==
1
)
?
qa_lang_html_sub_split
(
'main/1_view'
,
'1'
,
'1'
)
:
$fields
[
'views'
]
=
(
$post
[
'views'
]
==
1
)
?
qa_lang_html_sub_split
(
'main/1_view'
,
'1'
,
'1'
)
:
qa_lang_html_sub_split
(
'main/x_views'
,
qa_format_number
(
$post
[
'views'
],
1
,
true
));
qa_lang_html_sub_split
(
'main/x_views'
,
qa_format_number
(
$post
[
'views'
],
0
,
true
));
}
}
if
(
@
$options
[
'categoryview'
]
&&
isset
(
$post
[
'categoryname'
])
&&
isset
(
$post
[
'categorybackpath'
]))
{
if
(
@
$options
[
'categoryview'
]
&&
isset
(
$post
[
'categoryname'
])
&&
isset
(
$post
[
'categorybackpath'
]))
{
...
@@ -401,8 +401,8 @@
...
@@ -401,8 +401,8 @@
// Create HTML versions...
// Create HTML versions...
$upvoteshtml
=
qa_html
(
qa_format_number
(
$upvotes
,
1
,
true
));
$upvoteshtml
=
qa_html
(
qa_format_number
(
$upvotes
,
0
,
true
));
$downvoteshtml
=
qa_html
(
qa_format_number
(
$downvotes
,
1
,
true
));
$downvoteshtml
=
qa_html
(
qa_format_number
(
$downvotes
,
0
,
true
));
if
(
$netvotes
>=
1
)
if
(
$netvotes
>=
1
)
$netvotesPrefix
=
'+'
;
$netvotesPrefix
=
'+'
;
...
@@ -412,7 +412,7 @@
...
@@ -412,7 +412,7 @@
$netvotesPrefix
=
''
;
$netvotesPrefix
=
''
;
$netvotes
=
abs
(
$netvotes
);
$netvotes
=
abs
(
$netvotes
);
$netvoteshtml
=
$netvotesPrefix
.
qa_html
(
qa_format_number
(
$netvotes
,
1
,
true
));
$netvoteshtml
=
$netvotesPrefix
.
qa_html
(
qa_format_number
(
$netvotes
,
0
,
true
));
// ...with microformats if appropriate
// ...with microformats if appropriate
...
@@ -528,7 +528,7 @@
...
@@ -528,7 +528,7 @@
if
(
isset
(
$post
[
'points'
]))
{
if
(
isset
(
$post
[
'points'
]))
{
if
(
@
$options
[
'pointsview'
])
if
(
@
$options
[
'pointsview'
])
$fields
[
'who'
][
'points'
]
=
(
$post
[
'points'
]
==
1
)
?
qa_lang_html_sub_split
(
'main/1_point'
,
'1'
,
'1'
)
$fields
[
'who'
][
'points'
]
=
(
$post
[
'points'
]
==
1
)
?
qa_lang_html_sub_split
(
'main/1_point'
,
'1'
,
'1'
)
:
qa_lang_html_sub_split
(
'main/x_points'
,
qa_format_number
(
$post
[
'points'
],
1
,
true
));
:
qa_lang_html_sub_split
(
'main/x_points'
,
qa_format_number
(
$post
[
'points'
],
0
,
true
));
if
(
isset
(
$options
[
'pointstitle'
]))
if
(
isset
(
$options
[
'pointstitle'
]))
$fields
[
'who'
][
'title'
]
=
qa_get_points_title_html
(
$post
[
'points'
],
$options
[
'pointstitle'
]);
$fields
[
'who'
][
'title'
]
=
qa_get_points_title_html
(
$post
[
'points'
],
$options
[
'pointstitle'
]);
...
@@ -854,7 +854,7 @@
...
@@ -854,7 +854,7 @@
if
(
isset
(
$question
[
'opoints'
]))
{
if
(
isset
(
$question
[
'opoints'
]))
{
if
(
@
$options
[
'pointsview'
])
if
(
@
$options
[
'pointsview'
])
$fields
[
'who'
][
'points'
]
=
(
$question
[
'opoints'
]
==
1
)
?
qa_lang_html_sub_split
(
'main/1_point'
,
'1'
,
'1'
)
$fields
[
'who'
][
'points'
]
=
(
$question
[
'opoints'
]
==
1
)
?
qa_lang_html_sub_split
(
'main/1_point'
,
'1'
,
'1'
)
:
qa_lang_html_sub_split
(
'main/x_points'
,
qa_format_number
(
$question
[
'opoints'
],
1
,
true
));
:
qa_lang_html_sub_split
(
'main/x_points'
,
qa_format_number
(
$question
[
'opoints'
],
0
,
true
));
if
(
isset
(
$options
[
'pointstitle'
]))
if
(
isset
(
$options
[
'pointstitle'
]))
$fields
[
'who'
][
'title'
]
=
qa_get_points_title_html
(
$question
[
'opoints'
],
$options
[
'pointstitle'
]);
$fields
[
'who'
][
'title'
]
=
qa_get_points_title_html
(
$question
[
'opoints'
],
$options
[
'pointstitle'
]);
...
@@ -1243,7 +1243,7 @@
...
@@ -1243,7 +1243,7 @@
'label'
=>
qa_html
(
$category
[
'title'
]),
'label'
=>
qa_html
(
$category
[
'title'
]),
'popup'
=>
qa_html
(
@
$category
[
'content'
]),
'popup'
=>
qa_html
(
@
$category
[
'content'
]),
'selected'
=>
isset
(
$selecteds
[
$category
[
'categoryid'
]]),
'selected'
=>
isset
(
$selecteds
[
$category
[
'categoryid'
]]),
'note'
=>
$showqcount
?
(
'('
.
qa_html
(
qa_format_number
(
$category
[
'qcount'
],
1
,
true
))
.
')'
)
:
null
,
'note'
=>
$showqcount
?
(
'('
.
qa_html
(
qa_format_number
(
$category
[
'qcount'
],
0
,
true
))
.
')'
)
:
null
,
'subnav'
=>
qa_category_navigation_sub
(
$parentcategories
,
$category
[
'categoryid'
],
$selecteds
,
'subnav'
=>
qa_category_navigation_sub
(
$parentcategories
,
$category
[
'categoryid'
],
$selecteds
,
$pathprefix
.
$category
[
'tags'
]
.
'/'
,
$showqcount
,
$pathparams
,
$favoritemap
),
$pathprefix
.
$category
[
'tags'
]
.
'/'
,
$showqcount
,
$pathparams
,
$favoritemap
),
'categoryid'
=>
$category
[
'categoryid'
],
'categoryid'
=>
$category
[
'categoryid'
],
...
...
qa-include/pages/categories.php
View file @
dc4e335d
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
$navigation
[
$key
][
'note'
]
.=
$navigation
[
$key
][
'note'
]
.=
' - <a href="'
.
qa_path_html
(
'questions/'
.
implode
(
'/'
,
array_reverse
(
explode
(
'/'
,
$category
[
'backpath'
]))))
.
'">'
.
(
(
$category
[
'qcount'
]
==
1
)
' - <a href="'
.
qa_path_html
(
'questions/'
.
implode
(
'/'
,
array_reverse
(
explode
(
'/'
,
$category
[
'backpath'
]))))
.
'">'
.
(
(
$category
[
'qcount'
]
==
1
)
?
qa_lang_html_sub
(
'main/1_question'
,
'1'
,
'1'
)
?
qa_lang_html_sub
(
'main/1_question'
,
'1'
,
'1'
)
:
qa_lang_html_sub
(
'main/x_questions'
,
qa_format_number
(
$category
[
'qcount'
],
1
,
true
))
:
qa_lang_html_sub
(
'main/x_questions'
,
qa_format_number
(
$category
[
'qcount'
],
0
,
true
))
)
.
'</a>'
;
)
.
'</a>'
;
if
(
strlen
(
$category
[
'content'
]))
if
(
strlen
(
$category
[
'content'
]))
...
...
qa-include/pages/tags.php
View file @
dc4e335d
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
foreach
(
$populartags
as
$word
=>
$count
)
{
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
)]),
'label'
=>
qa_tag_html
(
$word
,
false
,
@
$favoritemap
[
'tag'
][
qa_strtolower
(
$word
)]),
'count'
=>
qa_format_number
(
$count
,
1
,
true
),
'count'
=>
qa_format_number
(
$count
,
0
,
true
),
);
);
if
((
++
$output
)
>=
$pagesize
)
if
((
++
$output
)
>=
$pagesize
)
...
...
qa-include/pages/users.php
View file @
dc4e335d
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
$qa_content
[
'ranking'
][
'items'
][]
=
array
(
$qa_content
[
'ranking'
][
'items'
][]
=
array
(
'avatar'
=>
$avatarhtml
,
'avatar'
=>
$avatarhtml
,
'label'
=>
$usershtml
[
$user
[
'userid'
]],
'label'
=>
$usershtml
[
$user
[
'userid'
]],
'score'
=>
qa_html
(
qa_format_number
(
$user
[
'points'
],
1
,
true
)),
'score'
=>
qa_html
(
qa_format_number
(
$user
[
'points'
],
0
,
true
)),
'raw'
=>
$user
,
'raw'
=>
$user
,
);
);
}
}
...
...
qa-include/plugins/qa-widget-activity-count.php
View file @
dc4e335d
...
@@ -56,7 +56,7 @@ class qa_activity_count
...
@@ -56,7 +56,7 @@ class qa_activity_count
if
(
$value
==
1
)
if
(
$value
==
1
)
$themeobject
->
output
(
qa_lang_html_sub
(
$langsingular
,
'<span class="qa-activity-count-data">1</span>'
,
'1'
));
$themeobject
->
output
(
qa_lang_html_sub
(
$langsingular
,
'<span class="qa-activity-count-data">1</span>'
,
'1'
));
else
else
$themeobject
->
output
(
qa_lang_html_sub
(
$langplural
,
'<span class="qa-activity-count-data">'
.
qa_format_number
((
int
)
$value
,
1
,
true
)
.
'</span>'
));
$themeobject
->
output
(
qa_lang_html_sub
(
$langplural
,
'<span class="qa-activity-count-data">'
.
qa_format_number
((
int
)
$value
,
0
,
true
)
.
'</span>'
));
$themeobject
->
output
(
'</p>'
);
$themeobject
->
output
(
'</p>'
);
}
}
...
...
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