Strings update
[squirrelmail.git] / src / folders_rename_getname.php
index 071c2d046e99bf712bfe0d62746375cce8c07b63..ae2e50bb98593808ee04d39e0f92207036ec7a84 100644 (file)
@@ -1,40 +1,53 @@
 <?php
-   /**
-    **  folders_rename_getname.php
-    **
-    **  Copyright (c) 1999-2000 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **  Gets folder names and enables renaming
-    **  Called from folders.php
-    **
-    **  $Id$
-    **/
 
-   include('../src/validate.php');
-   include("../functions/strings.php");
-   include("../config/config.php");
-   include("../functions/page_header.php");
-   include("../functions/imap.php");
-   include("../src/load_prefs.php");
+/**
+ * folders_rename_getname.php
+ *
+ * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * Gets folder names and enables renaming
+ * Called from folders.php
+ *
+ * $Id$
+ */
+
+/*****************************************************************/
+/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!!           ***/
+/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION.             ***/
+/***    + Base level indent should begin at left margin, as    ***/
+/***      the require_once below looks.                        ***/
+/***    + All identation should consist of four space blocks   ***/
+/***    + Tab characters are evil.                             ***/
+/***    + all comments should use "slash-star ... star-slash"  ***/
+/***      style -- no pound characters, no slash-slash style   ***/
+/***    + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD      ***/
+/***      ALWAYS USE { AND } CHARACTERS!!!                     ***/
+/***    + Please use ' instead of ", when possible. Note "     ***/
+/***      should always be used in _( ) function calls.        ***/
+/*** Thank you for your help making the SM code more readable. ***/
+/*****************************************************************/
+
+require_once('../src/validate.php');
+require_once('../functions/imap.php');
 
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 
-   $dm = sqimap_get_delimiter($imapConnection);
-   if (substr($old, strlen($old) - strlen($dm)) == $dm) {
+   global $delimiter;
+   if (substr($old, strlen($old) - strlen($delimiter)) == $delimiter) {
       $isfolder = true;
       $old = substr($old, 0, strlen($old) - 1);
    }
    
-   if (strpos($old, $dm)) {
-      $old_name = substr($old, strrpos($old, $dm)+1, strlen($old));
-      $old_parent = substr($old, 0, strrpos($old, $dm));
+   if (strpos($old, $delimiter)) {
+      $old_name = substr($old, strrpos($old, $delimiter)+1, strlen($old));
+      $old_parent = substr($old, 0, strrpos($old, $delimiter));
    } else {
       $old_name = $old;
       $old_parent = "";
    }
 
-   displayPageHeader($color, "None");
+   displayPageHeader($color, 'None');
    echo "<br><TABLE align=center border=0 WIDTH=95% COLS=1>";
    echo "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER><B>";
    echo _("Rename a folder");
@@ -54,5 +67,3 @@
    /** Log out this session **/
    sqimap_logout($imapConnection);
 ?>
-
-