Skip to content

Commit

Permalink
Merge pull request #64 from dasgarner/develop
Browse files Browse the repository at this point in the history
Array syntax fix
  • Loading branch information
dasgarner committed May 27, 2015
2 parents e32b438 + bda2d35 commit c0c80dd
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions lib/Helper/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ public static function audit($entity, $entityId, $message, $object)
if (!is_string($object))
$object = json_encode($object);

self::$_auditLogStatement->execute([
self::$_auditLogStatement->execute(array(
'logDate' => time(),
'userId' => \Kit::GetParam('userid', _SESSION, _INT, 0),
'entity' => $entity,
'message' => $message,
'entityId' => $entityId,
'objectAfter' => $object
]);
));
}
}
4 changes: 2 additions & 2 deletions lib/data/campaign.data.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public static function setOwner($campaignId, $userId)

// Get some details about the campaign
$select = $dbh->prepare('SELECT campaignId, campaign, userId, isLayoutSpecific FROM `campaign` WHERE campaignId = :campaignId');
$select->execute(['campaignId' => $campaignId]);
$select->execute(array('campaignId' => $campaignId));

if (!$row = $select->fetch(PDO::FETCH_ASSOC))
throw new Exception('Unable to find Campaign/Layout');
Expand All @@ -314,7 +314,7 @@ public static function setOwner($campaignId, $userId)

// Should we also update the layout?
if ($row['isLayoutSpecific'] == 1) {
$layouts = Layout::Entries(null, ['layoutSpecificCampaignId' => $campaignId]);
$layouts = Layout::Entries(null, array('layoutSpecificCampaignId' => $campaignId));

if (count($layouts) <= 0)
throw new Exception('Unable to find Layout');
Expand Down
2 changes: 1 addition & 1 deletion lib/data/display.data.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ public function Delete($displayID)
'displayid' => $displayID
));

\Xibo\Helper\Log::audit('Display', $displayID, 'Display Deleted', ['displayId' => $displayID]);
\Xibo\Helper\Log::audit('Display', $displayID, 'Display Deleted', array('displayId' => $displayID));

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/data/schedule.data.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public function Delete($eventID)
'eventid' => $eventID
));

\Xibo\Helper\Log::audit('Schedule', $eventID, 'Schedule Event Deleted', ['eventId' => $eventID]);
\Xibo\Helper\Log::audit('Schedule', $eventID, 'Schedule Event Deleted', array('eventId' => $eventID));

return true;
}
Expand Down
8 changes: 4 additions & 4 deletions lib/data/usergroup.data.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ public static function isQuotaFullByUser($userId)
ORDER BY `group`.isUserSpecific DESC, IFNULL(group.libraryQuota, 0) DESC
');

$quotaSth->execute(['userId' => $userId]);
$quotaSth->execute(array('userId' => $userId));

// Loop over until we have a quota
$rows = $quotaSth->fetchAll(PDO::FETCH_ASSOC);
Expand Down Expand Up @@ -499,7 +499,7 @@ public static function isQuotaFullByUser($userId)
ON lkusergroup.userId = media.userId
WHERE lkusergroup.groupId = :groupId
');
$sth->execute(['groupId' => $groupId]);
$sth->execute(array('groupId' => $groupId));

if (!$row = $sth->fetch())
throw new Exception("Error Processing Request", 1);
Expand All @@ -526,7 +526,7 @@ public static function getLibraryQuota($groupId)
WHERE group.groupId = :groupId
');

$quotaSth->execute(['groupId' => $groupId]);
$quotaSth->execute(array('groupId' => $groupId));

if (!$row = $quotaSth->fetch()) {
throw new Exception('Problem getting this users library quota.');
Expand All @@ -549,6 +549,6 @@ public static function updateLibraryQuota($groupId, $libraryQuota)
WHERE groupId = :groupId
');

$sth->execute(['libraryQuota' => $libraryQuota, 'groupId' => $groupId]);
$sth->execute(array('libraryQuota' => $libraryQuota, 'groupId' => $groupId));
}
}
2 changes: 1 addition & 1 deletion maintenance.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
break;

echo sprintf(__('Disabling %s'), $display['display']) . '<br/>' . PHP_EOL;
$update->execute(['displayId' => $display['displayId']]);
$update->execute(array('displayId' => $display['displayId']));

$difference--;
}
Expand Down

0 comments on commit c0c80dd

Please sign in to comment.