phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] bookmarks/inc hook_admin.inc.php, 1.10 class.ui.inc.p


From: powerstat
Subject: [Phpgroupware-cvs] bookmarks/inc hook_admin.inc.php, 1.10 class.ui.inc.php, 1.10 hook_bookmarks_about.inc.php, 1.5 class.bo.inc.php, 1.7 class.sqlquery.inc.php, 1.6 hook_preferences.inc.php, 1.20 class.so.inc.php, 1.5
Date: Thu, 28 Apr 2005 20:59:00 +0200

Update of bookmarks/inc

Modified Files:
     Branch: MAIN
            hook_admin.inc.php lines: +8 -12
            class.ui.inc.php lines: +33 -16
            hook_bookmarks_about.inc.php lines: +16 -5
            class.bo.inc.php lines: +18 -16
            class.sqlquery.inc.php lines: +77 -69
            hook_preferences.inc.php lines: +8 -10
            class.so.inc.php lines: +19 -16

Log Message:
Added phpdocs

====================================================
Index: bookmarks/inc/hook_admin.inc.php
diff -u bookmarks/inc/hook_admin.inc.php:1.9 
bookmarks/inc/hook_admin.inc.php:1.10
--- bookmarks/inc/hook_admin.inc.php:1.9        Wed Apr 23 01:37:26 2003
+++ bookmarks/inc/hook_admin.inc.php    Thu Apr 28 18:59:46 2005
@@ -1,15 +1,12 @@
 <?php
-       
/**************************************************************************\
-       * phpGroupWare                                                          
   *
-       * http://www.phpgroupware.org                                           
   *
-       * Written by Joseph Engo <address@hidden>                          *
-       * --------------------------------------------                          
   *
-       *  This program is free software; you can redistribute it and/or modify 
it *
-       *  under the terms of the GNU General Public License as published by 
the   *
-       *  Free Software Foundation; either version 2 of the License, or (at 
your  *
-       *  option) any later version.                                           
   *
-       
\**************************************************************************/
-       /* $Id$ */
+       /**
+       * Bookmarks admin hook
+       * @author Joseph Engo <address@hidden>
+       * @copyright Copyright (C) 2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @package bookmarks
+       * @version $Id$
+       */

        $file = Array
        (
@@ -17,5 +14,4 @@
                'Global Categories' => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname='
 . $appname)
        );
        $GLOBALS['phpgw']->common->display_mainscreen($appname,$file);
-
 ?>

====================================================
Index: bookmarks/inc/class.ui.inc.php
diff -u bookmarks/inc/class.ui.inc.php:1.9 bookmarks/inc/class.ui.inc.php:1.10
--- bookmarks/inc/class.ui.inc.php:1.9  Mon Jun  9 20:27:22 2003
+++ bookmarks/inc/class.ui.inc.php      Thu Apr 28 18:59:46 2005
@@ -1,25 +1,42 @@
 <?php
-       
/**************************************************************************\
-       * phpGroupWare - Bookmarks                                              
   *
-       * http://www.phpgroupware.org                                           
   *
-       * Based on Bookmarker Copyright (C) 1998  Padraic Renaghan              
   *
-       *                     http://www.renaghan.com/bookmarker                
   *
-       * Ported to phpgroupware by Joseph Engo                                 
   *
-       * Ported to three-layered design by Michael Totschnig                   
   *
-       * --------------------------------------------                          
   *
-       *  This program is free software; you can redistribute it and/or modify 
it *
-       *  under the terms of the GNU General Public License as published by 
the   *
-       *  Free Software Foundation; either version 2 of the License, or (at 
your  *
-       *  option) any later version.                                           
   *
-       
\**************************************************************************/
-
-       /* $Id$ */
-
+       /**
+       * Bookmarks
+       * @author Joseph Engo
+       * @author Michael Totschnig
+       * @copyright Copyright (C) 1998 Padraic Renaghan
+       * @copyright Copyright (C) 2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @package bookmarks
+       * @version $Id$
+       * @internal http://www.renaghan.com/bookmarker
+       * @todo Class must be renamed to avoid conflicts
+       */
+
+/**
+ * Define TREE
+ */
 define('TREE',1);
