summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar mszulecki2009-12-22 17:51:47 +0000
committerGravatar mszulecki2009-12-22 17:51:47 +0000
commitf614fbf46129fffc5e66e954114ddc3ea6e7119a (patch)
treeb9d65407b69fa27e7f7c4d70f1583eac5125deda
parenta9e431e79b4197ea663777d46a5e08521fee14d1 (diff)
downloadmailadmin-f614fbf46129fffc5e66e954114ddc3ea6e7119a.tar.gz
mailadmin-f614fbf46129fffc5e66e954114ddc3ea6e7119a.tar.bz2
Make sure creator_id is correctly set when adding domains
git-svn-id: http://svn.sukimashita.com/repos/mailadmin/trunk@6 4281df72-ff29-0410-8fee-2d9ac0c5f5a7
-rw-r--r--apps/admin/modules/domain/actions/actions.class.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/admin/modules/domain/actions/actions.class.php b/apps/admin/modules/domain/actions/actions.class.php
index badbf03..bd1dba3 100644
--- a/apps/admin/modules/domain/actions/actions.class.php
+++ b/apps/admin/modules/domain/actions/actions.class.php
@@ -21,9 +21,6 @@ class domainActions extends autodomainActions
public function executeCreate()
{
- // populate preset values
- $this->getRequest()->setParameter('domain[creator_id]', $this->getUser()->getId());
-
$this->setTemplate("edit");
return $this->executeEdit();
}
@@ -44,4 +41,14 @@ class domainActions extends autodomainActions
{
$this->redirect("mailbox/list?filter=filter&filters[domain_id]=".$this->getRequestParameter('id'));
}
+
+ protected function updateDomainFromRequest()
+ {
+ parent::updateDomainFromRequest();
+
+ if ($this->domain->getCreatorId() == NULL)
+ {
+ $this->domain->setCreatorId($this->getUser()->getId());
+ }
+ }
}