some maintenance
Signed-off-by: dartcafe <github@dartcafe.de>
This commit is contained in:
Родитель
7b72fa965a
Коммит
824c6f0e4a
|
@ -70,7 +70,7 @@ class ShareController extends Controller {
|
|||
}
|
||||
|
||||
/**
|
||||
* * List shares
|
||||
* List shares
|
||||
*
|
||||
* @NoAdminRequired
|
||||
*
|
||||
|
@ -83,7 +83,7 @@ class ShareController extends Controller {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Get share
|
||||
* Get share
|
||||
*
|
||||
* @NoAdminRequired
|
||||
*
|
||||
|
|
|
@ -205,7 +205,7 @@ class Version0009Date20181125061900 extends SimpleMigrationStep {
|
|||
}
|
||||
|
||||
/**
|
||||
* * $schemaClosure The `\Closure` returns a `ISchemaWrapper`
|
||||
* $schemaClosure The `\Closure` returns a `ISchemaWrapper`
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
@ -190,7 +190,6 @@ class Acl implements JsonSerializable {
|
|||
return $this->getIsOwner()
|
||||
|| $this->poll->getShowResults() === Poll::SHOW_RESULTS_ALWAYS
|
||||
|| $this->poll->getShowResults() === Poll::SHOW_RESULTS_CLOSED && $this->poll->getExpired();
|
||||
break;
|
||||
case self::PERMISSION_SEE_USERNAMES:
|
||||
return $this->getIsOwner() || !$this->poll->getAnonymous();
|
||||
case self::PERMISSION_TAKE_OVER:
|
||||
|
|
|
@ -49,8 +49,8 @@ class Contact extends UserGroupClass {
|
|||
|
||||
|
||||
/**
|
||||
* * must use displayName for contact's user id, because contact id
|
||||
* * is not accessable outside the owners's scope
|
||||
* must use displayName for contact's user id, because contact id
|
||||
* is not accessable outside the owners's scope
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
@ -108,8 +108,8 @@ class Contact extends UserGroupClass {
|
|||
}
|
||||
|
||||
/**
|
||||
* * List all contacts with email adresses
|
||||
* * excluding contacts from localSystemBook
|
||||
* List all contacts with email adresses
|
||||
* excluding contacts from localSystemBook
|
||||
*
|
||||
* @param string[] $queryRange
|
||||
*/
|
||||
|
|
|
@ -45,8 +45,7 @@ class CalendarService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * * getEvents - get events from the user's calendars inside given timespan
|
||||
* *
|
||||
* getEvents - get events from the user's calendars inside given timespan
|
||||
*
|
||||
* @param DateTime $from
|
||||
* @param DateTime $to
|
||||
|
@ -84,7 +83,7 @@ class CalendarService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Get user's calendars
|
||||
* Get user's calendars
|
||||
*
|
||||
* @return array[]
|
||||
*
|
||||
|
|
|
@ -45,7 +45,7 @@ class LogService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Log poll activity
|
||||
* Log poll activity
|
||||
*
|
||||
* @param null|string $userId
|
||||
*/
|
||||
|
|
|
@ -88,7 +88,7 @@ class OptionService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Get all options of given poll
|
||||
* Get all options of given poll
|
||||
*
|
||||
* @return Option[]
|
||||
*
|
||||
|
@ -124,7 +124,7 @@ class OptionService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Get option
|
||||
* Get option
|
||||
*
|
||||
* @return Option
|
||||
*/
|
||||
|
@ -136,7 +136,7 @@ class OptionService {
|
|||
|
||||
|
||||
/**
|
||||
* * Add a new option
|
||||
* Add a new option
|
||||
*
|
||||
* @return Option
|
||||
*/
|
||||
|
@ -157,7 +157,7 @@ class OptionService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Update option
|
||||
* Update option
|
||||
*
|
||||
* @return Option
|
||||
*/
|
||||
|
@ -172,7 +172,7 @@ class OptionService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Delete option
|
||||
* Delete option
|
||||
*
|
||||
* @return Option
|
||||
*/
|
||||
|
@ -186,7 +186,7 @@ class OptionService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Switch optoin confirmation
|
||||
* Switch option confirmation
|
||||
*
|
||||
* @return Option
|
||||
*/
|
||||
|
@ -201,7 +201,7 @@ class OptionService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Make a sequence of date poll options
|
||||
* Make a sequence of date poll options
|
||||
* @param int $optionId
|
||||
* @param int $step - The step for creating the sequence
|
||||
* @param string $unit - The timeunit (year, month, ...)
|
||||
|
@ -241,7 +241,7 @@ class OptionService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Copy options from $fromPoll to $toPoll
|
||||
* Copy options from $fromPoll to $toPoll
|
||||
*
|
||||
* @return Option[]
|
||||
*
|
||||
|
@ -366,12 +366,10 @@ class OptionService {
|
|||
$this->option->setTimestamp($timestamp);
|
||||
$this->option->setOrder($timestamp);
|
||||
$this->option->setDuration($duration);
|
||||
if ($duration === 0) {
|
||||
$this->option->setPollOptionText(date('c', $timestamp));
|
||||
} elseif ($duration > 0) {
|
||||
if ($duration > 0) {
|
||||
$this->option->setPollOptionText(date('c', $timestamp) . ' - ' . date('c', $timestamp + $duration));
|
||||
} else {
|
||||
$this->option->setPollOptionText($pollOptionText);
|
||||
$this->option->setPollOptionText(date('c', $timestamp));
|
||||
}
|
||||
} else {
|
||||
$this->option->setPollOptionText($pollOptionText);
|
||||
|
@ -391,9 +389,7 @@ class OptionService {
|
|||
// First: Find votes, where the user voted yes or maybe
|
||||
$userId = $this->acl->getUserId();
|
||||
$exceptVotes = array_filter($this->votes, function ($vote) use ($userId) {
|
||||
if ($vote->getUserId() === $userId && in_array($vote->getVoteAnswer(), ['yes', 'maybe'])) {
|
||||
return $vote;
|
||||
}
|
||||
return $vote->getUserId() === $userId && in_array($vote->getVoteAnswer(), ['yes', 'maybe']);
|
||||
});
|
||||
|
||||
// Second: Extract only the vote option texts to an array
|
||||
|
@ -446,6 +442,7 @@ class OptionService {
|
|||
|
||||
$option->isBookedUp = $this->poll->getOptionLimit() ? $this->poll->getOptionLimit() <= $option->yes : false;
|
||||
|
||||
// remove details, if the results shall be hidden
|
||||
if (!$this->acl->isAllowed(Acl::PERMISSION_SEE_RESULTS)) {
|
||||
$option->yes = 0;
|
||||
$option->no = 0;
|
||||
|
@ -487,8 +484,8 @@ class OptionService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Get the highest order number in $pollId
|
||||
* * Return Highest order number
|
||||
* Get the highest order number in $pollId
|
||||
* Return Highest order number
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
|
|
|
@ -139,7 +139,7 @@ class PollService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Update poll configuration
|
||||
* Update poll configuration
|
||||
*
|
||||
* @return Poll
|
||||
*/
|
||||
|
@ -164,7 +164,7 @@ class PollService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * get poll configuration
|
||||
* get poll configuration
|
||||
*
|
||||
* @return Poll
|
||||
*/
|
||||
|
@ -218,7 +218,7 @@ class PollService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Update poll configuration
|
||||
* Update poll configuration
|
||||
*
|
||||
* @return Poll
|
||||
*/
|
||||
|
@ -254,7 +254,7 @@ class PollService {
|
|||
|
||||
|
||||
/**
|
||||
* * Switch deleted status (move to deleted polls)
|
||||
* Switch deleted status (move to deleted polls)
|
||||
*
|
||||
* @return Poll
|
||||
*/
|
||||
|
@ -283,7 +283,7 @@ class PollService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Delete poll
|
||||
* Delete poll
|
||||
*
|
||||
* @return Poll
|
||||
*/
|
||||
|
@ -309,7 +309,7 @@ class PollService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Clone poll
|
||||
* Clone poll
|
||||
*
|
||||
* @return Poll
|
||||
*/
|
||||
|
@ -343,7 +343,7 @@ class PollService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Collect email addresses from particitipants
|
||||
* Collect email addresses from particitipants
|
||||
*
|
||||
* @return string[]
|
||||
*
|
||||
|
@ -362,7 +362,7 @@ class PollService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Get valid values for configuration options
|
||||
* Get valid values for configuration options
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
|
@ -377,7 +377,7 @@ class PollService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Get valid values for pollType
|
||||
* Get valid values for pollType
|
||||
*
|
||||
* @return string[]
|
||||
*
|
||||
|
@ -388,7 +388,7 @@ class PollService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Get valid values for access
|
||||
* Get valid values for access
|
||||
*
|
||||
* @return string[]
|
||||
*
|
||||
|
@ -399,7 +399,7 @@ class PollService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Get valid values for showResult
|
||||
* Get valid values for showResult
|
||||
*
|
||||
* @return string[]
|
||||
*
|
||||
|
|
|
@ -60,7 +60,7 @@ class PreferencesService {
|
|||
}
|
||||
}
|
||||
/**
|
||||
* * Read all preferences
|
||||
* Read all preferences
|
||||
*
|
||||
* @return Preferences
|
||||
*/
|
||||
|
@ -69,7 +69,7 @@ class PreferencesService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Write references
|
||||
* Write references
|
||||
*
|
||||
* @return Preferences
|
||||
*/
|
||||
|
|
|
@ -79,7 +79,7 @@ class ShareService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Read all shares of a poll based on the poll id and return list as array
|
||||
* Read all shares of a poll based on the poll id and return list as array
|
||||
*
|
||||
* @return Share[]
|
||||
*
|
||||
|
@ -164,7 +164,7 @@ class ShareService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Get share by token
|
||||
* Get share by token
|
||||
*
|
||||
* @return Share
|
||||
*/
|
||||
|
@ -175,7 +175,7 @@ class ShareService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * crate share - MUST BE PRIVATE!
|
||||
* crate share - MUST BE PRIVATE!
|
||||
*
|
||||
* @return Share
|
||||
*/
|
||||
|
@ -209,7 +209,7 @@ class ShareService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Add share
|
||||
* Add share
|
||||
*
|
||||
* @return Share
|
||||
*/
|
||||
|
@ -232,8 +232,8 @@ class ShareService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Set emailAddress to personal share
|
||||
* * or update an email share with the username
|
||||
* Set emailAddress to personal share
|
||||
* or update an email share with the username
|
||||
*
|
||||
* @return Share
|
||||
*/
|
||||
|
@ -255,7 +255,7 @@ class ShareService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Delete emailAddress of personal share
|
||||
* Delete emailAddress of personal share
|
||||
*
|
||||
* @return Share
|
||||
*/
|
||||
|
@ -275,8 +275,8 @@ class ShareService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Create a personal share from a public share
|
||||
* * or update an email share with the username
|
||||
* Create a personal share from a public share
|
||||
* or update an email share with the username
|
||||
*
|
||||
* @return Share
|
||||
*/
|
||||
|
|
|
@ -54,7 +54,7 @@ class SystemService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Validate string as email address
|
||||
* Validate string as email address
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -63,8 +63,8 @@ class SystemService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Validate email address and throw an exception
|
||||
* * return true, if email address is a valid
|
||||
* Validate email address and throw an exception
|
||||
* return true, if email address is a valid
|
||||
*
|
||||
* @return true
|
||||
*/
|
||||
|
@ -92,7 +92,7 @@ class SystemService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Get a combined list of users, groups, circles, contact groups and contacts
|
||||
* Get a combined list of users, groups, circles, contact groups and contacts
|
||||
*
|
||||
* @return (Circle|Email|Group|User|Contact|ContactGroup|mixed)[]
|
||||
*
|
||||
|
@ -112,9 +112,9 @@ class SystemService {
|
|||
}
|
||||
|
||||
/**
|
||||
* * Validate it the user name is reserved
|
||||
* * return false, if this username already exists as a user or as
|
||||
* * a participant of the poll
|
||||
* Validate it the user name is reserved
|
||||
* return false, if this username already exists as a user or as
|
||||
* a participant of the poll
|
||||
*
|
||||
* @return true
|
||||
*/
|
||||
|
|
|
@ -66,7 +66,6 @@ export default {
|
|||
|
||||
<style lang="scss">
|
||||
.markup-description {
|
||||
white-space: pre;
|
||||
p {
|
||||
white-space: pre-wrap;
|
||||
margin: 16px 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче