Skip to content

Commit

Permalink
fix: update function signature for checkWriteAccess
Browse files Browse the repository at this point in the history
  • Loading branch information
themightychris committed Feb 6, 2019
1 parent 278effc commit 9cbf903
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion php-classes/Laddr/ProjectBuzzRequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected static function onRecordSaved(ActiveRecord $Buzz, $requestData)
$Buzz->save();
}

public static function checkWriteAccess(ActiveRecord $ProjectUpdate, $suppressLogin = false)
public static function checkWriteAccess(ActiveRecord $ProjectUpdate = null, $suppressLogin = false)
{
// only allow creating, editing your own, and staff editing
if (!$ProjectUpdate->isPhantom && ($ProjectUpdate->CreatorID != $GLOBALS['Session']->PersonID) && !$GLOBALS['Session']->hasAccountLevel('Staff')) {
Expand Down
2 changes: 1 addition & 1 deletion php-classes/Laddr/ProjectUpdatesRequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static function handleBrowseRequest($options = [], $conditions = [], $res
return parent::handleBrowseRequest($options, $conditions, $responseID, $responseData);
}

public static function checkWriteAccess(\ActiveRecord $ProjectUpdate, $suppressLogin = false)
public static function checkWriteAccess(\ActiveRecord $ProjectUpdate = null, $suppressLogin = false)
{
// only allow creating, editing your own, and staff editing
if (!$ProjectUpdate->isPhantom && ($ProjectUpdate->CreatorID != $GLOBALS['Session']->PersonID) && !$GLOBALS['Session']->hasAccountLevel('Staff')) {
Expand Down

0 comments on commit 9cbf903

Please sign in to comment.