+
+/**
+ * Define _LIST
+ */
 define('_LIST',2);
+
+/**
+ * Define CREATE
+ */
 define('CREATE',3);
+
+/**
+ * Define SEARCH
+ */
 define('SEARCH',4);

+       /**
+        * Bookmarks GUI class
+        *
+        * @package bookmarks
+        */
        class ui
        {
                var $t;

====================================================
Index: bookmarks/inc/hook_bookmarks_about.inc.php
diff -u bookmarks/inc/hook_bookmarks_about.inc.php:1.4 
bookmarks/inc/hook_bookmarks_about.inc.php:1.5
--- bookmarks/inc/hook_bookmarks_about.inc.php:1.4      Sat Nov 17 01:42:47 2001
+++ bookmarks/inc/hook_bookmarks_about.inc.php  Thu Apr 28 18:59:46 2005
@@ -1,9 +1,20 @@
 <?php
-  // NOTE: I would like to get the E-Mail address's to be a link to compose 
with a subject of the
-  //       current app.
-
-  // I will make this look better when I have more time to create a better 
layout.
-
+       /**
+       * Bookmarks about hook
+       * @author Joseph Engo <address@hidden>
+       * @copyright Copyright (C) 2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @package bookmarks
+       * @version $Id$
+       * @todo I would like to get the E-Mail address's to be a link to 
compose with a subject of the current app.
+       * @todo I will make this look better when I have more time to create a 
better layout.
+       */
+
+       /**
+        * About application
+        *
+        * @return string About HTML dialog
+        */
        function about_app()
        {
                global $HTTP_USER_AGENT;

====================================================
Index: bookmarks/inc/class.bo.inc.php
diff -u bookmarks/inc/class.bo.inc.php:1.6 bookmarks/inc/class.bo.inc.php:1.7
--- bookmarks/inc/class.bo.inc.php:1.6  Mon Jun  9 20:27:22 2003
+++ bookmarks/inc/class.bo.inc.php      Thu Apr 28 18:59:46 2005
@@ -1,20 +1,22 @@
 <?php
-       
/**************************************************************************\
-       * phpGroupWare - Bookmarks                                              
   *
-       * http://www.phpgroupware.org                                           
   *
-       * Based on Bookmarker Copyright (C) 1998  Padraic Renaghan              
   *
-       *                     http://www.renaghan.com/bookmarker                
   *
-       * Ported to phpgroupware by Joseph Engo                                 
   *
-       * Ported to three-layered design by Michael Totschnig                   
   *
-       * --------------------------------------------                          
   *
-       *  This program is free software; you can redistribute it and/or modify 
it *
-       *  under the terms of the GNU General Public License as published by 
the   *
-       *  Free Software Foundation; either version 2 of the License, or (at 
your  *
-       *  option) any later version.                                           
   *
-       
\**************************************************************************/
-
-       /* $Id$ */
-
+       /**
+       * Bookmarks
+       * @author Joseph Engo
+       * @author Michael Totschnig
+       * @copyright Copyright (C) 1998 Padraic Renaghan
+       * @copyright Copyright (C) 2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @package bookmarks
+       * @version $Id$
+       * @internal http://www.renaghan.com/bookmarker
+       * @todo Class must be renamed to avoid conflicts
+       */
+
+       /**
+        * Bookmarks business object class
+        *
+        * @package bookmarks
+        */
        class bo
        {
                var $so;

====================================================
Index: bookmarks/inc/class.sqlquery.inc.php
diff -u bookmarks/inc/class.sqlquery.inc.php:1.5 
bookmarks/inc/class.sqlquery.inc.php:1.6
--- bookmarks/inc/class.sqlquery.inc.php:1.5    Tue Apr  8 05:00:59 2003
+++ bookmarks/inc/class.sqlquery.inc.php        Thu Apr 28 18:59:46 2005
@@ -1,17 +1,25 @@
 <?php
-/*
- * PHP Base Library
- *
- * Copyright (c) 1998-2000 NetUSE AG
- *                    Boris Erdmann, Kristian Koehntopp
- *
- * $Id$
- *
- */
-
+       /**
+       * Bookmarks - PHP Base Library
+       * @author Boris Erdmann, Kristian Koehntopp
+       * @author Michael Totschnig
+       * @copyright Copyright (C) 1998-2000 NetUSE AG
+       * @copyright Copyright (C) 2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @package bookmarks
+       * @version $Id$
+       * @todo Class must be renamed to avoid conflicts
+       */
+
+
+       /**
+        * Bookmarks sql query class
+        *
+        * @package bookmarks
+        */
        class sqlquery
        {
-               var $classname = 'sqlquery';  ## Persistence Support
+               var $classname = 'sqlquery';  // Persistence Support

                var $persistent_slots = array(
                                'conditions',
@@ -38,7 +46,7 @@
                var $variable  = 'on';    // if set, create variable size 
buttons


-  ## HTML Widget dictionary
+  // HTML Widget dictionary
 /* use phpgw lang() now
   var $dict = array(
     "de" => array(
@@ -64,7 +72,7 @@
     )
   );
 */
-  ## SQL comparision dictionary
+  // SQL comparision dictionary
   var $compare = array(
         "like" => "like",
         ">"    => ">",
@@ -80,14 +88,14 @@
   function start($class = "") {
   }

-  ## selection:
-  ##
-  ## Create a <select> tag of the class $class with the name $name.
-  ## The tag contains the options named in array $option. If $trans
-  ## is true, $option is exspected to be a hash of
-  ## "long name " => "sqlname" pairs. The option matching $old
-  ## is created with the attribute "selected".
-  ##
+  // selection:
+  //
+  // Create a <select> tag of the class $class with the name $name.
+  // The tag contains the options named in array $option. If $trans
+  // is true, $option is exspected to be a hash of
+  // "long name " => "sqlname" pairs. The option matching $old
+  // is created with the attribute "selected".
+  //
   function selection($name, $option, $old = "", $trans = "", $class = "") {
     $res  = "";
     $res .= sprintf("<select%s name=\"%s\">\n",
@@ -113,39 +121,39 @@
     return $res;
   }

-  ## fieldname:
-  ##
-  ## Given a basename $base, and attribute name $att and an attribute
-  ## number $num, this functions returns an input field name
-  ## $base[$name_$num].
-  ##
-  ## This construct can be imported into a function namespace with a
-  ## single global instruction and the field name can be easily
-  ## exploded into component names and numbers.
+  // fieldname:
+  //
+  // Given a basename $base, and attribute name $att and an attribute
+  // number $num, this functions returns an input field name
+  // $base[$name_$num].
+  //
+  // This construct can be imported into a function namespace with a
+  // single global instruction and the field name can be easily
+  // exploded into component names and numbers.

   function makename($base, $att, $num) {
     return sprintf("%s[%s_%d]", $base, $att, $num);
   }

-  ## form:
-  ##
-  ## Draw SQL Query selection form.
-  ##
+  // form:
+  //
+  // Draw SQL Query selection form.
+  //
   function form($base, $option, $class = "", $target = "") {
     global $sess;

-  ##
-       ## load the HTML results of this function into $res.
-       ##
+  //
+       // load the HTML results of this function into $res.
+       //
     $res  = "";

-    ## A hack. We cannot do language dependent initialisation of
-    ## static values.
+    // A hack. We cannot do language dependent initialisation of
+    // static values.
     if (isset($this->compare["like"])) {
       $this->compare["like"] = lang('like');
     }

-    ## Prepare a self-directed container form
+    // Prepare a self-directed container form
     if ($this->container) {
       $res .= sprintf("<table border=1%s><tr%s><td>\n",
         ($class)?" class=$class":"",
@@ -156,14 +164,14 @@
       $this->method,
       ($target)?$target:$sess->self_url());

-    ## Prepare the inner table, laying out the selection elements
+    // Prepare the inner table, laying out the selection elements
     $res .= sprintf("<table%s>\n", ($class)?" class=$class":"");

-    ## Build $this->conditions many selection elements
+    // Build $this->conditions many selection elements
     for ($i=1; $i<= $this->conditions; $i++) {
       $res .= sprintf(" <tr%s>\n",   ($class)?" class=$class":"");

-      ## Build conjunction (first row does not have a conjunction)
+      // Build conjunction (first row does not have a conjunction)
       if ($i == 1) {
         $res .= sprintf("  <td%s>%s</td>\n",
           ($class)?" class=$class":"",lang('Search for:'));
@@ -177,7 +185,7 @@
                            $class));
       }

-      ## Build field selection
+      // Build field selection
       $res .= sprintf("  <td%s>%s</td>\n",
         ($class)?" class=$class":"",
         $this->selection(
@@ -187,7 +195,7 @@
           $this->translate,
           $class));

-      ## Build comparison selection
+      // Build comparison selection
       $res .= sprintf("  <td%s>%s</td>\n",
         ($class)?" class=$class":"",
         $this->selection(
@@ -196,7 +204,7 @@
           $GLOBALS[$base]["comp_".$i],
           "on",
           $class));
-      ## Create text input field.
+      // Create text input field.
       $res .= sprintf("  <td%s><input type=\"text\" name=\"%s\" value=\"%s\" 
size=%d maxlength=%d%s></td>\n",
         ($class)?" class=$class":"",
         $this->makename($base, "input", $i),
@@ -208,7 +216,7 @@
       $res .= sprintf(" </tr>\n");
     }

-    ## Create variable size buttons
+    // Create variable size buttons
     $res .= sprintf(" <tr%s>\n",  ($class)?" class=$class":"");
     $res .= sprintf("  <td%s>&nbsp;</td>\n", ($class)?" class=$class":"");

@@ -244,28 +252,28 @@
     return $res;
   }

-  ## plain_where:
-  ##
-  ## Given a base variable name, creates a condition suitable for
-  ## the where clause of a SQL query.
-  ##
+  // plain_where:
+  //
+  // Given a base variable name, creates a condition suitable for
+  // the where clause of a SQL query.
+  //
   function plain_where($base) {
     for($i=1; $i<=$this->conditions; $i++) {
-      ## Only create conditions for used input fields
+      // Only create conditions for used input fields
       if ($GLOBALS[$base]["input_".$i] == "")
         continue;

-      ## If necessary, add conjunction
+      // If necessary, add conjunction
       if ($q != "")
         $q .= sprintf(" %s ", $GLOBALS[$base]["conj_".$i]);

-      ## Handle "like"
+      // Handle "like"
       if ($GLOBALS[$base]["comp_".$i] == "like")
         $v = "%".$GLOBALS[$base]["input_".$i]."%";
       else
         $v = $GLOBALS[$base]["input_".$i];

-      ## Create subcondition
+      // Create subcondition
       $q .= sprintf("%s %s '%s'",
               $GLOBALS[$base]["sel_".$i],
               $GLOBALS[$base]["comp_".$i],
@@ -279,28 +287,28 @@
     return "( $q )";
   }

-  ## translated_plain_where:
-  ##
-  ## Given a base variable name, creates a translated version of
-  ## the where clause of a SQL query.
-  ##
+  // translated_plain_where:
+  //
+  // Given a base variable name, creates a translated version of
+  // the where clause of a SQL query.
+  //
   function translated_plain_where($base, $field) {
     for($i=1; $i<=$this->conditions; $i++) {
-      ## Only create conditions for used input fields
+      // Only create conditions for used input fields
       if ($GLOBALS[$base]["input_".$i] == "")
         continue;

-      ## If necessary, add conjunction
+      // If necessary, add conjunction
       if ($q != "")
         $q .= sprintf(" %s ", lang($GLOBALS[$base]["conj_".$i]));

-      ## Handle "like"
+      // Handle "like"
       if ($GLOBALS[$base]["comp_".$i] == "like")
         $c = lang($GLOBALS[$base]["comp_".$i]);
       else
         $c = $this->compare[$GLOBALS[$base]["comp_".$i]];

-      ## Create subcondition
+      // Create subcondition
       $q .= sprintf("%s %s '%s'",
               $field[$GLOBALS[$base]["sel_".$i]],
               $c,
@@ -314,10 +322,10 @@
     return "( $q )";
   }

-  ## where:
-  ##
-  ## Same as plain_where(), but also inspects the submit button
-  ## used to submit the query. Changes $this->conditions appropriately.
+  // where:
+  //
+  // Same as plain_where(), but also inspects the submit button
+  // used to submit the query. Changes $this->conditions appropriately.
   function where($base, $incr = 1) {
     if (isset($GLOBALS[$base]["less_0"]))
       $this->conditions -= $incr;

====================================================
Index: bookmarks/inc/hook_preferences.inc.php
diff -u bookmarks/inc/hook_preferences.inc.php:1.19 
bookmarks/inc/hook_preferences.inc.php:1.20
--- bookmarks/inc/hook_preferences.inc.php:1.19 Tue Apr  8 05:00:59 2003
+++ bookmarks/inc/hook_preferences.inc.php      Thu Apr 28 18:59:46 2005
@@ -1,14 +1,12 @@
 <?php
-       
/**************************************************************************\
-       * phpGroupWare - Bookmarks                                              
   *
-       * http://www.phpgroupware.org                                           
   *
-       * --------------------------------------------                          
   *
-       *  This program is free software; you can redistribute it and/or modify 
it *
-       *  under the terms of the GNU General Public License as published by 
the   *
-       *  Free Software Foundation; either version 2 of the License, or (at 
your  *
-       *  option) any later version.                                           
   *
-       
\**************************************************************************/
-       /* $Id$ */
+       /**
+       * Bookmarks admin hook
+       * @author Michael Totschnig
+       * @copyright Copyright (C) 2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @package bookmarks
+       * @version $Id$
+       */

        $file = array(
                'Import Bookmarks' => 
$GLOBALS['phpgw']->link('/index.php','menuaction=bookmarks.ui.import'),

====================================================
Index: bookmarks/inc/class.so.inc.php
diff -u bookmarks/inc/class.so.inc.php:1.4 bookmarks/inc/class.so.inc.php:1.5
--- bookmarks/inc/class.so.inc.php:1.4  Fri May 16 20:57:45 2003
+++ bookmarks/inc/class.so.inc.php      Thu Apr 28 18:59:46 2005
@@ -1,20 +1,23 @@
 <?php
-       
/**************************************************************************\
-       * phpGroupWare - Bookmarks                                              
   *
-       * http://www.phpgroupware.org                                           
   *
-       * Based on Bookmarker Copyright (C) 1998  Padraic Renaghan              
   *
-       *                     http://www.renaghan.com/bookmarker                
   *
-       * Ported to phpgroupware by Joseph Engo                                 
   *
-       * Ported to three-layered design by Michael Totschnig                   
   *
-       * --------------------------------------------                          
   *
-       *  This program is free software; you can redistribute it and/or modify 
it *
-       *  under the terms of the GNU General Public License as published by 
the   *
-       *  Free Software Foundation; either version 2 of the License, or (at 
your  *
-       *  option) any later version.                                           
   *
-       
\**************************************************************************/
-
-       /* $Id$ */
-
+       /**
+       * Bookmarks
+       * @author Joseph Engo
+       * @author Michael Totschnig
+       * @copyright Copyright (C) 1998 Padraic Renaghan
+       * @copyright Copyright (C) 2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @package bookmarks
+       * @version $Id$
+       * @internal http://www.renaghan.com/bookmarker
+       * @todo Class must be renamed to avoid conflicts
+       */
+
+
+       /**
+        * Bookmarks storage object class
+        *
+        * @package bookmarks
+        */
        class so
        {
                var $db;






reply via email to

[Prev in Thread] Current Thread [Next in Thread]