[geeklog-cvs] geeklog: phpDocumentor tags for the Polls plugin
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Mar 15 16:55:22 EDT 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/da16bb625546
changeset: 6839:da16bb625546
user: Dirk Haun <dirk at haun-online.de>
date: Sun Mar 15 18:50:42 2009 +0100
description:
phpDocumentor tags for the Polls plugin
diffstat:
9 files changed, 91 insertions(+), 17 deletions(-)
plugins/polls/autoinstall.php | 35 ++++++++++++++++++++++++-----
plugins/polls/functions.inc | 8 +++++-
plugins/polls/install_defaults.php | 8 +++++-
plugins/polls/sql/mssql_install.php | 8 +++++-
plugins/polls/sql/mssql_updates.php | 8 +++++-
plugins/polls/sql/mysql_install.php | 8 +++++-
plugins/polls/sql/mysql_updates.php | 8 +++++-
public_html/admin/plugins/polls/index.php | 12 +++++++++
public_html/polls/index.php | 13 +++++++---
diffs (277 lines):
diff -r cb1ba8d99085 -r da16bb625546 plugins/polls/autoinstall.php
--- a/plugins/polls/autoinstall.php Sun Mar 15 17:29:16 2009 +0100
+++ b/plugins/polls/autoinstall.php Sun Mar 15 18:50:42 2009 +0100
@@ -8,7 +8,7 @@
// | |
// | This file provides helper functions for the automatic plugin install. |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2008 by the following authors: |
+// | Copyright (C) 2008-2009 by the following authors: |
// | |
// | Authors: Dirk Haun - dirk AT haun-online DOT de |
// +---------------------------------------------------------------------------+
@@ -29,6 +29,19 @@
// | |
// +---------------------------------------------------------------------------+
+/**
+* Autoinstall API functions for the Polls plugin
+*
+* @package Polls
+*/
+
+/**
+* Plugin autoinstall function
+*
+* @param string $pi_name Plugin name
+* @return array Plugin information
+*
+*/
function plugin_autoinstall_polls($pi_name)
{
$pi_name = 'polls';
@@ -73,6 +86,14 @@
return $inst_parms;
}
+/**
+* Load plugin configuration from database
+*
+* @param string $pi_name Plugin name
+* @return boolean true on success, otherwise false
+* @see plugin_initconfig_polls
+*
+*/
function plugin_load_configuration_polls($pi_name)
{
global $_CONF;
@@ -85,11 +106,13 @@
return plugin_initconfig_polls();
}
-function plugin_postinstall_polls($pi_name)
-{
- return true;
-}
-
+/**
+* Check if the plugin is compatible with this Geeklog version
+*
+* @param string $pi_name Plugin name
+* @return boolean true: plugin compatible; false: not compatible
+*
+*/
function plugin_compatible_with_this_version_polls($pi_name)
{
if (function_exists('COM_showPoll') || function_exists('COM_pollVote')) {
diff -r cb1ba8d99085 -r da16bb625546 plugins/polls/functions.inc
--- a/plugins/polls/functions.inc Sun Mar 15 17:29:16 2009 +0100
+++ b/plugins/polls/functions.inc Sun Mar 15 18:50:42 2009 +0100
@@ -10,7 +10,7 @@
// | API method and 2) implements all the common code needed by the Polls |
// | plugin' PHP files. |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2008 by the following authors: |
+// | Copyright (C) 2000-2009 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
// | Tom Willett - twillett AT users DOT sourceforge DOT net |
@@ -33,6 +33,12 @@
// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
// | |
// +---------------------------------------------------------------------------+
+
+/**
+* Implementation of the Plugin API for the Polls plugin
+*
+* @package Polls
+*/
if (strpos(strtolower($_SERVER['PHP_SELF']), 'functions.inc') !== false) {
die('This file can not be used on its own.');
diff -r cb1ba8d99085 -r da16bb625546 plugins/polls/install_defaults.php
--- a/plugins/polls/install_defaults.php Sun Mar 15 17:29:16 2009 +0100
+++ b/plugins/polls/install_defaults.php Sun Mar 15 18:50:42 2009 +0100
@@ -31,11 +31,17 @@
// | |
// +---------------------------------------------------------------------------+
+/**
+* Install data and defaults for the Polls plugin configuration
+*
+* @package Polls
+*/
+
if (strpos(strtolower($_SERVER['PHP_SELF']), 'install_defaults.php') !== false) {
die('This file can not be used on its own!');
}
-/*
+/**
* Polls default settings
*
* Initial Installation Defaults used when loading the online configuration
diff -r cb1ba8d99085 -r da16bb625546 plugins/polls/sql/mssql_install.php
--- a/plugins/polls/sql/mssql_install.php Sun Mar 15 17:29:16 2009 +0100
+++ b/plugins/polls/sql/mssql_install.php Sun Mar 15 18:50:42 2009 +0100
@@ -6,7 +6,7 @@
// +---------------------------------------------------------------------------+
// | mssql_install.php |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2008 by the following authors: |
+// | Copyright (C) 2000-2009 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
// | Mark Limburg - mlimburg AT users DOT sourceforge DOT net |
@@ -30,6 +30,12 @@
// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
// | |
// +---------------------------------------------------------------------------+
+
+/**
+* MS SQL install data and tables
+*
+* @package Polls
+*/
$_SQL[] = "
CREATE TABLE [dbo].[{$_TABLES['pollanswers']}] (
diff -r cb1ba8d99085 -r da16bb625546 plugins/polls/sql/mssql_updates.php
--- a/plugins/polls/sql/mssql_updates.php Sun Mar 15 17:29:16 2009 +0100
+++ b/plugins/polls/sql/mssql_updates.php Sun Mar 15 18:50:42 2009 +0100
@@ -6,7 +6,7 @@
// +---------------------------------------------------------------------------+
// | mssql_updates.php |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2008 by the following authors: |
+// | Copyright (C) 2008-2009 by the following authors: |
// | |
// | Authors: Dirk Haun - dirk AT haun-online DOT de |
// +---------------------------------------------------------------------------+
@@ -26,6 +26,12 @@
// | |
// +---------------------------------------------------------------------------+
+/**
+* MS SQL updates
+*
+* @package Polls
+*/
+
$_UPDATES = array(
'2.0.1' => array(
diff -r cb1ba8d99085 -r da16bb625546 plugins/polls/sql/mysql_install.php
--- a/plugins/polls/sql/mysql_install.php Sun Mar 15 17:29:16 2009 +0100
+++ b/plugins/polls/sql/mysql_install.php Sun Mar 15 18:50:42 2009 +0100
@@ -6,7 +6,7 @@
// +---------------------------------------------------------------------------+
// | mysql_install.php |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2008 by the following authors: |
+// | Copyright (C) 2000-2009 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
// | Mark Limburg - mlimburg AT users DOT sourceforge DOT net |
@@ -29,6 +29,12 @@
// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
// | |
// +---------------------------------------------------------------------------+
+
+/**
+* MySQL install data and tables
+*
+* @package Polls
+*/
$_SQL[] = "
CREATE TABLE {$_TABLES['pollanswers']} (
diff -r cb1ba8d99085 -r da16bb625546 plugins/polls/sql/mysql_updates.php
--- a/plugins/polls/sql/mysql_updates.php Sun Mar 15 17:29:16 2009 +0100
+++ b/plugins/polls/sql/mysql_updates.php Sun Mar 15 18:50:42 2009 +0100
@@ -6,7 +6,7 @@
// +---------------------------------------------------------------------------+
// | mysql_updates.php |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2008 by the following authors: |
+// | Copyright (C) 2008-2009 by the following authors: |
// | |
// | Authors: Dirk Haun - dirk AT haun-online DOT de |
// +---------------------------------------------------------------------------+
@@ -26,6 +26,12 @@
// | |
// +---------------------------------------------------------------------------+
+/**
+* MySQL updates
+*
+* @package Polls
+*/
+
$_UPDATES = array(
'2.0.1' => array(
diff -r cb1ba8d99085 -r da16bb625546 public_html/admin/plugins/polls/index.php
--- a/public_html/admin/plugins/polls/index.php Sun Mar 15 17:29:16 2009 +0100
+++ b/public_html/admin/plugins/polls/index.php Sun Mar 15 18:50:42 2009 +0100
@@ -6,7 +6,7 @@
// +---------------------------------------------------------------------------+
// | index.php |
// | |
-// | Geeklog poll administration page |
+// | Polls plugin administration page |
// +---------------------------------------------------------------------------+
// | Copyright (C) 2000-2009 by the following authors: |
// | |
@@ -32,6 +32,16 @@
// | |
// +---------------------------------------------------------------------------+
+/**
+* Polls plugin administration page
+*
+* @package Polls
+* @subpackage admin
+*/
+
+/**
+* Geeklog common function library and Admin authentication
+*/
require_once '../../../lib-common.php';
require_once '../../auth.inc.php';
diff -r cb1ba8d99085 -r da16bb625546 public_html/polls/index.php
--- a/public_html/polls/index.php Sun Mar 15 17:29:16 2009 +0100
+++ b/public_html/polls/index.php Sun Mar 15 18:50:42 2009 +0100
@@ -2,13 +2,13 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Polls Plugin 2.0 |
+// | Polls Plugin 2.1 |
// +---------------------------------------------------------------------------+
// | index.php |
// | |
// | Display poll results and past polls. |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2008 by the following authors: |
+// | Copyright (C) 2000-2009 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
// | Mark Limburg - mlimburg AT users DOT sourceforge DOT net |
@@ -31,8 +31,13 @@
// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
// | |
// +---------------------------------------------------------------------------+
-//
-// $Id: index.php,v 1.29 2008/05/24 09:04:59 dhaun Exp $
+
+/**
+* Display poll results and past polls
+*
+* @package Polls
+* @subpackage public_html
+*/
require_once '../lib-common.php';
More information about the geeklog-cvs
mailing list