@@ 74-96 (lines=23) @@ | ||
71 | }); |
|
72 | ||
73 | $activities = []; |
|
74 | foreach ($settings as $setting) { |
|
75 | if (!$setting->canChangeStream() && !$setting->canChangeMail()) { |
|
76 | // No setting can be changed => don't display |
|
77 | continue; |
|
78 | } |
|
79 | ||
80 | $methods = []; |
|
81 | if ($setting->canChangeStream()) { |
|
82 | $methods[] = IExtension::METHOD_STREAM; |
|
83 | } |
|
84 | if ($setting->canChangeMail()) { |
|
85 | $methods[] = IExtension::METHOD_MAIL; |
|
86 | } |
|
87 | ||
88 | $identifier = $setting->getIdentifier(); |
|
89 | ||
90 | $activities[$identifier] = array( |
|
91 | 'desc' => $setting->getName(), |
|
92 | IExtension::METHOD_MAIL => $this->userSettings->getConfigSetting('email', $identifier), |
|
93 | IExtension::METHOD_STREAM => $this->userSettings->getConfigSetting('stream', $identifier), |
|
94 | 'methods' => $methods, |
|
95 | ); |
|
96 | } |
|
97 | ||
98 | $settingBatchTime = UserSettings::EMAIL_SEND_HOURLY; |
|
99 | $currentSetting = (int) $this->userSettings->getConfigSetting('setting', 'batchtime'); |
@@ 87-109 (lines=23) @@ | ||
84 | }); |
|
85 | ||
86 | $activities = []; |
|
87 | foreach ($settings as $setting) { |
|
88 | if (!$setting->canChangeStream() && !$setting->canChangeMail()) { |
|
89 | // No setting can be changed => don't display |
|
90 | continue; |
|
91 | } |
|
92 | ||
93 | $methods = []; |
|
94 | if ($setting->canChangeStream()) { |
|
95 | $methods[] = IExtension::METHOD_STREAM; |
|
96 | } |
|
97 | if ($setting->canChangeMail()) { |
|
98 | $methods[] = IExtension::METHOD_MAIL; |
|
99 | } |
|
100 | ||
101 | $identifier = $setting->getIdentifier(); |
|
102 | ||
103 | $activities[$identifier] = array( |
|
104 | 'desc' => $setting->getName(), |
|
105 | IExtension::METHOD_MAIL => $this->userSettings->getUserSetting($this->user, 'email', $identifier), |
|
106 | IExtension::METHOD_STREAM => $this->userSettings->getUserSetting($this->user, 'stream', $identifier), |
|
107 | 'methods' => $methods, |
|
108 | ); |
|
109 | } |
|
110 | ||
111 | $settingBatchTime = UserSettings::EMAIL_SEND_HOURLY; |
|
112 | $currentSetting = (int) $this->userSettings->getUserSetting($this->user, 'setting', 'batchtime'); |