From 7a2065c6877dcb85455fcd636e36c1f8d78b59a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20d=27Anterroches?= Date: Wed, 11 Aug 2010 14:42:06 +0200 Subject: [PATCH] Fixed to correctly use the default values if the template project was not fully updated. --- src/IDF/Form/Admin/ProjectCreate.php | 42 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/IDF/Form/Admin/ProjectCreate.php b/src/IDF/Form/Admin/ProjectCreate.php index 3e5b0cb..93470f2 100644 --- a/src/IDF/Form/Admin/ProjectCreate.php +++ b/src/IDF/Form/Admin/ProjectCreate.php @@ -255,28 +255,28 @@ class IDF_Form_Admin_ProjectCreate extends Pluf_Form // We need to get all the configuration variables we want from // the old project and put them into the new project. $props = array( - 'labels_download_predefined', - 'labels_download_one_max', - 'labels_wiki_predefined', - 'labels_wiki_one_max', - 'labels_issue_open', - 'labels_issue_closed', - 'labels_issue_predefined', - 'labels_issue_one_max', - 'webhook_url', - 'downloads_access_rights', - 'review_access_rights', - 'wiki_access_rights', - 'source_access_rights', - 'issues_access_rights', - 'downloads_notification_email', - 'review_notification_email', - 'wiki_notification_email', - 'source_notification_email', - 'issues_notification_email', + 'labels_download_predefined' => IDF_Form_UploadConf::init_predefined, + 'labels_download_one_max' => IDF_Form_UploadConf::init_one_max, + 'labels_wiki_predefined' => IDF_Form_WikiConf::init_predefined, + 'labels_wiki_one_max' => IDF_Form_WikiConf::init_one_max, + 'labels_issue_open' => IDF_Form_IssueTrackingConf::init_open, + 'labels_issue_closed' => IDF_Form_IssueTrackingConf::init_closed, + 'labels_issue_predefined' => IDF_Form_IssueTrackingConf::init_predefined, + 'labels_issue_one_max' => IDF_Form_IssueTrackingConf::init_one_max, + 'webhook_url' => '', + 'downloads_access_rights' => 'all', + 'review_access_rights' => 'all', + 'wiki_access_rights' => 'all', + 'source_access_rights' => 'all', + 'issues_access_rights' => 'all', + 'downloads_notification_email' => '', + 'review_notification_email' => '', + 'wiki_notification_email' => '', + 'source_notification_email' => '', + 'issues_notification_email' => '', ); - foreach ($props as $prop) { - $conf->setVal($prop, $tmplconf->getVal($prop)); + foreach ($props as $prop => $def) { + $conf->setVal($prop, $tmplconf->getVal($prop, $def)); } } $project->created();