Skip to content

Commit

Permalink
Some cleanup and syntax errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cz committed May 19, 2011
1 parent 51f0932 commit edd62c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions events/event.memberclaim.php
Expand Up @@ -46,13 +46,14 @@ protected function __trigger() {

$errors = array();

// validation step
if (is_null($member_id)) {
// Validate the required data
if(is_null($member_id)) {
$errors[] = 'Member not logged in';
} elseif (is_null($entry_id)) {
}
elseif (is_null($entry_id)) {
$errors[] = 'No entry ID provided';
}
} elseif (is_null($field_id)) {
elseif (is_null($field_id)) {
$errors[] = 'No field ID provided';
}

Expand Down
6 changes: 3 additions & 3 deletions lib/class.claims.php
Expand Up @@ -24,7 +24,7 @@ public function check($entry_id, $field_id, $member_id) {
FROM `tbl_member_claims`
WHERE `entry_id` = '{$entry_id}'
AND `field_id` = '{$field_id}'
AND `member_id` = '{$member-id}'
AND `member_id` = '{$member_id}'
");

if(!empty($result)) {
Expand Down Expand Up @@ -78,7 +78,7 @@ public function create($entry_id, $field_id, $member_id) {

$data = array(
'entry_id' => $entry_id,
'field_id' => $field_id
'field_id' => $field_id,
'member_id' => $member_id
);

Expand Down Expand Up @@ -128,7 +128,7 @@ public function updateCount($entry_id, $field_id) {
$count = $this->countMembers($entry_id, $field_id);

$fields = array(
'count' => $count;
'count' => $count
);

return Symphony::Database()->update(
Expand Down

0 comments on commit edd62c2

Please sign in to comment.