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
Model registry
Operate
Environments
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
sucssite
sucs-site
Commits
1e8fa139
Commit
1e8fa139
authored
9 years ago
by
Imran Hussain
Browse files
Options
Downloads
Patches
Plain Diff
Fix r702 sneaking in a smarty 2 function
parent
93511244
No related branches found
Branches containing commit
No related tags found
2 merge requests
!5
Move Beta to Current
,
!1
Merge changes from master (tunk) into beta
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/banana-admin.php
+8
-8
8 additions, 8 deletions
lib/banana-admin.php
with
8 additions
and
8 deletions
lib/banana-admin.php
+
8
−
8
View file @
1e8fa139
...
...
@@ -26,14 +26,14 @@ if (isset($session->groups[$permission])) {
if
(
trim
(
$_POST
[
'why'
])
!==
""
)
{
$number
=
intval
(
$_POST
[
'number'
]);
$why
=
$_POST
[
'why'
];
$why
=
$_POST
[
'why'
];
if
(
(
abs
(
$number
)
<=
$maxbanana
)
&&
$number
<>
0
){
$DB
->
Query
(
"INSERT INTO awards (username, score, whn, who, why) VALUES (?,?,NOW(),?,?)"
,
array
(
$who
,
$number
,
$session
->
username
,
$why
));
header
(
"Location: "
.
$_SERVER
[
'PHP_SELF'
]);
header
(
"Location: "
.
$_SERVER
[
'PHP_SELF'
]);
}
}
// Checks for a nonzero banana and denies awarding if it's zero
elseif
(
$number
==
0
){
trigger_error
(
"Come on "
.
$session
->
username
.
", enter a nonzero value please"
);
...
...
@@ -45,14 +45,14 @@ if (isset($session->groups[$permission])) {
}
else
{
trigger_error
(
"No reason entered for the awarding of bananas."
,
E_USER_WARNING
);
}
}
}
}
elseif
(
$session
->
loggedin
)
{
if
(
$_REQUEST
[
'action'
]
==
"award"
)
{
$number
=
intval
(
$_POST
[
'number'
]);
$why
=
$_POST
[
'why'
];
$why
=
$_POST
[
'why'
];
// Send a mail to someone about them bananas
// Send a mail to someone about them bananas
$msgbody
=
$session
->
username
.
" thinks
$who
deserves
$number
bananas:
\r\n
"
;
$msgbody
.
=
"
\"
$why
\"\r\n\r\n
Visit https://sucs.org/Community/Members/
$who
if you want to make an award."
;
mail
(
$contact
,
"Banana Award Nomination"
,
$msgbody
,
$msgheaders
);
...
...
@@ -62,7 +62,7 @@ if (isset($session->groups[$permission])) {
}
$secondary
=
$smarty
->
get
_t
emplate
_v
ars
(
"secondary"
);
$secondary
=
$smarty
->
get
T
emplate
V
ars
(
"secondary"
);
$secondary
.
=
$smarty
->
fetch
(
'banana-award.tpl'
);
$smarty
->
assign
(
'secondary'
,
$secondary
);
...
...
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