1. Dennis T Kaplan
  2. CitadelPHP

Commits

Dennis T Kaplan  committed e3fb9e6

Some cleanup and README

  • Participants
  • Parent commits 85b042b
  • Branches master

Comments (0)

Files changed (2)

File Citadel.php

View file
  • Ignore whitespace
 
 	const EOL = "\n";
 
-	public static $status_code = array(
-			501 => 'COMMAND_NOT_FOUND', 
-			502 => 'COMMAND_NOT_SET', 
-			511 => 'RESOURCE_TIMEOUT', 
-			512 => 'RESOURCE_BAD_DATA',
-			553 => 'RESOURCE_NOT_OPEN',
-			561 => 'LABEL_KEY_MATCH', 
-		);
-
 	private $messanger = array();
 
 	private $socket_path = NULL;
 		return $this->messanger;
 	}
 
+	# Returns the first error
 	public function Status(){
 		$m = $this->Messanger();
-		$r = $m[0]['Cmd'] . ' ';
-		$r .= $m[0]['Code'] . ' ';
-		$r .= $m[0]['Text'];
-		return $r;
+		return $m[0]['Cmd'] . ' ' . $m[0]['Code'] . ' ' . $m[0]['Text'];
 	}
 
 	public function cit_status_code() {
 
 	public function __destruct() {
 		if($this->stream !== FALSE) {
-			if($this->conn_status['auth']) $this->Logout();
+			if($this->conn_status['auth']) 
+				$this->Logout();
 			$this->Close();
 		}	
 	}
 
+    /**
+     * Citadel PHP Messages
+     * @var array $status_code
+     * @access public
+     **/
+	public static $status_code = array(
+			501 => 'COMMAND_NOT_FOUND', 
+			502 => 'COMMAND_NOT_SET', 
+			511 => 'RESOURCE_TIMEOUT', 
+			512 => 'RESOURCE_BAD_DATA',
+			553 => 'RESOURCE_NOT_OPEN',
+			561 => 'LABEL_KEY_MATCH', 
+		);
 
     /**
+     * Citadel Messages
      * @var array $status_code_prefix
      * @access public
      * @link http://www.citadel.org/doku.php/documentation:appproto:statuscodes
         '9' => 'ASYNC_MSG');        # There is a page waiting for you, please fetch it.
 
     /**
-     * Extended description of status code
+     * Citadel Messages Extended
      * @var array $status_code_suffix
      * @access public
      * @link http://www.citadel.org/doku.php/documentation:appproto:statuscodes

File README.md

View file
  • Ignore whitespace
 Citadel PHP
 ===========
 
-Running on production website at <https://portal.riky.net> 
+[Citadel] is a email and collaboration server.
 
+There is also a web server for [Citadel] called Webcit.
+However, I use Webcit almost exclusively for Admin/Aida purposes.
+
+My users use either a desktop client or Roundcube, which is a PHP driven web mail client.
 ________________________________________________________
 
-### INCLUDES  
+### PURPOSE
 
- - A library to access [Citadel] email and collaboration servers from php, using the [Citadel] Protocol.
- - A simple website on which users can change their password
+The purpose of Citadel PHP is to give users a means to change their passwords. 
+The server side protocols IMAP, SMTP etc. don't provide any means to change passwords.
+________________________________________________________
 
+### INCLUDES
+
+ - A library to access [Citadel] email and collaboration servers from php, using the [Citadel] Protocol.
+ - A simple ajax driven website on which users can:
+   - Login 
+   - Change Password 
 ________________________________________________________
 
 ### INSTALL  
  1. Clone or download the code to your web root
  2. Modify config.php
  3. View on https://www.example.com/citadelphp
+________________________________________________________
+
+### CONFIG  
+
+#### CITADEL_SOCKET
 
+Find the citadel.socket on your server. Possible values are:
 
+ - `'/var/run/citadel/citadel.socket'`
+ - `'/usr/local/citadel/citadel.socket'`
 ________________________________________________________
 
-### NOTES  
+### CREDITS  
 
-##### Baby Citadel  
+##### Baby Citadel @author Warren Stevens
 
 There is another php library for Citadel called Baby Citadel.
-I first tried impleamenting this with that library, 
-but after having to make too many changes to the origianl code 
-I decided to write a new library from scratch. 
-However, credit where credit is due; some of the implementation ideas 
-for **Citadel PHP** come from **Baby Citadel**.
-
+I first tried impleamenting this with that library, but after 
+having to make too many changes to the origianl code I decided 
+to write a new library from scratch. Some of the implementation 
+ideas for **Citadel PHP** come from **Baby Citadel**.
 ________________________________________________________
 
+### LICENSE
+
 #### The MIT License (MIT)
 
 Copyright © 2014 Dennis T Kaplan <http://www.robotamer.com>