예제 #1
0
 /**
  * Method used to get the system-wide default preferences.
  *
  * @param   array $projects An array of projects this user will have access too.
  * @return  array of the default preferences
  */
 public static function getDefaults($projects = null)
 {
     $prefs = array('receive_assigned_email' => array(), 'receive_new_issue_email' => array(), 'timezone' => Date_Helper::getDefaultTimezone(), 'week_firstday' => Date_Helper::getDefaultWeekday(), 'list_refresh_rate' => APP_DEFAULT_REFRESH_RATE, 'email_refresh_rate' => APP_DEFAULT_REFRESH_RATE, 'email_signature' => '', 'auto_append_email_sig' => 'no', 'auto_append_note_sig' => 'no', 'close_popup_windows' => 0);
     if (is_array($projects)) {
         foreach ($projects as $prj_id) {
             $prefs['receive_assigned_email'][$prj_id] = APP_DEFAULT_ASSIGNED_EMAILS;
             $prefs['receive_new_issue_email'][$prj_id] = APP_DEFAULT_NEW_EMAILS;
             $prefs['receive_copy_of_own_action'][$prj_id] = APP_DEFAULT_COPY_OF_OWN_ACTION;
         }
     }
     return $prefs;
 }