]> git.pld-linux.org Git - packages/eventum.git/commitdiff
- implementing per project "mail aliases" by Alessandro Ogier <alessandro.ogier/...
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 12 Mar 2007 19:18:02 +0000 (19:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    eventum-mail-aliases.patch -> 1.1

eventum-mail-aliases.patch [new file with mode: 0644]

diff --git a/eventum-mail-aliases.patch b/eventum-mail-aliases.patch
new file mode 100644 (file)
index 0000000..3e7d54f
--- /dev/null
@@ -0,0 +1,126 @@
+Index: setup/schema.sql
+===================================================================
+--- setup/schema.sql   (revisione 3273)
++++ setup/schema.sql   (copia locale)
+@@ -320,6 +320,7 @@
+   prj_anonymous_post_options text,
+   prj_outgoing_sender_name varchar(255) NOT NULL,
+   prj_outgoing_sender_email varchar(255) NOT NULL,
++  prj_mail_aliases varchar(255) NULL,
+   prj_customer_backend varchar(64) NULL,
+   prj_workflow_backend varchar(64) NULL,
+   prj_segregate_reporter tinyint(1) DEFAULT 0,
+Index: templates/manage/projects.tpl.html
+===================================================================
+--- templates/manage/projects.tpl.html (revisione 3273)
++++ templates/manage/projects.tpl.html (copia locale)
+@@ -43,6 +43,14 @@
+                       alert('{/literal}{t escape=js}Please enter a valid outgoing sender address for this project.{/t}{literal}');
+                       return false;
+                   }
++                  aliases = f.mail_aliases.value.split(',');
++                  for (idx in aliases) {
++                        if (!isEmail(aliases[idx])) {
++                            selectField(f, 'mail_aliases');
++                            alert('{/literal}{t escape=js}Please enter a comma separated list of valid mail address aliases for this project{/t}{literal}');
++                            return false;
++                        }
++                  }
+                   return true;
+               }
+               function checkLeadSelection(f)
+@@ -191,6 +199,15 @@
+                 </td>
+               </tr>
+               <tr>
++                <td width="120" bgcolor="{$cell_color}" class="default_white">
++                  <b>{t}Project mail aliases{/t}:</b>
++                </td>
++                <td bgcolor="{$light_color}" width="80%">
++                  <input type="text" name="mail_aliases" size="40" class="default" value="{$info.prj_mail_aliases|escape:"html"}">
++                  {include file="error_icon.tpl.html" field="mail_aliases"}
++                </td>
++              </tr>
++              <tr>
+                 <td width="120" nowrap bgcolor="{$cell_color}" class="default_white">
+                   <b>{t}Remote Invocation{/t}:</b>
+                 </td>
+Index: include/class.project.php
+===================================================================
+--- include/class.project.php  (revisione 3273)
++++ include/class.project.php  (copia locale)
+@@ -434,6 +434,7 @@
+                     prj_initial_sta_id=" . Misc::escapeInteger($_POST["initial_status"]) . ",
+                     prj_outgoing_sender_name='" . Misc::escapeString($_POST["outgoing_sender_name"]) . "',
+                     prj_outgoing_sender_email='" . Misc::escapeString($_POST["outgoing_sender_email"]) . "',
++                    prj_mail_aliases='" . Misc::escapeString($_POST["mail_aliases"]) . "',
+                     prj_remote_invocation='" . Misc::escapeString($_POST["remote_invocation"]) . "',
+                     prj_segregate_reporter='" . Misc::escapeString($_POST["segregate_reporter"]) . "',
+                     prj_customer_backend='" . Misc::escapeString($_POST["customer_backend"]) . "',
+@@ -539,6 +540,7 @@
+                     prj_initial_sta_id,
+                     prj_outgoing_sender_name,
+                     prj_outgoing_sender_email,
++                    prj_mail_aliases,
+                     prj_remote_invocation,
+                     prj_customer_backend,
+                     prj_workflow_backend
+@@ -550,6 +552,7 @@
+                     " . Misc::escapeInteger($_POST["initial_status"]) . ",
+                     '" . Misc::escapeString($_POST["outgoing_sender_name"]) . "',
+                     '" . Misc::escapeString($_POST["outgoing_sender_email"]) . "',
++                    '" . Misc::escapeString($_POST["mail_aliases"]) . "',
+                     '" . Misc::escapeString($_POST["remote_invocation"]) . "',
+                     '" . Misc::escapeString($_POST["customer_backend"]) . "',
+                     '" . Misc::escapeString($_POST["workflow_backend"]) . "'
+Index: include/class.support.php
+===================================================================
+--- include/class.support.php  (revisione 3273)
++++ include/class.support.php  (copia locale)
+@@ -831,7 +831,8 @@
+             // add to and cc addresses to notification list
+             $prj_id = Auth::getCurrentProject();
+             $project_details = Project::getDetails($prj_id);
+-            $addresses_not_too_add = array($project_details['prj_outgoing_sender_email']);
++            $addresses_not_too_add = explode(',', $project_details['prj_mail_aliases']);
++            array_push($addresses_not_too_add, $project_details['prj_outgoing_sender_email']);
+             if (!empty($to)) {
+                 $to_addresses = Mail_API::getAddressInfo($to, true);
+--- /dev/null  2006-03-28 14:00:37.387408000 +0300
++++ misc/upgrade/v2.0_to_2.0.1/index.html      2007-03-12 21:05:51.003840510 +0200
+@@ -0,0 +1,13 @@
++<html>
++<head>
++<title>Eventum - Upgrade to 2.0.1 from 2.0</title>
++</head>
++<body>
++Please take the following steps to upgrade to Eventum 2.0.1 from 2.0.<br />
++
++<a href="database_changes.php">Perform database changes</a>.<br />
++
++<a href="../flush_compiled_templates.php">Flush compiled templates</a>.<br />
++
++</body>
++</html>
+--- /dev/null  2006-03-28 14:00:37.387408000 +0300
++++ misc/upgrade/v2.0_to_2.0.1/database_changes.php    2007-03-12 21:06:40.874963549 +0200
+@@ -0,0 +1,18 @@
++<?php
++require_once(dirname(__FILE__) . '/../../../init.php');
++require_once(APP_INC_PATH . 'db_access.php');
++
++$stmts = array();
++
++$stmts[] = "ALTER TABLE eventum_project ADD COLUMN prj_mail_aliases varchar(255);";
++
++foreach ($stmts as $stmt) {
++    $stmt = str_replace('eventum_', APP_TABLE_PREFIX, $stmt);
++    $res = $GLOBALS["db_api"]->dbh->query($stmt);
++    if (PEAR::isError($res)) {
++        echo "<pre>";var_dump($res);echo "</pre>";
++        exit(1);
++    }
++}
++?>
++done
This page took 0.115237 seconds and 4 git commands to generate.