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
802f6879
Commit
802f6879
authored
Dec 02, 2014
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coding style (more minor typos/spacing issues)
parent
59ad6e0a
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
24 additions
and
21 deletions
+24
-21
String.php
qa-include/Q2A/Util/String.php
+0
-1
Usage.php
qa-include/Q2A/Util/Usage.php
+0
-1
admin.php
qa-include/app/admin.php
+3
-2
format.php
qa-include/app/format.php
+3
-2
post-update.php
qa-include/app/post-update.php
+1
-1
upload.php
qa-include/app/upload.php
+7
-5
users.php
qa-include/app/users.php
+2
-2
messages.php
qa-include/pages/messages.php
+1
-1
question-post.php
qa-include/pages/question-post.php
+1
-1
question.php
qa-include/pages/question.php
+1
-1
qa-base.php
qa-include/qa-base.php
+2
-0
qa-db.php
qa-include/qa-db.php
+1
-1
qa-page.php
qa-include/qa-page.php
+1
-1
qa-theme-base.php
qa-include/qa-theme-base.php
+0
-0
qa-basic-adsense.php
qa-plugin/basic-adsense/qa-basic-adsense.php
+1
-0
UtilStringTest.php
qa-tests/UtilStringTest.php
+0
-1
qa-theme.php
qa-theme/Snow/qa-theme.php
+0
-1
No files found.
qa-include/Q2A/Util/String.php
View file @
802f6879
...
...
@@ -685,5 +685,4 @@ class Q2A_Util_String
return
false
;
}
}
qa-include/Q2A/Util/Usage.php
View file @
802f6879
...
...
@@ -177,5 +177,4 @@ class Q2A_Util_Usage
$usage
[
'ram'
]
?
(
$usage
[
'ram'
]
*
100
/
$totalusage
[
'ram'
])
:
0
);
}
}
qa-include/app/admin.php
View file @
802f6879
...
...
@@ -127,7 +127,7 @@
if
(
isset
(
$metadata
[
'display_name'
]))
$options
[
$code
]
=
$metadata
[
'display_name'
];
// otherwise use an entry from above
else
if
(
isset
(
$codetolanguage
[
$code
]))
elseif
(
isset
(
$codetolanguage
[
$code
]))
$options
[
$code
]
=
$codetolanguage
[
$code
];
}
...
...
@@ -139,7 +139,8 @@
/**
* Return a sorted array of available themes, [theme name] => [theme name]
*/
function
qa_admin_theme_options
()
{
function
qa_admin_theme_options
()
{
if
(
qa_to_override
(
__FUNCTION__
))
{
$args
=
func_get_args
();
return
qa_call_override
(
__FUNCTION__
,
$args
);
}
$metadataUtil
=
new
Q2A_Util_Metadata
();
...
...
qa-include/app/format.php
View file @
802f6879
...
...
@@ -281,8 +281,9 @@
if
(
$isquestion
&&
isset
(
$post
[
'closedbyid'
]))
$fields
[
'classes'
]
=
ltrim
(
$fields
[
'classes'
]
.
' qa-q-closed'
);
if
(
$microformats
)
if
(
$microformats
)
{
$fields
[
'classes'
]
.=
' hentry '
.
(
$isquestion
?
'question'
:
(
$isanswer
?
(
$isselected
?
'answer answer-selected'
:
'answer'
)
:
'comment'
));
}
// Question-specific stuff (title, URL, tags, answer count, category)
...
...
@@ -503,7 +504,7 @@
$fields
[
'meta_order'
]
=
qa_lang_html
(
'main/meta_order'
);
// sets ordering of meta elements which can be language-specific
if
(
@
$options
[
'whatview'
]
)
{
if
(
@
$options
[
'whatview'
])
{
$fields
[
'what'
]
=
qa_lang_html
(
$isquestion
?
'main/asked'
:
(
$isanswer
?
'main/answered'
:
'main/commented'
));
if
(
@
$options
[
'whatlink'
]
&&
strlen
(
@
$options
[
'q_request'
]))
...
...
qa-include/app/post-update.php
View file @
802f6879
...
...
@@ -92,7 +92,7 @@
qa_db_flaggedcount_update
();
}
else
if
(
$oldquestion
[
'type'
]
==
'Q'
)
{
// not hidden or queued
elseif
(
$oldquestion
[
'type'
]
==
'Q'
)
{
// not hidden or queued
qa_post_index
(
$oldquestion
[
'postid'
],
'Q'
,
$oldquestion
[
'postid'
],
$oldquestion
[
'parentid'
],
$title
,
$content
,
$format
,
$text
,
$tagstring
,
$oldquestion
[
'categoryid'
]);
}
...
...
qa-include/app/upload.php
View file @
802f6879
...
...
@@ -33,17 +33,19 @@
{
if
(
qa_to_override
(
__FUNCTION__
))
{
$args
=
func_get_args
();
return
qa_call_override
(
__FUNCTION__
,
$args
);
}
$mindb
=
16777215
;
// from MEDIUMBLOB column type
$mindb
=
16777215
;
// from MEDIUMBLOB column type
$minphp
=
trim
(
ini_get
(
'upload_max_filesize'
));
$minphp
=
trim
(
ini_get
(
'upload_max_filesize'
));
switch
(
strtolower
(
substr
(
$minphp
,
-
1
)))
{
case
'g'
:
$minphp
*=
1024
;
$minphp
*=
1024
;
// fall-through
case
'm'
:
$minphp
*=
1024
;
$minphp
*=
1024
;
// fall-through
case
'k'
:
$minphp
*=
1024
;
$minphp
*=
1024
;
}
return
min
(
$mindb
,
$minphp
);
...
...
qa-include/app/users.php
View file @
802f6879
...
...
@@ -1103,7 +1103,7 @@ in a category for which they have elevated privileges).
if
(
!
isset
(
$value
))
$silentproblems
[]
=
'code missing'
;
else
if
(
!
strlen
(
$value
))
elseif
(
!
strlen
(
$value
))
$silentproblems
[]
=
'code empty'
;
else
{
...
...
@@ -1135,7 +1135,7 @@ in a category for which they have elevated privileges).
$silentproblems
[]
=
'key cookie missing'
;
elseif
(
!
strlen
(
$key
))
$silentproblems
[]
=
'key cookie empty'
;
else
if
(
strlen
(
$key
)
!=
QA_FORM_KEY_LENGTH
)
elseif
(
strlen
(
$key
)
!=
QA_FORM_KEY_LENGTH
)
$reportproblems
[]
=
'key cookie '
.
$key
.
' invalid'
;
}
}
...
...
qa-include/pages/messages.php
View file @
802f6879
...
...
@@ -39,7 +39,7 @@
$req
=
qa_request_part
(
1
);
if
(
$req
===
null
)
$showOutbox
=
false
;
else
if
(
$req
===
'sent'
)
elseif
(
$req
===
'sent'
)
$showOutbox
=
true
;
else
return
include
QA_INCLUDE_DIR
.
'qa-page-not-found.php'
;
...
...
qa-include/pages/question-post.php
View file @
802f6879
...
...
@@ -128,7 +128,7 @@
$pageerror
=@
$qerrors
[
'page'
];
// for security code failure
}
}
else
if
((
$pagestate
==
(
'edit-'
.
$questionid
))
&&
qa_page_q_permit_edit
(
$question
,
'permit_edit_q'
,
$pageerror
,
'permit_retag_cat'
))
}
elseif
((
$pagestate
==
(
'edit-'
.
$questionid
))
&&
qa_page_q_permit_edit
(
$question
,
'permit_edit_q'
,
$pageerror
,
'permit_retag_cat'
))
$formtype
=
'q_edit'
;
if
(
$formtype
==
'q_edit'
)
{
// get tags for auto-completion
...
...
qa-include/pages/question.php
View file @
802f6879
...
...
@@ -358,7 +358,7 @@
$commentsall
=
$answerid
;
}
}
else
if
((
$formtype
==
'c_edit'
)
&&
(
@
$commentsfollows
[
$formpostid
][
'parentid'
]
==
$answerid
))
{
// ...being edited
}
elseif
((
$formtype
==
'c_edit'
)
&&
(
@
$commentsfollows
[
$formpostid
][
'parentid'
]
==
$answerid
))
{
// ...being edited
$a_view
[
'c_form'
]
=
qa_page_q_edit_c_form
(
$qa_content
,
'c'
.
$formpostid
,
$commentsfollows
[
$formpostid
],
@
$ceditin
[
$formpostid
],
@
$cediterrors
[
$formpostid
]);
...
...
qa-include/qa-base.php
View file @
802f6879
...
...
@@ -1048,8 +1048,10 @@
switch
(
strtoupper
(
$unit
))
{
// Gets an integer value that can be compared against the size of the HTTP request
case
'G'
:
$postmaxsize
*=
1024
;
// fall-through
case
'M'
:
$postmaxsize
*=
1024
;
// fall-through
case
'K'
:
$postmaxsize
*=
1024
;
}
...
...
qa-include/qa-db.php
View file @
802f6879
...
...
@@ -236,7 +236,7 @@
$result
=
implode
(
','
,
$parts
);
}
else
if
(
isset
(
$argument
))
{
elseif
(
isset
(
$argument
))
{
if
(
$alwaysquote
||
!
is_numeric
(
$argument
))
$result
=
"'"
.
qa_db_escape_string
(
$argument
)
.
"'"
;
else
...
...
qa-include/qa-page.php
View file @
802f6879
...
...
@@ -249,7 +249,7 @@
$qa_content
[
'navigation'
][
$navtype
][
$navprefix
][
'selected'
]
=
true
;
}
}
else
if
(
$requestlower
===
$navprefix
||
$requestlower
.
'$'
===
$navprefix
)
elseif
(
$requestlower
===
$navprefix
||
$requestlower
.
'$'
===
$navprefix
)
$qa_content
[
'navigation'
][
$navtype
][
$navprefix
][
'selected'
]
=
true
;
}
...
...
qa-include/qa-theme-base.php
View file @
802f6879
This source diff could not be displayed because it is too large. You can
view the blob
instead.
qa-plugin/basic-adsense/qa-basic-adsense.php
View file @
802f6879
...
...
@@ -73,6 +73,7 @@ class qa_basic_adsense
switch
(
$region
)
{
case
'full'
:
// Leaderboard
$divstyle
=
'width:728px; margin:0 auto;'
;
// fall-through
case
'main'
:
// Leaderboard
$width
=
728
;
...
...
qa-tests/UtilStringTest.php
View file @
802f6879
...
...
@@ -154,5 +154,4 @@ class UtilStringTest extends PHPUnit_Framework_TestCase
$this
->
assertTrue
(
qa_string_matches_one
(
$this
->
strBasic
,
$matches
)
);
$this
->
assertFalse
(
qa_string_matches_one
(
$this
->
strBasic
,
$nonMatches
)
);
}
}
qa-theme/Snow/qa-theme.php
View file @
802f6879
...
...
@@ -159,5 +159,4 @@ class qa_html_theme extends qa_html_theme_base
qa_html_theme_base
::
attribution
();
}
}
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