diff options
author | Malf Furious <m@lfurio.us> | 2018-02-07 22:33:19 -0500 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2018-02-07 22:33:19 -0500 |
commit | e54418762e279a1d7ca0efb7ed89b95464753ee8 (patch) | |
tree | 1bb852d199447d6569f544c6cbffcbdb49b947dd /app | |
parent | 977e4271c6f27ed2d42fab6bb2706f4a59bf0237 (diff) | |
download | scrott-e54418762e279a1d7ca0efb7ed89b95464753ee8.tar.gz scrott-e54418762e279a1d7ca0efb7ed89b95464753ee8.zip |
Update class files to use renamed obj class
Diffstat (limited to 'app')
-rw-r--r-- | app/class/agent.class.php | 62 | ||||
-rw-r--r-- | app/class/issue.class.php | 4 | ||||
-rw-r--r-- | app/class/mesg.class.php | 10 | ||||
-rw-r--r-- | app/class/pad.class.php | 4 | ||||
-rw-r--r-- | app/class/stage.class.php | 6 |
5 files changed, 43 insertions, 43 deletions
diff --git a/app/class/agent.class.php b/app/class/agent.class.php index ed50b93..6d0e20d 100644 --- a/app/class/agent.class.php +++ b/app/class/agent.class.php @@ -12,7 +12,7 @@ * For more information, please refer to UNLICENSE */ -require_once "class/object.class.php"; +require_once "class/obj.class.php"; require_once "class/pad.class.php"; require_once "class/settings.class.php"; require_once "class/phpmailer.class.php"; @@ -22,7 +22,7 @@ require_once "class/smtp.class.php"; * This is a supertype for users and groups, since these two object types * will often be handled polymorphically and will share some functionality. */ -abstract class agent extends object +abstract class agent extends obj { /* * Constructor @@ -35,7 +35,7 @@ abstract class agent extends object /* * Check whether this agent is the owner of the given object */ - public function isOwnerOf(object $obj) : bool + public function isOwnerOf(obj $obj) : bool { return $obj->getOwner()->guid == $this->guid; } @@ -43,7 +43,7 @@ abstract class agent extends object /* * Check whether this agent is a member of the given object */ - public function isMemberOf(object $obj) : bool + public function isMemberOf(obj $obj) : bool { foreach ($obj->getMembers() as $memb) { @@ -114,7 +114,7 @@ abstract class agent extends object * Check whether this agent has access permission for given * object */ - public function canAccess(object $obj) : bool + public function canAccess(obj $obj) : bool { if ($this->admin) return true; @@ -130,13 +130,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canAccessSub($parent)) return true; } else if ($this->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canAccessSub($owner)) return true; } @@ -148,7 +148,7 @@ abstract class agent extends object * Check whether this agent has modify permission for given * object */ - public function canModify(object $obj) : bool + public function canModify(obj $obj) : bool { if ($this->admin) return true; @@ -161,13 +161,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canModifySub($parent)) return true; } else if ($obj->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canModifySub($owner)) return true; } @@ -179,7 +179,7 @@ abstract class agent extends object * Check whether this agent has modify members permission for * given object */ - public function canModifyMembers(object $obj) : bool + public function canModifyMembers(obj $obj) : bool { if ($this->admin) return true; @@ -192,13 +192,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canModifySubMembers($parent)) return true; } else if ($obj->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canModifySubMembers($owner)) return true; } @@ -210,7 +210,7 @@ abstract class agent extends object * Check whether this agent has modify permissions permission * for given object */ - public function canModifyPermissions(object $obj) : bool + public function canModifyPermissions(obj $obj) : bool { if ($this->admin) return true; @@ -220,13 +220,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canModifySubPermissions($parent)) return true; } else if ($obj->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canModifySubPermissions($owner)) return true; } @@ -238,7 +238,7 @@ abstract class agent extends object * Check whether this agent has access-sub permission for * given object */ - public function canAccessSub(object $obj) : bool + public function canAccessSub(obj $obj) : bool { if ($this->admin) return true; @@ -254,13 +254,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canAccessSub($parent)) return true; } else if ($obj->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canAccessSub($owner)) return true; } @@ -272,7 +272,7 @@ abstract class agent extends object * Check whether this agent has create-sub permission * for given object */ - public function canCreateSub(object $obj) : bool + public function canCreateSub(obj $obj) : bool { if ($this->admin) return true; @@ -288,13 +288,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canCreateSub($parent)) return true; } else if ($obj->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canCreateSub($owner)) return true; } @@ -306,7 +306,7 @@ abstract class agent extends object * Check whether this agent has modify-sub permission * for given object */ - public function canModifySub(object $obj) : bool + public function canModifySub(obj $obj) : bool { if ($this->admin) return true; @@ -319,13 +319,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canModifySub($parent)) return true; } else if ($obj->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canModifySub($owner)) return true; } @@ -337,7 +337,7 @@ abstract class agent extends object * Check whether this agent has modify-sub-members * permission for given object */ - public function canModifySubMembers(object $obj) : bool + public function canModifySubMembers(obj $obj) : bool { if ($this->admin) return true; @@ -350,13 +350,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canModifySubMembers($parent)) return true; } else if ($obj->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canModifySubMembers($owner)) return true; } @@ -368,7 +368,7 @@ abstract class agent extends object * Check whether this agent has modify-sub-permissions * permission for given object */ - public function canModifySubPermissions(object $obj) : bool + public function canModifySubPermissions(obj $obj) : bool { if ($this->admin) return true; @@ -378,13 +378,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canModifySubPermissions($parent)) return true; } else if ($obj->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canModifySubPermissions($owner)) return true; } diff --git a/app/class/issue.class.php b/app/class/issue.class.php index b61a6e3..1c77894 100644 --- a/app/class/issue.class.php +++ b/app/class/issue.class.php @@ -12,7 +12,7 @@ * For more information, please refer to UNLICENSE */ -require_once "class/object.class.php"; +require_once "class/obj.class.php"; require_once "class/stage.class.php"; require_once "class/user.class.php"; require_once "class/mesg.class.php"; @@ -21,7 +21,7 @@ require_once "class/mesg.class.php"; * This class models Scrott issues. Issues represent units of work, can * be assigned to users, and advance through a pipeline. */ -class issue extends object +class issue extends obj { /* * Constructor diff --git a/app/class/mesg.class.php b/app/class/mesg.class.php index 2512d03..1a864c0 100644 --- a/app/class/mesg.class.php +++ b/app/class/mesg.class.php @@ -12,7 +12,7 @@ * For more information, please refer to UNLICENSE */ -require_once "class/object.class.php"; +require_once "class/obj.class.php"; require_once "class/user.class.php"; require_once "class/pad.class.php"; require_once "class/stage.class.php"; @@ -22,7 +22,7 @@ require_once "class/issue.class.php"; * This class models issue activity, private messaging, pad discussions, * and system and object log messages. */ -class mesg extends object +class mesg extends obj { /* * Constants used for uploading attachments @@ -56,7 +56,7 @@ class mesg extends object /* * Initialize a new regular message. */ - public static function initNew(string $message, user $author, object $parent) : mesg + public static function initNew(string $message, user $author, obj $parent) : mesg { $mesg = new mesg(); $mesg->setOwner($author); @@ -106,7 +106,7 @@ class mesg extends object /* * Initialize a new log message. */ - public static function initNewLog(string $message, user $author, object $parent) : mesg + public static function initNewLog(string $message, user $author, obj $parent) : mesg { $owner = $parent->getOwner(); @@ -321,7 +321,7 @@ class mesg extends object break; } - $rcpt = object::arrayUnique($rcpt); + $rcpt = obj::arrayUnique($rcpt); $author = $this->author; $rcpt = array_filter($rcpt, function ($val) use($author) { return $val->guid != $author; }); $attachPath = ($this->getAttachment() ? "dynmic/attach/" . $this->guid : NULL); diff --git a/app/class/pad.class.php b/app/class/pad.class.php index 3966f58..38812d6 100644 --- a/app/class/pad.class.php +++ b/app/class/pad.class.php @@ -12,7 +12,7 @@ * For more information, please refer to UNLICENSE */ -require_once "class/object.class.php"; +require_once "class/obj.class.php"; require_once "class/agent.class.php"; require_once "class/stage.class.php"; @@ -20,7 +20,7 @@ require_once "class/stage.class.php"; * This class models Scrott pads. Pads are the space for projects to track * issues and communicate. */ -class pad extends object +class pad extends obj { /* * Constructor diff --git a/app/class/stage.class.php b/app/class/stage.class.php index 74c5f42..43bb3c3 100644 --- a/app/class/stage.class.php +++ b/app/class/stage.class.php @@ -12,7 +12,7 @@ * For more information, please refer to UNLICENSE */ -require_once "class/object.class.php"; +require_once "class/obj.class.php"; require_once "class/pad.class.php"; require_once "class/issue.class.php"; @@ -20,7 +20,7 @@ require_once "class/issue.class.php"; * This class models Scrott pad stages. Stages form a pipeline through * which issues can progress. */ -class stage extends object +class stage extends obj { /* * Constructor @@ -173,7 +173,7 @@ class stage extends object * moved to the given stage object. Additionally, the pad may be * given, in which case, those issues will be closed. */ - public function removeStage(object $mvt) : void + public function removeStage(obj $mvt) : void { if (!($prev = $this->getPrev())) $prev = $this->getParent(); |