Code Duplication    Length = 13-13 lines in 2 locations

code/control/DNRoot.php 1 location

@@ 200-212 (lines=13) @@
197
	 *
198
	 * @return boolean
199
	 */
200
	public static function FlagSnapshotsEnabled() {
201
		if (defined('FLAG_SNAPSHOTS_ENABLED') && FLAG_SNAPSHOTS_ENABLED) {
202
			return true;
203
		}
204
		if (defined('FLAG_SNAPSHOTS_ENABLED_FOR_MEMBERS') && FLAG_SNAPSHOTS_ENABLED_FOR_MEMBERS) {
205
			$allowedMembers = explode(';', FLAG_SNAPSHOTS_ENABLED_FOR_MEMBERS);
206
			$member = Member::currentUser();
207
			if ($allowedMembers && $member && in_array($member->Email, $allowedMembers)) {
208
				return true;
209
			}
210
		}
211
		return false;
212
	}
213
214
	/**
215
	 * @return ArrayList

code/model/jobs/DNDeployment.php 1 location

@@ 95-107 (lines=13) @@
92
	 *
93
	 * @return boolean
94
	 */
95
	public static function flag_new_deploy_enabled() {
96
		if (defined('FLAG_NEWDEPLOY_ENABLED') && FLAG_NEWDEPLOY_ENABLED) {
97
			return true;
98
		}
99
		if (defined('FLAG_NEWDEPLOY_ENABLED_FOR_MEMBERS') && FLAG_NEWDEPLOY_ENABLED_FOR_MEMBERS) {
100
			$allowedMembers = explode(';', FLAG_NEWDEPLOY_ENABLED_FOR_MEMBERS);
101
			$member = Member::currentUser();
102
			if ($allowedMembers && $member && in_array($member->Email, $allowedMembers)) {
103
				return true;
104
			}
105
		}
106
		return false;
107
	}
108
109
	public function setResqueToken($token) {
110
		$this->ResqueToken = $token;