From d062dbe18cbb2609cd2cc67ae843cf33bb4971cf Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Fri, 23 Apr 2010 10:25:28 -0400
Subject: [PATCH] Add class docuumentation blocks and make phpdoc work again

---
 program/include/rcube_plugin.php       |    2 
 program/include/rcube_smtp.php         |   14 +++++-
 program/include/rcube_plugin_api.php   |    2 
 program/include/rcube_imap.php         |    3 +
 program/include/rcube_mime_struct.php  |    7 +++
 program/include/rcube_session.php      |    9 ++++
 bin/makedoc.sh                         |   13 +-----
 program/include/rcube_imap_generic.php |   12 ++++++
 8 files changed, 43 insertions(+), 19 deletions(-)

diff --git a/bin/makedoc.sh b/bin/makedoc.sh
index 26757c0..40c75bf 100755
--- a/bin/makedoc.sh
+++ b/bin/makedoc.sh
@@ -1,15 +1,6 @@
-#!/usr/bin/env bash
+#!/bin/sh
 
-if [ -z "$SSH_TTY" ]
-then
-  if [ -z "$DEV_TTY" ]
-  then
-    echo "Not on the shell."
-    exit 1
-  fi
-fi
-
-TITLE="RoundCube Classes"
+TITLE="Roundcube Classes"
 PACKAGES="Core"
 
 INSTALL_PATH="`dirname $0`/.."
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 2a1f428..9facb32 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -26,7 +26,8 @@
  *
  * @package    Mail
  * @author     Thomas Bruederli <roundcube@gmail.com>
- * @version    1.6
+ * @author     Aleksander Machniak <alec@alec.pl> 
+ * @version    2.0
  */
 class rcube_imap
 {
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php
index b128c08..0616b5a 100644
--- a/program/include/rcube_imap_generic.php
+++ b/program/include/rcube_imap_generic.php
@@ -26,6 +26,12 @@
 */
 
 
+/**
+ * Struct representing an e-mail message header
+ *
+ * @package    Mail
+ * @author     Aleksander Machniak <alec@alec.pl> 
+ */
 class rcube_mail_header
 {
 	public $id;
@@ -70,6 +76,12 @@
 {
 }
 
+/**
+ * PHP based wrapper class to connect to an IMAP server
+ *
+ * @package    Mail
+ * @author     Aleksander Machniak <alec@alec.pl> 
+ */
 class rcube_imap_generic
 {
     public $error;
diff --git a/program/include/rcube_mime_struct.php b/program/include/rcube_mime_struct.php
index bc00da5..5115628 100644
--- a/program/include/rcube_mime_struct.php
+++ b/program/include/rcube_mime_struct.php
@@ -23,7 +23,12 @@
 
 */
 
-                    
+/**
+ * Helper class to process IMAP's BODYSTRUCTURE string
+ *
+ * @package    Mail
+ * @author     Aleksander Machniak <alec@alec.pl>
+ */
 class rcube_mime_struct
 {
     private $structure;
diff --git a/program/include/rcube_plugin.php b/program/include/rcube_plugin.php
index 8001c4c..e8fb22b 100644
--- a/program/include/rcube_plugin.php
+++ b/program/include/rcube_plugin.php
@@ -22,7 +22,7 @@
 /**
  * Plugin interface class
  *
- * @package Core
+ * @package PluginAPI
  */
 abstract class rcube_plugin
 {
diff --git a/program/include/rcube_plugin_api.php b/program/include/rcube_plugin_api.php
index 6b6a0a2..c31773c 100644
--- a/program/include/rcube_plugin_api.php
+++ b/program/include/rcube_plugin_api.php
@@ -22,7 +22,7 @@
 /**
  * The plugin loader and global API
  *
- * @package Core
+ * @package PluginAPI
  */
 class rcube_plugin_api
 {
diff --git a/program/include/rcube_session.php b/program/include/rcube_session.php
index da799be..c3332f0 100644
--- a/program/include/rcube_session.php
+++ b/program/include/rcube_session.php
@@ -5,7 +5,7 @@
  | program/include/rcube_session.php                                     |
  |                                                                       |
  | This file is part of the RoundCube Webmail client                     |
- | Copyright (C) 2005-2009, RoundCube Dev. - Switzerland                 |
+ | Copyright (C) 2005-2010, RoundCube Dev. - Switzerland                 |
  | Licensed under the GNU GPL                                            |
  |                                                                       |
  | PURPOSE:                                                              |
@@ -20,6 +20,13 @@
 
 */
 
+/**
+ * Class to provide database supported session storage
+ *
+ * @package    Core
+ * @author     Thomas Bruederli <roundcube@gmail.com>
+ * @author     Aleksander Machniak <alec@alec.pl>
+ */
 class rcube_session
 {
   private $db;
diff --git a/program/include/rcube_smtp.php b/program/include/rcube_smtp.php
index 1dfe222..bdb87df 100644
--- a/program/include/rcube_smtp.php
+++ b/program/include/rcube_smtp.php
@@ -5,7 +5,7 @@
  | program/include/rcube_smtp.php                                        |
  |                                                                       |
  | This file is part of the RoundCube Webmail client                     |
- | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland                 |
+ | Copyright (C) 2005-2010, RoundCube Dev. - Switzerland                 |
  | Licensed under the GNU GPL                                            |
  |                                                                       |
  | PURPOSE:                                                              |
@@ -22,7 +22,15 @@
 // define headers delimiter
 define('SMTP_MIME_CRLF', "\r\n");
 
-class rcube_smtp {
+/**
+ * Class to provide SMTP functionality using PEAR Net_SMTP
+ *
+ * @package    Mail
+ * @author     Thomas Bruederli <roundcube@gmail.com>
+ * @author     Aleksander Machniak <alec@alec.pl>
+ */
+class rcube_smtp
+{
 
   private $conn = null;
   private $response;
@@ -124,7 +132,7 @@
         $this->error = array('label' => 'smtpautherror', 'vars' => array('code' => $this->conn->_code));
         $this->response[] .= 'Authentication failure: ' . $result->getMessage() . ' (Code: ' . $result->getCode() . ')';
         $this->reset();
-	$this->disconnect();
+        $this->disconnect();
         return false;
       }
     }

--
Gitblit v1.9.1