- $dm = findMailboxDelimeter($imapConnection);
- if (strpos($old, $dm)) {
- $old_name = substr($old, strrpos($old, $dm)+1, strlen($old));
- $old_parent = substr($old, 0, strrpos($old, $dm));
+/*****************************************************************/
+/*** 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);
+
+ global $delimiter;
+ if (substr($old, strlen($old) - strlen($delimiter)) == $delimiter) {
+ $isfolder = true;
+ $old = substr($old, 0, strlen($old) - 1);
+ }
+
+ if (strpos($old, $delimiter)) {
+ $old_name = substr($old, strrpos($old, $delimiter)+1, strlen($old));
+ $old_parent = substr($old, 0, strrpos($old, $delimiter));