-<?
- if (!isset($config_php))
- include("../config/config.php");
- if (!isset($strings_php))
- include("../functions/strings.php");
- if (!isset($page_header_php))
- include("../functions/page_header.php");
- if (!isset($imap_php))
- include("../functions/imap.php");
-
- include("../src/load_prefs.php");
-
- $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0);
+<?php
+ /**
+ ** folders_rename_do.php
+ **
+ ** Copyright (c) 1999-2000 The SquirrelMail development team
+ ** Licensed under the GNU GPL. For full terms see the file COPYING.
+ **
+ ** Does the actual renaming of files on the IMAP server.
+ ** Called from the folders.php
+ **
+ ** $Id$
+ **/
+
+ require_once('../src/validate.php');
+ require_once('../functions/imap.php');
+
+ if($old_name == $new_name) {
+ $location = get_location();
+ header ("Location: $location/folders.php");
+ exit;
+ }
+
+ $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);