i18n support: Sergiusz Pawlowicz
SquirrelMail logo: Libor Kopecky <libor@globe.cz>
Web Site Admin/PR: Rick Castello <rick@squirrelmail.org>
+ Multisig support: Stefan Meier <Stefan.Meier@cimsource.com>
Paginator Help: Charles Scheidecker
Other Code contributions:
Version 1.2.5 -- CVS
--------------------
- - Added the possibility to add special folders through plugins.
+ - Added the ability to add special folders through plugins.
- Made searching on multiple criteria possible, with thanks to Jason Munro
- Fixed 'list all' in addressbook (#506624, thanks to Kurt Yoder)
- Fixed small bugs in db_prefs
- conf.pl can now configure database backed address books and
preferences.
- Version 0.3.7 of SquirrelSpell. Fixes a potential privacy
- vulnerability (symlink attack), plus introduces formatting fixes
+ vulnerability (symlink attack), plus introduces formatting fixes
and javadoc-style comments.
- Bugfix in mailfetch reported by Mateusz Mazur
- Administrator plugin. A web based conf.pl replacement.
- Removed GLOBALS from conf.pl
- HTML messages optimization.
- - Added support for requesting read receipts (MDN) and delivery receipts.
+ - Added support for requesting read receipts (MDN) and delivery receipts.
- Added the ability to stop users changing their names and email addresses.
-
+ - Added signature into multiple identities (Stefan Meier <Stefan.Meier@cimsource.com>)
+
Version 1.2.4 -- 25 January 2002
--------------------------------
- Fixes a nasty remote arbitrary command execution vulnerability
/* Overwrite the file with data from $rows
* NOTE! Previous locks are broken by this function */
function overwrite(&$rows) {
+ $this->unlock();
$newfh = @fopen($this->filename, 'w');
if(!$newfh) {
return $this->set_error("$file: " . _("Open failed"));
/**
* Write the User Signature.
*/
-function setSig($data_dir, $username, $value) {
- $filename = getHashedFile($username, $data_dir, "$username.sig");
+function setSig($data_dir, $username, $number, $value) {
+ $filename = getHashedFile($username, $data_dir, "$username.si$number");
$file = fopen($filename, 'w');
fwrite($file, $value);
fclose($file);
/**
* Get the signature.
*/
-function getSig($data_dir, $username) {
- #$filename = $data_dir . $username . '.sig';
- $filename = getHashedFile($username, $data_dir, "$username.sig");
+function getSig($data_dir, $username, $number) {
+ #$filename = $data_dir . $username . '.si$number';
+ $filename = getHashedFile($username, $data_dir, "$username.si$number");
$sig = '';
if (file_exists($filename)) {
$file = fopen($filename, 'r');
displayPageHeader($color, $mailbox);
}
showInputForm();
+}
+elseif (isset($sigappend)) {
+ $idents = getPref($data_dir, $username, 'identities', 0);
+ if ($idents > 1) {
+ if ($identity == 'default') {
+ $no = 'g';
+ } else {
+ $no = $identity;
+ }
+ $signature = getSig($data_dir, $username, $no);
+ }
+ $body .= "\n\n".($prefix_sig==true? "-- \n":'').$signature;
+ if ($compose_new_win == '1') {
+ compose_Header($color, $mailbox);
+ } else {
+ displayPageHeader($color, $mailbox);
+ }
+ showInputForm();
} elseif (isset($do_delete)) {
if ($compose_new_win == '1') {
compose_Header($color, $mailbox);
}
echo " <TR><td>\n </td><td>\n";
+ echo "\n <INPUT TYPE=SUBMIT NAME=\"sigappend\" VALUE=\"". _("Signature") . "\">\n";
if ($use_javascript_addr_book) {
echo " <SCRIPT LANGUAGE=JavaScript><!--\n document.write(\"".
" <input type=button value=\\\""._("Addresses").
$sort = getPref($data_dir, $username, 'sort', 6 );
/** Load up the Signature file **/
-if ($use_signature) {
- $signature_abs = $signature = getSig($data_dir, $username);
-} else {
- $signature_abs = getSig($data_dir, $username);
-}
+$signature_abs = $signature = getSig($data_dir, $username, "g");
/* Highlight comes in with the form: name, color, header, value. */
for ($i = 0; $hlt = getPref($data_dir, $username, "highlight$i"); ++$i) {
SaveUpdateFunction();
}
- LoadInfo($full_name, $email_address, $reply_to, '');
+ LoadInfo($full_name, $email_address, $reply_to, $signature, '');
?>
<br>
</tr>
<?PHP
- ShowTableInfo($full_name, $email_address, $reply_to, '');
+ ShowTableInfo($full_name, $email_address, $reply_to, $signature, '');
$num = 1;
- while (LoadInfo($full_name, $email_address, $reply_to, $num))
+ while (LoadInfo($full_name, $email_address, $reply_to, $signature, $num))
{
?>
<tr bgcolor="<?PHP echo $color[9] ?>">
$num) ?></th>
</tr>
<?PHP
- ShowTableInfo($full_name, $email_address, $reply_to, $num);
+ ShowTableInfo($full_name, $email_address, $reply_to, $signature, $num);
$num ++;
}
<th colspan=2 align=center><?PHP echo _("Add a New Identity") ?></th>
</tr>
<?php
- ShowTableInfo('', '', '', $num);
+ ShowTableInfo('', '', '', '', $num);
?>
</table>
</form>
<?PHP
function SaveUpdateFunction() {
- global $username, $data_dir, $full_name, $email_address, $reply_to;
+ global $username, $data_dir, $full_name, $email_address, $reply_to, $signature;
$i = 1;
$fakeI = 1;
$filled ++;
setPref($data_dir, $username, 'reply_to' . $fakeI, $$name);
+ $name = 'signature' . $i;
+ global $$name;
+ if ($$name != '')
+ $filled ++;
+ setSig($data_dir, $username, $fakeI, $$name);
+
if ($filled == 0)
$fakeI --;
}
removePref($data_dir, $username, 'full_name' . $fakeI);
removePref($data_dir, $username, 'email_address' . $fakeI);
removePref($data_dir, $username, 'reply_to' . $fakeI);
+ setSig($data_dir, $username, $fakeI, "");
$fakeI ++;
}
setPref($data_dir, $username, 'full_name', $full_name);
setPref($data_dir, $username, 'email_address', $email_address);
setPref($data_dir, $username, 'reply_to', $reply_to);
+ setSig($data_dir, $username, "g", $signature);
+
}
function CheckAndDoDefault() {
- global $username, $data_dir, $full_name, $email_address, $reply_to;
+ global $username, $data_dir, $full_name, $email_address, $reply_to, $signature;
$i = 1;
$name = 'form_for_' . $i;
global $$name;
if (isset($$name)) {
do_hook('options_identities_renumber', $i, 'default');
- global $full_name, $email_address, $reply_to;
+ global $full_name, $email_address, $reply_to, $signature;
$name = 'full_name' . $i;
global $$name;
$reply_to = $$name;
$$name = $temp;
+ $name = 'signature' . $i;
+ global $$name;
+ $temp = $signature;
+ $signature = $$name;
+ $$name = $temp;
+
+
return true;
}
}
function CheckForDelete() {
- global $username, $data_dir, $full_name, $email_address, $reply_to;
+ global $username, $data_dir, $full_name, $email_address, $reply_to, $signature;
$i = 1;
$name = 'form_for_' . $i;
$$nameA = $$nameB;
$$nameB = $temp;
+ $nameA = 'signature' . $i;
+ $nameB = 'signature' . ($i - 1);
+ global $$nameA, $$nameB;
+ $temp = $$nameA;
+ $$nameA = $$nameB;
+ $$nameB = $temp;
+
return true;
}
return false;
}
- function LoadInfo(&$n, &$e, &$r, $post) {
+ function LoadInfo(&$n, &$e, &$r, &$s, $post) {
global $username, $data_dir;
$n = getPref($data_dir, $username, 'full_name' . $post);
$e = getPref($data_dir, $username, 'email_address' . $post);
$r = getPref($data_dir, $username, 'reply_to' . $post);
+ if ($post == '')
+ $post = 'g';
+ $s = getSig($data_dir,$username,$post);
- if ($n != '' || $e != '' || $r != '')
+ if ($n != '' || $e != '' || $r != '' || $s != '')
return true;
}
}
-function ShowTableInfo($full_name, $email_address, $reply_to, $post) {
+function sti_textarea( $title, $hd, $data, $post, $bg ) {
+
+ echo "<tr$bg><td align=right nowrap>$title:".
+ '</td><td>'.
+ "<textarea cols=50 rows=5 name=\"$hd$post\">" . htmlspecialchars($data) .
+ "</textarea></td></tr>";
+
+}
+
+function ShowTableInfo($full_name, $email_address, $reply_to, $signature, $post) {
global $color;
$OtherBG = ' bgcolor="' . $color[0] . '"';
- if ($full_name == '' && $email_address == '' && $reply_to == '')
+ if ($full_name == '' && $email_address == '' && $reply_to == '' && $signature == '')
$OtherBG = '';
- if ($full_name == '' && $email_address == '' && $reply_to == '')
+ if ($full_name == '' && $email_address == '' && $reply_to == '' && $signature == '')
$isEmptySection = true;
else
$isEmptySection = false;
sti_input( _("Full Name"), 'full_name', $full_name, $post, $OtherBG );
sti_input( _("E-Mail Address"), 'email_address', $email_address, $post, $OtherBG );
sti_input( _("Reply To"), 'reply_to', $reply_to, $post, $OtherBG );
+ sti_textarea( _("Signature"), 'signature', $signature, $post, $OtherBG );
do_hook('options_identities_table', $OtherBG, $isEmptySection, $post);
echo "<tr$OtherBG>".
require_once('../functions/imap.php');
require_once('../functions/array.php');
-
+
/* Define the group constants for the personal options page. */
define('SMOPT_GRP_CONTACT', 0);
define('SMOPT_GRP_REPLY', 1);
/* Define the optpage load function for the personal options page. */
function load_optpage_data_personal() {
- global $data_dir, $username, $edit_identity, $edit_name;
- global $full_name, $reply_to, $email_address;
+ global $data_dir, $username, $edit_identity, $edit_name,
+ $full_name, $reply_to, $email_address, $signature;
/* Set the values of some global variables. */
$full_name = getPref($data_dir, $username, 'full_name');
$reply_to = getPref($data_dir, $username, 'reply_to');
- $email_address = getPref($data_dir, $username, 'email_address');
+ $email_address = getPref($data_dir, $username, 'email_address');
+ $signature = getSig($data_dir, $username, 'g');
/* Build a simple array into which we will build options. */
$optgrps = array();
'size' => SMOPT_SIZE_HUGE
);
+ $optvals[SMOPT_GRP_CONTACT][] = array(
+ 'name' => 'signature',
+ 'caption' => _("Signature"),
+ 'type' => SMOPT_TYPE_TEXTAREA,
+ 'refresh' => SMOPT_REFRESH_NONE,
+ 'size' => SMOPT_SIZE_MEDIUM,
+ 'save' => 'save_option_signature'
+ );
+
if ($edit_identity) {
$identities_link_value = '<A HREF="options_identities.php">'
. _("Edit Advanced Identities")
'refresh' => SMOPT_REFRESH_NONE
);
- $optvals[SMOPT_GRP_SIG][] = array(
- 'name' => 'signature_abs',
- 'caption' => _("Signature"),
- 'type' => SMOPT_TYPE_TEXTAREA,
- 'refresh' => SMOPT_REFRESH_NONE,
- 'size' => SMOPT_SIZE_MEDIUM,
- 'save' => 'save_option_signature'
- );
-
/* Assemble all this together and return it as our result. */
$result = array(
'grps' => $optgrps,
function save_option_signature($option) {
global $data_dir, $username;
- setSig($data_dir, $username, $option->new_value);
+ setSig($data_dir, $username, 'g', $option->new_value);
}
?>