/etc/horde/nag/prefs.php is in php-horde-nag 4.2.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | <?php
/**
* See horde/config/prefs.php for documentation on the structure of this file.
*
* IMPORTANT: DO NOT EDIT THIS FILE!
* Local overrides MUST be placed in pref.local.php or pref.d/.
* If the 'vhosts' setting has been enabled in Horde's configuration, you can
* use prefs-servername.php.
*/
$prefGroups['display'] = array(
'column' => _("General Preferences"),
'label' => _("Display Preferences"),
'desc' => _("Change your task sorting and display preferences."),
'members' => array('tasklist_columns', 'sortby', 'altsortby', 'sortdir'),
);
$prefGroups['deletion'] = array(
'column' => _("General Preferences"),
'label' => _("Deleting Tasks"),
'desc' => _("Delete behaviour"),
'members' => array('delete_opt', 'purge_completed_interval', 'purge_completed_keep'),
);
$prefGroups['tasks'] = array(
'column' => _("General Preferences"),
'label' => _("Task Defaults"),
'desc' => _("Defaults for new tasks"),
'members' => array('default_due', 'default_due_days', 'default_due_time'),
);
$prefGroups['share'] = array(
'column' => _("Task List and Share Preferences"),
'label' => _("Default Task List"),
'desc' => _("Choose your default task list."),
'members' => array('default_tasklist'),
);
$prefGroups['sync'] = array(
'column' => _("Task List and Share Preferences"),
'label' => _("Synchronization Preferences"),
'desc' => _("Choose the task lists to use for synchronization with external devices."),
'members' => array('sync_lists', 'activesync_no_multiplex'),
);
$prefGroups['notification'] = array(
'column' => _("Task List and Share Preferences"),
'label' => _("Notifications"),
'desc' => _("Choose if you want to be notified of task changes and task alarms."),
'members' => array('task_notification', 'task_notification_exclude_self', 'task_alarms_select'),
);
$prefGroups['external'] = array(
'column' => _("Task List and Share Preferences"),
'label' => _("External Data"),
'desc' => _("Show data from other applications or sources."),
'members' => array('show_external'),
);
// columns in the list view
$_prefs['tasklist_columns'] = array(
'value' => 'a:2:{i:0;s:8:"priority";i:1;s:3:"due";}',
'type' => 'multienum',
'enum' => array(
'tasklist' => _("Task List"),
'priority' => _("Priority"),
'assignee' => _("Assignee"),
'due' => _("Due Date"),
'start' => _("Start Date"),
'estimate' => _("Estimated Time")
),
'desc' => _("Select the columns that should be shown in the list view:")
);
// user preferred sorting column
$_prefs['sortby'] = array(
'value' => Nag::SORT_PRIORITY,
'type' => 'enum',
'enum' => array(
Nag::SORT_PRIORITY => _("Priority"),
Nag::SORT_NAME => _("Task Name"),
Nag::SORT_DUE => _("Due Date"),
Nag::SORT_START => _("Start Date"),
Nag::SORT_COMPLETION => _("Completed?"),
Nag::SORT_ESTIMATE => _("Estimated Time"),
Nag::SORT_ASSIGNEE => _("Assignee"),
Nag::SORT_OWNER => _("Task List")
),
'desc' => _("Sort tasks by:"),
);
// alternate sort column
$_prefs['altsortby'] = array(
'value' => Nag::SORT_DUE,
'type' => 'enum',
'enum' => array(
Nag::SORT_PRIORITY => _("Priority"),
Nag::SORT_NAME => _("Task Name"),
Nag::SORT_DUE => _("Due Date"),
Nag::SORT_START => _("Start Date"),
Nag::SORT_COMPLETION => _("Completed?"),
Nag::SORT_ESTIMATE => _("Estimated Time"),
Nag::SORT_ASSIGNEE => _("Assignee"),
Nag::SORT_OWNER => _("Task List")
),
'desc' => _("Then:"),
);
// user preferred sorting direction
$_prefs['sortdir'] = array(
'value' => Nag::SORT_ASCEND,
'type' => 'enum',
'enum' => array(
Nag::SORT_ASCEND => _("Ascending"),
Nag::SORT_DESCEND => _("Descending")
),
'desc' => _("Sort direction:"),
);
// preference for delete confirmation dialog.
$_prefs['delete_opt'] = array(
'value' => 1,
'type' => 'checkbox',
'desc' => _("Do you want to confirm deleting entries?"),
);
// how often to purge completed tasks?
$_prefs['purge_completed_interval'] = array(
'value' => 0,
'type' => 'enum',
'enum' => array_merge(array(0 => _("Never")), Horde_LoginTasks::getLabels()),
'desc' => _("Purge completed tasks how often:")
);
$_prefs['purge_completed_keep'] = array(
'value' => 30,
'type' => 'number',
'desc' => _("Purge completed tasks older than this amount of days.")
);
// default to tasks having a due date?
$_prefs['default_due'] = array(
'value' => 0,
'type' => 'checkbox',
'desc' => _("When creating a new task, should it default to having a due date?"),
);
// default number of days out for due dates
$_prefs['default_due_days'] = array(
'value' => 1,
'type' => 'number',
'zero' => true,
'desc' => _("When creating a new task, how many days in the future should the default due date be (0 means today)?"),
);
// default due time
$_prefs['default_due_time'] = array(
'value' => 'now',
'type' => 'enum',
'enum' => array(),
'desc' => _("What do you want to be the default due time for tasks?"),
'on_init' => function($ui) {
$enum = array('now' => _("The current hour"));
$twentyfour = $GLOBALS['prefs']->getValue('twentyFour');
for ($i = 0; $i < 24; ++$i) {
$value = sprintf('%02d:00', $i);
$enum[$value] = $twentyfour
? $value
: sprintf('%02d:00 ' . ($i >= 12 ? _("pm") : _("am")), ($i % 12 ? $i % 12 : 12));
}
$ui->prefs['default_due_time']['enum'] = $enum;
}
);
// new task notifications
$_prefs['task_notification'] = array(
'value' => '',
'type' => 'enum',
'enum' => array(
'' => _("No"),
'owner' => _("On my task lists only"),
'show' => _("On all shown task lists"),
'read' => _("On all task lists I have read access to")
),
'desc' => _("Choose if you want to be notified of new, edited, and deleted tasks by email:"),
);
$_prefs['task_notification_exclude_self'] = array(
'value' => 0,
'locked' => false,
'type' => 'checkbox',
'desc' => _("Don't send me a notification if I've added, changed or deleted the task?")
);
// alarm methods
$_prefs['task_alarms_select'] = array(
'type' => 'special',
'handler' => 'Nag_Prefs_Special_TaskAlarms',
'suppress' => function() {
return empty($GLOBALS['conf']['alarms']['driver']);
}
);
$_prefs['task_alarms'] = array(
'value' => 'a:1:{s:6:"notify";a:0:{}}'
);
// show data from other applications that can be listed as tasks?
$_prefs['show_external'] = array(
'value' => 'a:0:{}',
'type' => 'multienum',
'enum' => array('whups' => $GLOBALS['registry']->get('name', 'whups')),
'desc' => _("Show data from any of these other applications in your task list?"),
'suppress' => function() {
return !$GLOBALS['registry']->hasMethod('getListTypes', 'whups');
}
);
// show complete/incomplete tasks?
$_prefs['show_completed'] = array(
'value' => 1,
'type' => 'enum',
'enum' => array(
Nag::VIEW_ALL => _("All tasks"),
Nag::VIEW_INCOMPLETE => _("Incomplete tasks"),
Nag::VIEW_COMPLETE => _("Complete tasks"),
Nag::VIEW_FUTURE => _("Future tasks")
),
'desc' => _("Show complete, incomplete, or all tasks in the task list?"),
);
// default tasklists
// Set locked to true if you don't want users to have multiple task lists.
$_prefs['default_tasklist'] = array(
'value' => '',
'type' => 'enum',
'enum' => array(),
'desc' => _("Your default task list:"),
'on_init' => function($ui) {
$enum = array();
foreach (Nag::listTasklists(false, Horde_Perms::EDIT, false) as $key => $val) {
$enum[$key] = Nag::getLabel($val);
}
$ui->prefs['default_tasklist']['enum'] = $enum;
},
'on_change' => function() {
$GLOBALS['injector']->getInstance('Nag_Factory_Tasklists')
->create()
->setDefaultShare($GLOBALS['prefs']->getValue('default_tasklist'));
$sync = @unserialize($GLOBALS['prefs']->getValue('sync_lists'));
$haveDefault = false;
$default = Nag::getDefaultTasklist(Horde_Perms::EDIT);
foreach ($sync as $cid) {
if ($cid == $default) {
$haveDefault = true;
break;
}
}
if (!$haveDefault) {
$sync[] = $default;
$GLOBALS['prefs']->setValue('sync_lists', serialize($sync));
}
}
);
// store the task lists to diplay
$_prefs['display_tasklists'] = array(
'value' => 'a:0:{}'
);
// Tasklists use for synchronization
$_prefs['sync_lists'] = array(
'value' => 'a:0:{}',
'type' => 'multienum',
'enum' => array(),
'desc' => _("Select the task lists that, in addition to the default, should be used for synchronization with external devices:"),
'on_init' => function($ui) {
$enum = array();
$sync = @unserialize($GLOBALS['prefs']->getValue('sync_lists'));
if (empty($sync)) {
$GLOBALS['prefs']->setValue('sync_lists', serialize(array(Nag::getDefaultTasklist())));
}
foreach (Nag::listTasklists(false, Horde_Perms::EDIT, false) as $key => $list) {
if ($list->getName() != Nag::getDefaultTasklist(Horde_Perms::EDIT)) {
$enum[$key] = Nag::getLabel($list);
}
}
$ui->prefs['sync_lists']['enum'] = $enum;
},
'on_change' => function() {
$sync = @unserialize($GLOBALS['prefs']->getValue('sync_lists'));
$haveDefault = false;
$default = Nag::getDefaultTasklist(Horde_Perms::EDIT);
foreach ($sync as $cid) {
if ($cid == $default) {
$haveDefault = true;
break;
}
}
if (!$haveDefault) {
$sync[] = $default;
$GLOBALS['prefs']->setValue('sync_lists', serialize($sync));
}
if ($GLOBALS['conf']['activesync']['enabled'] && !$GLOBALS['prefs']->getValue('activesync_no_multiplex')) {
try {
$sm = $GLOBALS['injector']->getInstance('Horde_ActiveSyncState');
$sm->setLogger($GLOBALS['injector']->getInstance('Horde_Log_Logger'));
$devices = $sm->listDevices($GLOBALS['registry']->getAuth());
foreach ($devices as $device) {
$sm->removeState(array(
'devId' => $device['device_id'],
'id' => Horde_Core_ActiveSync_Driver::TASKS_FOLDER_UID,
'user' => $GLOBALS['registry']->getAuth()
));
}
$GLOBALS['notification']->push(_("All state removed for your ActiveSync devices. They will resynchronize next time they connect to the server."));
} catch (Horde_ActiveSync_Exception $e) {
$GLOBALS['notification']->push(_("There was an error communicating with the ActiveSync server: %s"), $e->getMessage(), 'horde.error');
}
}
}
);
// @todo We default to using multiplex since that is the current behavior
// For Nag 5 we should default to separate.
$_prefs['activesync_no_multiplex'] = array(
'type' => 'checkbox',
'desc' => _("Support separate task lists?"),
'value' => 0
);
|