~ubuntu-branches/ubuntu/quantal/squirrelmail/quantal

« back to all changes in this revision

Viewing changes to src/folders_rename_getname.php

  • Committer: Bazaar Package Importer
  • Author(s): Thijs Kinkhorst
  • Date: 2008-09-28 16:33:48 UTC
  • mfrom: (11.1.7 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080928163348-hgxf8au2d4zspabg
Tags: 2:1.4.15-3
Cookies sent over HTTPS will now be confined to HTTPS only
(cookie secure flag) and more support for the HTTPOnly cookie
attribute. Patch taken from upstream release.
(CVE-2008-3663, closes: #499942)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
/**
4
4
 * folders_rename_getname.php
5
5
 *
6
 
 * Copyright (c) 1999-2006 The SquirrelMail Project Team
7
 
 * Licensed under the GNU GPL. For full terms see the file COPYING.
8
 
 *
9
6
 * Gets folder names and enables renaming
10
7
 * Called from folders.php
11
8
 *
12
 
 * @version $Id: folders_rename_getname.php,v 1.47.2.5 2006/02/03 22:27:55 jervfors Exp $
 
9
 * @copyright © 1999-2007 The SquirrelMail Project Team
 
10
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 
11
 * @version $Id: folders_rename_getname.php 12551 2007-07-17 22:46:01Z pdontthink $
13
12
 * @package squirrelmail
14
13
 */
15
14
 
 
15
/** This is the folders_rename_getname page */
 
16
define('PAGE_NAME', 'folders_rename_getname');
 
17
 
16
18
/**
17
19
 * Path for SquirrelMail required files.
18
20
 * @ignore
52
54
 
53
55
$old = imap_utf7_decode_local($old);
54
56
 
55
 
if (strpos($old, $delimiter)) {
56
 
    $old_name = substr($old, strrpos($old, $delimiter)+1, strlen($old));
57
 
    $old_parent = substr($old, 0, strrpos($old, $delimiter));
58
 
} else {
59
 
    $old_name = $old;
60
 
    $old_parent = '';
 
57
// displayable mailbox format is without folder prefix on front
 
58
global $folder_prefix;
 
59
if (substr($old, 0, strlen($folder_prefix)) == $folder_prefix) {
 
60
    $displayable_old = substr($old, strlen($folder_prefix));
 
61
} else {
 
62
    $displayable_old = $old;
 
63
}
 
64
 
 
65
if (strpos($displayable_old, $delimiter)) {
 
66
    $old_name = substr($displayable_old, strrpos($displayable_old, $delimiter)+1);
 
67
    $parent = htmlspecialchars(substr($displayable_old, 
 
68
                                      0, 
 
69
                                      strrpos($displayable_old, $delimiter))
 
70
            . ' ' . $delimiter);
 
71
} else {
 
72
    $old_name = $displayable_old;
 
73
    $parent = '';
61
74
}
62
75
 
63
76
 
71
84
            html_tag( 'td', '', 'center', $color[4] ) .
72
85
            addForm('folders_rename_do.php').
73
86
     _("New name:").
74
 
     '<br /><b>' . htmlspecialchars($old_parent) . ' ' . htmlspecialchars($delimiter) . '</b>' .
 
87
     '<br /><b>'. $parent . '</b>'.
75
88
     addInput('new_name', $old_name, 25) . '<br />' . "\n";
76
89
if ( $isfolder ) {
77
90
    echo addHidden('isfolder', 'true');
81
94
     '<input type="submit" value="'._("Submit")."\" />\n".
82
95
     '</form><br /></td></tr></table>';
83
96
 
84
 
?>
 
 
b'\\ No newline at end of file'