Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sucs-site
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andrew Price
sucs-site
Commits
7ab02831
Commit
7ab02831
authored
6 years ago
by
Imran Hussain
Browse files
Options
Downloads
Patches
Plain Diff
Fix banana award system
parent
b7bdb1e3
Branches
portable
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/banana-admin.php
+5
-5
5 additions, 5 deletions
lib/banana-admin.php
templates/banana-award.tpl
+2
-2
2 additions, 2 deletions
templates/banana-award.tpl
with
7 additions
and
7 deletions
lib/banana-admin.php
+
5
−
5
View file @
7ab02831
...
...
@@ -23,10 +23,10 @@ if (isset($session->groups[$permission])) {
$smarty
->
assign
(
"banana_admin"
,
TRUE
);
if
(
$_REQUEST
[
'action'
]
==
"award"
)
{
if
(
trim
(
$_
PO
ST
[
'why'
])
!==
""
)
{
$number
=
intval
(
$_
PO
ST
[
'number'
]);
if
(
trim
(
$_
REQUE
ST
[
'why'
])
!==
""
)
{
$number
=
intval
(
$_
REQUE
ST
[
'number'
]);
$why
=
$_
PO
ST
[
'why'
];
$why
=
$_
REQUE
ST
[
'why'
];
if
((
abs
(
$number
)
<=
$maxbanana
)
&&
$number
)
{
...
...
@@ -46,8 +46,8 @@ if (isset($session->groups[$permission])) {
}
}
elseif
(
$session
->
loggedin
)
{
if
(
$_REQUEST
[
'action'
]
==
"award"
)
{
$number
=
intval
(
$_
PO
ST
[
'number'
]);
$why
=
$_
PO
ST
[
'why'
];
$number
=
intval
(
$_
REQUE
ST
[
'number'
]);
$why
=
$_
REQUE
ST
[
'why'
];
// Send a mail to someone about them bananas
$msgbody
=
$session
->
username
.
" thinks
$who
deserves
$number
bananas:
\r\n
"
;
...
...
This diff is collapsed.
Click to expand it.
templates/banana-award.tpl
+
2
−
2
View file @
7ab02831
...
...
@@ -17,7 +17,7 @@
<p><q>
Please tell us if you think this user has done something good recently (deserving yellowy recognition)
or something dumb (deserving of greenish derision)
</q></p>
{/
if
}
<form
action=
"
{
$url
}
"
method=
"post"
>
<form
action=
"
{
$url
}
"
method=
"post"
id=
"bananaform"
>
<div>
<input
type=
"hidden"
name=
"action"
value=
"award"
/>
...
...
@@ -33,7 +33,7 @@
</div>
<div>
<p>
Why
</p>
<span
class=
"textinput"
><textarea
id=
"bananareason"
name=
"why"
cols=
"25"
rows=
"10"
></textarea></span>
<span
class=
"textinput"
><textarea
id=
"bananareason"
name=
"why"
formid=
"bananaform"
cols=
"25"
rows=
"10"
></textarea></span>
</div>
<div>
<span
class=
"textinput"
><input
type=
"submit"
value=
"
{
$action_text
}
"
/></span>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment