You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(34) |
Aug
(215) |
Sep
(180) |
Oct
(135) |
Nov
(105) |
Dec
(81) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(76) |
Feb
(22) |
Mar
(154) |
Apr
(149) |
May
(128) |
Jun
(94) |
Jul
(14) |
Aug
(24) |
Sep
(77) |
Oct
(52) |
Nov
(22) |
Dec
(6) |
| 2003 |
Jan
(4) |
Feb
(10) |
Mar
(6) |
Apr
(29) |
May
(10) |
Jun
(37) |
Jul
(39) |
Aug
(13) |
Sep
(23) |
Oct
(3) |
Nov
(7) |
Dec
(2) |
| 2004 |
Jan
|
Feb
(10) |
Mar
(4) |
Apr
|
May
(35) |
Jun
(4) |
Jul
(17) |
Aug
(6) |
Sep
(14) |
Oct
(18) |
Nov
(2) |
Dec
(14) |
| 2005 |
Jan
(9) |
Feb
(30) |
Mar
(6) |
Apr
|
May
(38) |
Jun
(23) |
Jul
(21) |
Aug
(76) |
Sep
(50) |
Oct
(51) |
Nov
(13) |
Dec
|
|
From: Javier S. <ja...@us...> - 2001-09-26 09:20:19
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv7923
Modified Files:
include.php
Log Message:
ID -> _id
pb updating/editing bug 's OS
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- include.php 2001/09/22 16:55:33 1.56
+++ include.php 2001/09/26 09:20:16 1.57
@@ -331,7 +331,7 @@
while ($row = $q->grab()) {
if ($value == '' and $row['Regex'] and
preg_match($row['Regex'],$GLOBALS['HTTP_USER_AGENT'])) $sel = ' selected';
- elseif ($value == $row[$box.'ID']) $sel = ' selected';
+ elseif ($value == $row[$box.'_id']) $sel = ' selected';
else $sel = '';
$text .= '<option value="'.
$row[$box.'_id']."\"$sel>".$row[$box.'_name']."</option>";
|
|
From: Patrick M. <mai...@st...> - 2001-09-25 15:55:57
|
Hi, I think the problem is this line: choice=`<$tempfile` choice is then empty. when I replace it with read choice <$tempfile it works better. patrick! -- http://home.nikocity.de/mairif http://caravan-network.de ICQ# 96716515 |
|
From: Ben C. <php...@be...> - 2001-09-25 13:54:52
|
Heh, thanks. :) On Tue, Sep 25, 2001 at 10:03:31AM +0200, Javier Sixto wrote: > Oups ... Sorry. > I will take more attention on this for next modification ;-) > > Ben Curtis wrote: > > >Javier, could you use 1 tab per indent instead of two spaces? I would > >appreciate it, as that's the indent format I want the project to use. > > > > > _______________________________________________ > phpbt-dev mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpbt-dev |
|
From: Javier S. <js...@si...> - 2001-09-25 08:03:43
|
Oups ... Sorry. I will take more attention on this for next modification ;-) Ben Curtis wrote: >Javier, could you use 1 tab per indent instead of two spaces? I would appreciate it, as that's the indent format I want the project to use. > |
|
From: Benjamin C. <bc...@us...> - 2001-09-25 04:13:12
|
Update of /cvsroot/phpbt/phpbt/docs/sgml
In directory usw-pr-cvs1:/tmp/cvs-serv12467/sgml
Modified Files:
devstandards.sgml
Log Message:
Use entities
Index: devstandards.sgml
===================================================================
RCS file: /cvsroot/phpbt/phpbt/docs/sgml/devstandards.sgml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- devstandards.sgml 2001/09/25 03:30:19 1.3
+++ devstandards.sgml 2001/09/25 04:13:10 1.4
@@ -35,7 +35,7 @@
<programlisting>
if ((condition1) || (condition2)) {
action1;
- } elseif ((condition3) && (condition4)) {
+ } elseif ((condition3) && (condition4)) {
action2;
} else {
defaultaction;
@@ -104,16 +104,16 @@
</para>
<programlisting>
- function connect(&$dsn, $persistent = false) {
+ function connect(&$dsn, $persistent = false) {
if (is_array($dsn)) {
- $dsninfo = &$dsn;
+ $dsninfo = &$dsn;
} else {
$dsninfo = DB::parseDSN($dsn);
}
if (!$dsninfo || !$dsninfo['phptype']) {
- return $this->raiseError();
+ return $this->raiseError();
}
return true;
@@ -151,8 +151,8 @@
<sect2 id="devstandards-phptags" xreflabel="PHP Tags">
<title>PHP Tags</title>
<para>
- Always use <computeroutput><![CDATA[<?php ?>]]></computeroutput>
- to delimit PHP code, not the <computeroutput><![CDATA[<? ?>]]></computeroutput>
+ Always use <computeroutput><?php ?></computeroutput>
+ to delimit PHP code, not the <computeroutput><? ?></computeroutput>
shorthand.
</para>
</sect2>
|
|
From: Benjamin C. <bc...@us...> - 2001-09-25 03:30:22
|
Update of /cvsroot/phpbt/phpbt/docs/sgml In directory usw-pr-cvs1:/tmp/cvs-serv5023/sgml Modified Files: devstandards.sgml Log Message: Some tweaks Index: devstandards.sgml =================================================================== RCS file: /cvsroot/phpbt/phpbt/docs/sgml/devstandards.sgml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- devstandards.sgml 2001/09/19 20:18:26 1.2 +++ devstandards.sgml 2001/09/25 03:30:19 1.3 @@ -75,7 +75,7 @@ </sect2> <sect2 id="devstandards-funcdefs" xreflabel="Function Definitions"> - <title>Function Calls</title> + <title>Function Definitions</title> <para> Function definitions follow the format of function calls, with the opening brace at the end of the line of the function declaration. The |
|
From: Benjamin C. <bc...@us...> - 2001-09-25 03:30:22
|
Update of /cvsroot/phpbt/phpbt/docs/html
In directory usw-pr-cvs1:/tmp/cvs-serv5023/html
Modified Files:
devstandards.html
Log Message:
Some tweaks
Index: devstandards.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/docs/html/devstandards.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- devstandards.html 2001/09/19 20:05:19 1.2
+++ devstandards.html 2001/09/25 03:30:19 1.3
@@ -1,44 +1,80 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Development Standards</title>
- <meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.64 ">
+ <meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.72 " />
+ <link rel="STYLESHEET" type="text/css" href="bob.css" />
</head>
- <body class="ARTICLE">
+ <body class="ARTICLE" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<div class="ARTICLE">
<div class="TITLEPAGE">
- <h1 class="TITLE"><a name="AEN2">Development Standards</a></h1>
+ <h1 class="TITLE"><a id="AEN2" name="AEN2">Development Standards</a></h1>
<div>
<div class="ABSTRACT">
- <a name="AEN4"></a>
+ <a id="AEN4" name="AEN4"></a>
<p>This document will contain the coding and process standards to be followed by the developers working on phpBugTracker.</p>
</div>
</div>
- <hr>
+ <hr />
</div>
+ <div class="TOC">
+ <dl>
+ <dt><b>Table of Contents</b></dt>
+
+ <dt>1. <a href="#DEVSTANDARDS-CODE">Coding Standards</a></dt>
+
+ <dd>
+ <dl>
+ <dt>1.1. <a href="#DEVSTANDARDS-INDENTING">Indenting</a></dt>
+
+ <dt>1.2. <a href="#DEVSTANDARDS-CONTROL">Control Structures</a></dt>
+
+ <dt>1.3. <a href="#DEVSTANDARDS-FUNCCALLS">Function Calls</a></dt>
+
+ <dt>1.4. <a href="#DEVSTANDARDS-FUNCDEFS">Function Definitions</a></dt>
+
+ <dt>1.5. <a href="#DEVSTANDARDS-COMMENTS">Comments</a></dt>
+
+ <dt>1.6. <a href="#DEVSTANDARDS-INCLUDING">Including Code</a></dt>
+
+ <dt>1.7. <a href="#DEVSTANDARDS-PHPTAGS">PHP Tags</a></dt>
+
+ <dt>1.8. <a href="#DEVSTANDARDS-CONSTANTS">Naming Constants</a></dt>
+ </dl>
+ </dd>
+
+ <dt>2. <a href="#OTHERCONVENTIONS">Other Conventions</a></dt>
+
+ <dd>
+ <dl>
+ <dt>2.1. <a href="#DEVSTANDARDS-FILENAMING">File Naming</a></dt>
+ </dl>
+ </dd>
+ </dl>
+ </div>
+
<div class="SECT1">
- <hr>
+ <hr />
- <h1 class="SECT1"><a name="DEVSTANDARDS-CODE">Coding Standards</a></h1>
+ <h1 class="SECT1"><a id="DEVSTANDARDS-CODE" name="DEVSTANDARDS-CODE">1. Coding Standards</a></h1>
<div class="SECT2">
- <h2 class="SECT2"><a name="DEVSTANDARDS-INDENTING">Indenting</a></h2>
+ <h2 class="SECT2"><a id="DEVSTANDARDS-INDENTING" name="DEVSTANDARDS-INDENTING">1.1. Indenting</a></h2>
<p>Use an indent of one tab per indent.</p>
</div>
<div class="SECT2">
- <hr>
+ <hr />
- <h2 class="SECT2"><a name="DEVSTANDARDS-CONTROL">Control Structures</a></h2>
+ <h2 class="SECT2"><a id="DEVSTANDARDS-CONTROL" name="DEVSTANDARDS-CONTROL">1.2. Control Structures</a></h2>
<p>These include if, for, while, switch, etc. Here is an example if statement, since it is the most complicated of them:</p>
- <table border="0" bgcolor="#E0E0E0" width="100%">
+ <table border="0" bgcolor="#EEEEEE" width="100%">
<tr>
<td>
<pre class="PROGRAMLISTING">
@@ -49,7 +85,7 @@
} else {
defaultaction;
}
-
+
</pre>
</td>
</tr>
@@ -61,18 +97,18 @@
</div>
<div class="SECT2">
- <hr>
+ <hr />
- <h2 class="SECT2"><a name="DEVSTANDARDS-FUNCCALLS">Function Calls</a></h2>
+ <h2 class="SECT2"><a id="DEVSTANDARDS-FUNCCALLS" name="DEVSTANDARDS-FUNCCALLS">1.3. Function Calls</a></h2>
- <p>Functions should be called with no spaces between the function name, the opening parenthesis, and the first parameter; spaces between commas and each parameter, and no space between the last parameter, the closing parenthesis, and the semicolon. Here's an example:</p>
+ <p>Functions should be called with no spaces between the function name, the opening parenthesis, and the first parameter; spaces between commas and each parameter, and no space between the last parameter, the closing parenthesis, and the semicolon. Here's an example:</p>
- <table border="0" bgcolor="#E0E0E0" width="100%">
+ <table border="0" bgcolor="#EEEEEE" width="100%">
<tr>
<td>
<pre class="PROGRAMLISTING">
$var = foo($bar, $baz, $quux);
-
+
</pre>
</td>
</tr>
@@ -82,17 +118,17 @@
</div>
<div class="SECT2">
- <hr>
+ <hr />
- <h2 class="SECT2"><a name="DEVSTANDARDS-FUNCDEFS">Function Calls</a></h2>
+ <h2 class="SECT2"><a id="DEVSTANDARDS-FUNCDEFS" name="DEVSTANDARDS-FUNCDEFS">1.4. Function Definitions</a></h2>
<p>Function definitions follow the format of function calls, with the opening brace at the end of the line of the function declaration. The global variable list (if used) should be placed on the line immediately following the opening brace, with a blank line between the variable list and the first line of function code. If the global variable list is not neccessary, include a blank line between the opening brace and the first line of function code.</p>
- <table border="0" bgcolor="#E0E0E0" width="100%">
+ <table border="0" bgcolor="#EEEEEE" width="100%">
<tr>
<td>
<pre class="PROGRAMLISTING">
- function fooFunction($arg1, $arg2 = '') {
+ function fooFunction($arg1, $arg2 = '') {
global $foo1, $foo2;
if (condition) {
@@ -100,7 +136,7 @@
}
return $val;
}
-
+
</pre>
</td>
</tr>
@@ -108,7 +144,7 @@
<p>Arguments with default values go at the end of the argument list. Always attempt to return a meaningful value from a function if one is appropriate. Here is a slightly longer example:</p>
- <table border="0" bgcolor="#E0E0E0" width="100%">
+ <table border="0" bgcolor="#EEEEEE" width="100%">
<tr>
<td>
<pre class="PROGRAMLISTING">
@@ -120,13 +156,13 @@
$dsninfo = DB::parseDSN($dsn);
}
- if (!$dsninfo || !$dsninfo['phptype']) {
+ if (!$dsninfo || !$dsninfo['phptype']) {
return $this->raiseError();
}
return true;
}
-
+
</pre>
</td>
</tr>
@@ -134,45 +170,45 @@
</div>
<div class="SECT2">
- <hr>
+ <hr />
- <h2 class="SECT2"><a name="DEVSTANDARDS-COMMENTS">Comments</a></h2>
+ <h2 class="SECT2"><a id="DEVSTANDARDS-COMMENTS" name="DEVSTANDARDS-COMMENTS">1.5. Comments</a></h2>
- <p>Non-documentation comments are strongly encouraged. A general rule of thumb is that if you look at a section of code and think "Wow, I don't want to try and describe that", you need to comment it before you forget how it works.</p>
+ <p>Non-documentation comments are strongly encouraged. A general rule of thumb is that if you look at a section of code and think "Wow, I don't want to try and describe that", you need to comment it before you forget how it works.</p>
</div>
<div class="SECT2">
- <hr>
+ <hr />
- <h2 class="SECT2"><a name="DEVSTANDARDS-INCLUDING">Including Code</a></h2>
+ <h2 class="SECT2"><a id="DEVSTANDARDS-INCLUDING" name="DEVSTANDARDS-INCLUDING">1.6. Including Code</a></h2>
- <p>Anywhere you are unconditionally including a class file, use <a href="http://php.net/manual/en/html/function.require-once.html" target="_top"><tt class="FUNCTION">require_once()</tt></a>. Anywhere you are conditionally including a class file (for example, factory methods), use <a href="http://php.net/manual/en/html/function.include-once.html" target="_top"><tt class="FUNCTION">include_once()</tt></a>. Either of these will ensure that class files are included only once. They share the same file list, so you don't need to worry about mixing them - a file included with <tt class="FUNCTION">require_once()</tt> will not be included again by <tt class="FUNCTION">include_once()</tt>.</p>
+ <p>Anywhere you are unconditionally including a class file, use <a href="http://php.net/manual/en/html/function.require-once.html" target="_top"><tt class="FUNCTION">require_once()</tt></a>. Anywhere you are conditionally including a class file (for example, factory methods), use <a href="http://php.net/manual/en/html/function.include-once.html" target="_top"><tt class="FUNCTION">include_once()</tt></a>. Either of these will ensure that class files are included only once. They share the same file list, so you don't need to worry about mixing them - a file included with <tt class="FUNCTION">require_once()</tt> will not be included again by <tt class="FUNCTION">include_once()</tt>.</p>
</div>
<div class="SECT2">
- <hr>
+ <hr />
- <h2 class="SECT2"><a name="DEVSTANDARDS-PHPTAGS">PHP Tags</a></h2>
+ <h2 class="SECT2"><a id="DEVSTANDARDS-PHPTAGS" name="DEVSTANDARDS-PHPTAGS">1.7. PHP Tags</a></h2>
<p>Always use <tt class="COMPUTEROUTPUT"><?php ?></tt> to delimit PHP code, not the <tt class="COMPUTEROUTPUT"><? ?></tt> shorthand.</p>
</div>
<div class="SECT2">
- <hr>
+ <hr />
- <h2 class="SECT2"><a name="DEVSTANDARDS-CONSTANTS">Naming Constants</a></h2>
+ <h2 class="SECT2"><a id="DEVSTANDARDS-CONSTANTS" name="DEVSTANDARDS-CONSTANTS">1.8. Naming Constants</a></h2>
<p>Constants should always be uppercase, with underscores to separate words.</p>
</div>
</div>
<div class="SECT1">
- <hr>
+ <hr />
- <h1 class="SECT1"><a name="DEVSTARDS-OTHERCONVENTIONS">Other Conventions</a></h1>
+ <h1 class="SECT1"><a id="OTHERCONVENTIONS" name="OTHERCONVENTIONS">2. Other Conventions</a></h1>
<div class="SECT2">
- <h2 class="SECT2"><a name="DEVSTANDARDS-FILENAMING">File Naming</a></h2>
+ <h2 class="SECT2"><a id="DEVSTANDARDS-FILENAMING" name="DEVSTANDARDS-FILENAMING">2.1. File Naming</a></h2>
<p>File names should be all lowercase and contain no spaces. HTML files should have <tt class="FILENAME">.html</tt> as the extension, and PHP files should have <tt class="FILENAME">.php</tt> as the extension. Where possible, template files should match the name of the PHP file that will be using it, e. g., <tt class="FILENAME">index.html</tt> would be the template file for <tt class="FILENAME">index.php</tt>. Where one PHP file uses more than one templates, the templates should be similarly named: <tt class="FILENAME">user.php</tt> could use <tt class="FILENAME">userlist.html</tt> and <tt class="FILENAME">userform.html</tt> for a list of users and editing a user, respectively.</p>
</div>
|
|
From: Ben C. <php...@be...> - 2001-09-25 02:48:06
|
Perhaps you could echo out $? after the menu dialog is run, and also examine the contents of the tempfile that is supposed to have the menu choice in it. On Mon, Sep 24, 2001 at 08:44:24PM +0200, Patrick Mairif wrote: > On Mon, Sep 24, 2001 at 05:28:50AM -0700, Ben Curtis wrote: > > Hmm, sounds like something with the exit code in the loop. What OS/distro are you running? > > RedHat! > > $ rpm -q dialog > dialog-0.6-12 > > what do you want to know? > > -- > http://home.nikocity.de/mairif > http://caravan-network.de > ICQ# 96716515 > > _______________________________________________ > phpbt-dev mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpbt-dev |
|
From: Ben C. <php...@be...> - 2001-09-25 02:46:12
|
Javier, could you use 1 tab per indent instead of two spaces? I would appreciate it, as that's the indent format I want the project to use.
On Mon, Sep 24, 2001 at 05:57:05AM -0700, Javier Sixto wrote:
> Update of /cvsroot/phpbt/phpbt
> In directory usw-pr-cvs1:/tmp/cvs-serv5318
>
> Modified Files:
> bug.php
> Log Message:
> component -> component_id
>
> Index: bug.php
> ===================================================================
> RCS file: /cvsroot/phpbt/phpbt/bug.php,v
> retrieving revision 1.45
> retrieving revision 1.46
> diff -u -r1.45 -r1.46
> --- bug.php 2001/09/22 16:54:58 1.45
> +++ bug.php 2001/09/24 12:57:03 1.46
> @@ -10,12 +10,12 @@
> // 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.
> -//
> +//
> // phpBugTracker is distributed in the hope that it will be useful,
> // but WITHOUT ANY WARRANTY; without even the implied warranty of
> // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> // GNU General Public License for more details.
> -//
> +//
> [...1085 lines suppressed...]
> + switch($op) {
> + case 'history' : show_history($bugid); break;
> + case 'add' :
> + $perm->check('Editbug');
> + if ($project) show_form();
> + else show_projects();
> + break;
> + case 'show' : show_bug($bugid); break;
> + case 'update' : update_bug($bugid); break;
> + case 'do' : do_form($bugid); break;
> + }
> } else header("Location: query.php");
>
> $t->pparse('main',array('content','wrap','main'));
>
> page_close();
>
> -?>
> +?>
> \ No newline at end of file
>
>
> _______________________________________________
> phpbt-dev mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/phpbt-dev
|
|
From: Patrick M. <mai...@st...> - 2001-09-24 18:44:08
|
On Mon, Sep 24, 2001 at 05:28:50AM -0700, Ben Curtis wrote: > Hmm, sounds like something with the exit code in the loop. What OS/distro are you running? RedHat! $ rpm -q dialog dialog-0.6-12 what do you want to know? -- http://home.nikocity.de/mairif http://caravan-network.de ICQ# 96716515 |
|
From: Javier S. <ja...@us...> - 2001-09-24 12:57:08
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv5318
Modified Files:
bug.php
Log Message:
component -> component_id
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- bug.php 2001/09/22 16:54:58 1.45
+++ bug.php 2001/09/24 12:57:03 1.46
@@ -10,12 +10,12 @@
// 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.
-//
+//
// phpBugTracker is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
[...1085 lines suppressed...]
+ switch($op) {
+ case 'history' : show_history($bugid); break;
+ case 'add' :
+ $perm->check('Editbug');
+ if ($project) show_form();
+ else show_projects();
+ break;
+ case 'show' : show_bug($bugid); break;
+ case 'update' : update_bug($bugid); break;
+ case 'do' : do_form($bugid); break;
+ }
} else header("Location: query.php");
$t->pparse('main',array('content','wrap','main'));
page_close();
-?>
+?>
\ No newline at end of file
|
|
From: Ben C. <php...@be...> - 2001-09-24 12:29:00
|
Hmm, sounds like something with the exit code in the loop. What OS/distro are you running? On Mon, Sep 24, 2001 at 10:00:37AM +0200, Patrick Mairif wrote: > On Sun, Sep 23, 2001 at 05:14:10PM -0700, Ben Curtis wrote: > > Do you not have dialog installed, or is it some other problem that makes it not work? > > I have the folowing version installed: > dialog version 0.3, by Savio Lam (la...@cs...). > patched to version 0.4 by Stuart Herbert (S.H...@sh...) > > I get a menu, but I cannot choose any option. pressing enter brings me > only to the same menu again. |
|
From: Patrick M. <mo...@us...> - 2001-09-24 08:08:01
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv2967
Modified Files:
configure_db
Log Message:
managing of unknown options
check if db-type exists
Index: configure_db
===================================================================
RCS file: /cvsroot/phpbt/phpbt/configure_db,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- configure_db 2001/09/23 21:20:00 1.6
+++ configure_db 2001/09/24 08:07:59 1.7
@@ -51,14 +51,18 @@
while [ $# -gt 0 ]; do
case $1
in
- '-t')
+ '-t') #database type
if [ $# -gt 1 ]; then
- DB_TYPE=$2
+ if [ -f schemas/$2.in ]; then #use only if the file exists
+ DB_TYPE=$2
+ else
+ echo "unknown database type $2"
+ fi
shift
fi
shift;;
- '-p')
+ '-p') #table prefix
if [ $# -gt 1 ]; then
TBL_PREFIX=$2
shift
@@ -68,6 +72,9 @@
'-h'|'--help')
help
exit 0;;
+
+ *) #just skip unknown options
+ shift;;
esac
done
|
|
From: Patrick M. <mai...@st...> - 2001-09-24 08:00:13
|
On Sun, Sep 23, 2001 at 05:14:10PM -0700, Ben Curtis wrote:
> Do you not have dialog installed, or is it some other problem that makes it not work?
I have the folowing version installed:
dialog version 0.3, by Savio Lam (la...@cs...).
patched to version 0.4 by Stuart Herbert (S.H...@sh...)
I get a menu, but I cannot choose any option. pressing enter brings me
only to the same menu again.
--
http://home.nikocity.de/mairif
http://caravan-network.de
ICQ# 96716515
|
|
From: Ben C. <php...@be...> - 2001-09-24 00:14:18
|
Do you not have dialog installed, or is it some other problem that makes it not work? On Sun, Sep 23, 2001 at 11:23:49PM +0200, Patrick Mairif wrote: > Hi, > > I add commandline-options to configure_db and modified configure to > use it this way. > but configure does not work on my system, so I couldn't test my > changes to the file! |
|
From: Patrick M. <mai...@st...> - 2001-09-23 21:23:25
|
Hi, I add commandline-options to configure_db and modified configure to use it this way. but configure does not work on my system, so I couldn't test my changes to the file! -- http://home.nikocity.de/mairif http://caravan-network.de ICQ# 96716515 |
|
From: Patrick M. <mo...@us...> - 2001-09-23 21:20:03
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv22478
Modified Files:
configure configure_db
Log Message:
commandline options for configure_db
no need to modify configure_db any more
Index: configure
===================================================================
RCS file: /cvsroot/phpbt/phpbt/configure,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- configure 2001/09/16 15:12:44 1.12
+++ configure 2001/09/23 21:20:00 1.13
@@ -268,12 +268,8 @@
echo "/TBL_PREFIX/s|, '.*'|, '$DB_TBL_PREFIX'|" >> $tempfile
sed -f $tempfile config.php.bak > config.php
- # Change and run the configure_db script
- cat configure_db | sed "
- /TBL_PREFIX/s/'.*'/'$DB_TBL_PREFIX'/
- /DB_TYPE/s/'.*'/'$DB_TYPE'/
- " > configure_db
- ./configure_db
+ # run the configure_db script
+ ./configure_db -t $DB_TYPE -p $DB_TBL_PREFIX
$DIALOG --backtitle "phpBT Configuration" \
--msgbox "Your changes have been saved, and your database creation file is createdb.sql" 0 0
Index: configure_db
===================================================================
RCS file: /cvsroot/phpbt/phpbt/configure_db,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- configure_db 2001/09/22 16:55:33 1.5
+++ configure_db 2001/09/23 21:20:00 1.6
@@ -8,6 +8,12 @@
DB_TYPE='mysql'
#------------------------------------------------------------------------------
+help() {
+ echo "usage $0 -h|--help"
+ echo " $0 [-t <db-type>] [-p <table-prefix>]"
+} #end help()
+
+#------------------------------------------------------------------------------
#parameters:
# $TBL_PREFIX prefix for tablenames
# $1 filename for input
@@ -38,8 +44,33 @@
s/^#\ TEMPLATE:.*$/#/
s/^--\ TEMPLATE:.*$/--/
" > $2
-}
+} #end generate_sql()
#------------------------------------------------------------------------------
+#parse commandline arguments
+while [ $# -gt 0 ]; do
+ case $1
+ in
+ '-t')
+ if [ $# -gt 1 ]; then
+ DB_TYPE=$2
+ shift
+ fi
+ shift;;
+
+ '-p')
+ if [ $# -gt 1 ]; then
+ TBL_PREFIX=$2
+ shift
+ fi
+ shift;;
+ '-h'|'--help')
+ help
+ exit 0;;
+ esac
+done
+
+#------------------------------------------------------------------------------
+#generate SQL file
generate_sql schemas/$DB_TYPE.in createdb.sql
|
|
From: Benjamin C. <bc...@us...> - 2001-09-22 16:55:36
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv10163
Modified Files:
config.php configure_db include.php
Log Message:
Added bug CCs
Index: config.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- config.php 2001/09/15 15:54:03 1.10
+++ config.php 2001/09/22 16:55:33 1.11
@@ -62,6 +62,7 @@
define ('TBL_AUTH_PERM', TBL_PREFIX.'auth_perm');
define ('TBL_AUTH_USER', TBL_PREFIX.'auth_user');
define ('TBL_BUG', TBL_PREFIX.'bug');
+define ('TBL_BUG_CC', TBL_PREFIX.'bug_cc');
define ('TBL_BUG_GROUP', TBL_PREFIX.'bug_group');
define ('TBL_BUG_HISTORY', TBL_PREFIX.'bug_history');
define ('TBL_COMMENT', TBL_PREFIX.'comment');
Index: configure_db
===================================================================
RCS file: /cvsroot/phpbt/phpbt/configure_db,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- configure_db 2001/09/15 16:22:51 1.4
+++ configure_db 2001/09/22 16:55:33 1.5
@@ -15,6 +15,7 @@
generate_sql() {
cat $1 | sed "
s/TBL_ATTACHMENT/${TBL_PREFIX}attachment/g
+ s/TBL_BUG_CC/${TBL_PREFIX}bug_cc/g
s/TBL_BUG_GROUP/${TBL_PREFIX}bug_group/g
s/TBL_BUG_HISTORY/${TBL_PREFIX}bug_history/g
s/TBL_BUG/${TBL_PREFIX}bug/g
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- include.php 2001/09/18 03:36:33 1.55
+++ include.php 2001/09/22 16:55:33 1.56
@@ -345,6 +345,20 @@
$text .= "<option value=\"{$row['user_id']}\"$sel>{$row['login']}</option>";
}
break;
+ case 'bug_cc' :
+ $q->query('select b.user_id, login from '.TBL_BUG_CC.' b left join '.
+ TBL_AUTH_USER." using(user_id) where bug_id = $value");
+ while (list($uid, $user) = $q->grab()) {
+ $text .= "<option value=\"$uid\">".maskemail($user).'</option>';
+ }
+
+ // Pad the sucker
+ $text .= '<option value="" disabled>';
+ for ($i = 0; $i < 30; $i++) {
+ $text .= ' ';
+ }
+ $text .= '</option>';
+ break;
default :
$deadarray = $select[$box];
while(list($val,$item) = each($deadarray)) {
|
|
From: Benjamin C. <bc...@us...> - 2001-09-22 16:55:36
|
Update of /cvsroot/phpbt/phpbt/templates/default
In directory usw-pr-cvs1:/tmp/cvs-serv10163/templates/default
Modified Files:
bugdisplay.html
Log Message:
Added bug CCs
Index: bugdisplay.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/bugdisplay.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- bugdisplay.html 2001/09/08 15:59:53 1.6
+++ bugdisplay.html 2001/09/22 16:55:33 1.7
@@ -86,12 +86,6 @@
</tr>
<tr>
<td valign="top" colspan="2">
- Additional Comments:
- <br>
- <br>
- <textarea name="comments" rows="10" cols="35" wrap="virtual"></textarea>
- </td>
- <td valign="top" colspan="2">
Update Bug Status:
<br>
<br>
@@ -124,15 +118,35 @@
<input type="radio" name="outcome" value="close">
Mark bug as closed<br>
<!-- END crow -->
+ </td>
+ <td valign="top" colspan="2">
+ Add CC:
+ <br>
+ <br>
+ <input type="text" name="add_cc">
+ <br>
+ <br>
+ Remove selected CCs:
<br>
<br>
+ <select name="remove_cc[]" size="5" multiple>{cclist}</select>
+ </td>
+ </tr>
+</table>
+<table border="0" cellpadding="2" cellspacing="0" width="640">
+ <tr>
+ <td valign="top">
+ Additional Comments:
+ <br>
+ <br>
+ <textarea name="comments" rows="6" cols="55" wrap="virtual"></textarea>
+ <br>
+ <br>
<div align="right">
{submit}
</div>
</td>
</tr>
-</table>
-<table border="0" cellpadding="2" cellspacing="0" width="640">
<tr>
<td>
Attachments:
|
|
From: Benjamin C. <bc...@us...> - 2001-09-22 16:55:36
|
Update of /cvsroot/phpbt/phpbt/schemas In directory usw-pr-cvs1:/tmp/cvs-serv10163/schemas Modified Files: mysql.in pgsql.in Log Message: Added bug CCs Index: mysql.in =================================================================== RCS file: /cvsroot/phpbt/phpbt/schemas/mysql.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- mysql.in 2001/09/15 16:22:13 1.1 +++ mysql.in 2001/09/22 16:55:33 1.2 @@ -90,6 +90,14 @@ PRIMARY KEY (bug_id) ) TYPE=MyISAM; +CREATE TABLE TBL_BUG_CC ( + bug_id int(10) unsigned NOT NULL default '0', + user_id int(10) unsigned NOT NULL default '0', + created_by int(10) unsigned NOT NULL default '0', + created_date bigint(20) unsigned NOT NULL default '0', + PRIMARY KEY (bug_id,user_id) +) TYPE=MyISAM; + CREATE TABLE TBL_BUG_GROUP ( bug_id int(10) unsigned NOT NULL default '0', group_id int(10) unsigned NOT NULL default '0', Index: pgsql.in =================================================================== RCS file: /cvsroot/phpbt/phpbt/schemas/pgsql.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- pgsql.in 2001/09/15 16:22:13 1.1 +++ pgsql.in 2001/09/22 16:55:33 1.2 @@ -92,6 +92,14 @@ PRIMARY KEY (bug_id) ); +CREATE TABLE TBL_BUG_CC ( + bug_id INT4 NOT NULL DEFAULT '0', + user_id INT4 NOT NULL DEFAULT '0', + created_by INT4 NOT NULL DEFAULT '0', + created_date INT8 NOT NULL DEFAULT '0', + PRIMARY KEY (bug_id,user_id) +); + CREATE TABLE TBL_BUG_GROUP ( bug_id INT4 NOT NULL DEFAULT '0', group_id INT4 NOT NULL DEFAULT '0', |
|
From: Benjamin C. <bc...@us...> - 2001-09-22 16:55:01
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv9815
Modified Files:
bug.php
Log Message:
Added CCs to bugs.
Fixed bug with bug changes being mailed when the bug edit form was submitted with no changes made.
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- bug.php 2001/09/18 03:43:45 1.44
+++ bug.php 2001/09/22 16:54:58 1.45
@@ -169,6 +169,14 @@
$maillist[] = $reporter;
if ($userid != ($cf['assigned_to'] ? $cf['assigned_to'] : $buginfo['assigned_to']))
$maillist[] = $assignedto;
+
+ // Collect the CCs
+ $q->query('select email from '.TBL_BUG_CC.' left join '.TBL_AUTH_USER.
+ " using(user_id) where bug_id = {$buginfo['bug_id']}");
+ while ($cc_email = $q->grab_field()) {
+ $maillist[] = $cc_email;
+ }
+
// Later add a watcher (such as QA person) check here
$toemail = delimit_list(', ',$maillist);
@@ -204,7 +212,8 @@
elseif ($v and substr($v,0,7) != 'http://') $v = 'http://'.$v;
$url = $v;
}
- if (stripslashes($buginfo[$k]) != stripslashes($v)) {
+ if (isset($buginfo[$k]) && stripslashes($buginfo[$k]) != stripslashes($v)
+ && $k != 'resolution_id') {
$changedfields[$k] = $v;
}
}
@@ -227,6 +236,28 @@
return;
}
+ // Add CC if specified
+ if ($add_cc) {
+ if (!$cc_uid = $q->grab_field("select user_id from ".TBL_AUTH_USER.
+ " where login = '$add_cc'")) {
+ show_bug($bugid,array('status' => $STRING['nouser']));
+ return;
+ }
+ $cc_already = $q->grab_field('select user_id from '.TBL_BUG_CC.
+ " where bug_id = $bugid and user_id = $cc_uid");
+ if (!$cc_already && $cc_uid != $buginfo['created_by']) {
+ $q->query("insert into ".TBL_BUG_CC." (bug_id, user_id, created_by,
+ created_date) values ($bugid, $cc_uid, $u, $now)");
+ }
+ }
+
+ // Remove CCs if requested
+ if (count($remove_cc)) {
+ $q->query('delete from '.TBL_BUG_CC." where bug_id = $bugid
+ and user_id in (".delimit_list(',', $remove_cc).')');
+ }
+
+ $changeresolution = false;
switch($outcome) {
case 'unchanged' : break;
case 'assign' : $assignedto = $u; $statusfield = 'Assigned'; break;
@@ -422,6 +453,7 @@
'os' => build_select('os',$row['os_id']),
'browserstring' => $row['browser_string'],
'bugresolution' => build_select('resolution'),
+ 'cclist' => build_select('bug_cc', $bugid),
'submit' => $u == 'nobody' ? $STRING['logintomodify'] :
'<input type="submit" value="Submit">'
));
|
|
From: Benjamin C. <bc...@us...> - 2001-09-19 20:18:29
|
Update of /cvsroot/phpbt/phpbt/docs/sgml In directory usw-pr-cvs1:/tmp/cvs-serv26173 Modified Files: devstandards.sgml Log Message: Slight tweaks Index: devstandards.sgml =================================================================== RCS file: /cvsroot/phpbt/phpbt/docs/sgml/devstandards.sgml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- devstandards.sgml 2001/09/19 14:21:34 1.1 +++ devstandards.sgml 2001/09/19 20:18:26 1.2 @@ -4,7 +4,7 @@ <!ENTITY phpbt "phpBugTracker"> ]> -<article id="devstandards" xreflabel="Development Standards"> +<article id="index" xreflabel="Development Standards"> <articleinfo> <title>Development Standards</title> <abstract> @@ -167,7 +167,7 @@ </sect1> - <sect1 id="devstards-otherconventions" xreflabel="Other Conventions"> + <sect1 id="otherconventions" xreflabel="Other Conventions"> <title>Other Conventions</title> <sect2 id="devstandards-filenaming" xreflabel="File Naming"> |
|
From: Benjamin C. <bc...@us...> - 2001-09-19 20:05:22
|
Update of /cvsroot/phpbt/phpbt/docs/html
In directory usw-pr-cvs1:/tmp/cvs-serv23101/html
Modified Files:
devstandards.html
Log Message:
Hmm, I guess htmltidy went medieval on the html last night
Index: devstandards.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/docs/html/devstandards.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- devstandards.html 2001/09/19 14:21:34 1.1
+++ devstandards.html 2001/09/19 20:05:19 1.2
@@ -1,36 +1,98 @@
-Development Standards This document will contain the coding and process standards to be
- followed by the developers working on phpBugTracker.
- Coding StandardsIndenting Use an indent of one tab per indent.
- Control Structures These include if, for, while, switch, etc. Here is an example if
- statement, since it is the most complicated of them:
- if ((condition1) || (condition2)) {
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <title>Development Standards</title>
+ <meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.64 ">
+ </head>
+
+ <body class="ARTICLE">
+ <div class="ARTICLE">
+ <div class="TITLEPAGE">
+ <h1 class="TITLE"><a name="AEN2">Development Standards</a></h1>
+
+ <div>
+ <div class="ABSTRACT">
+ <a name="AEN4"></a>
+
+ <p>This document will contain the coding and process standards to be followed by the developers working on phpBugTracker.</p>
+ </div>
+ </div>
+ <hr>
+ </div>
+
+ <div class="SECT1">
+ <hr>
+
+ <h1 class="SECT1"><a name="DEVSTANDARDS-CODE">Coding Standards</a></h1>
+
+ <div class="SECT2">
+ <h2 class="SECT2"><a name="DEVSTANDARDS-INDENTING">Indenting</a></h2>
+
+ <p>Use an indent of one tab per indent.</p>
+ </div>
+
+ <div class="SECT2">
+ <hr>
+
+ <h2 class="SECT2"><a name="DEVSTANDARDS-CONTROL">Control Structures</a></h2>
+
+ <p>These include if, for, while, switch, etc. Here is an example if statement, since it is the most complicated of them:</p>
+
+ <table border="0" bgcolor="#E0E0E0" width="100%">
+ <tr>
+ <td>
+<pre class="PROGRAMLISTING">
+ if ((condition1) || (condition2)) {
action1;
- } elseif ((condition3) && (condition4)) {
+ } elseif ((condition3) && (condition4)) {
action2;
} else {
defaultaction;
}
- Control statements should have one space between the control keyword
- and opening parenthesis, to distinguish them from function calls.
- You are strongly encouraged to always use curly braces even in
- situations where they are technically optional. Having them increases
- readability and decreases the likelihood of logic errors being
- introduced when new lines are added.
- Function Calls Functions should be called with no spaces between the function name,
- the opening parenthesis, and the first parameter; spaces between
- commas and each parameter, and no space between the last parameter,
- the closing parenthesis, and the semicolon. Here's an example:
- $var = foo($bar, $baz, $quux);
- As displayed above, there should be one space on either side of an
- equals sign used to assign the return value of a function to a variable.
- Function Calls Function definitions follow the format of function calls, with the
- opening brace at the end of the line of the function declaration. The
- global variable list (if used) should be placed on the line immediately
- following the opening brace, with a blank line between the variable
- list and the first line of function code. If the global variable list
- is not neccessary, include a blank line between the opening brace and
- the first line of function code.
- function fooFunction($arg1, $arg2 = '') {
+
+</pre>
+ </td>
+ </tr>
+ </table>
+
+ <p>Control statements should have one space between the control keyword and opening parenthesis, to distinguish them from function calls.</p>
+
+ <p>You are strongly encouraged to always use curly braces even in situations where they are technically optional. Having them increases readability and decreases the likelihood of logic errors being introduced when new lines are added.</p>
+ </div>
+
+ <div class="SECT2">
+ <hr>
+
+ <h2 class="SECT2"><a name="DEVSTANDARDS-FUNCCALLS">Function Calls</a></h2>
+
+ <p>Functions should be called with no spaces between the function name, the opening parenthesis, and the first parameter; spaces between commas and each parameter, and no space between the last parameter, the closing parenthesis, and the semicolon. Here's an example:</p>
+
+ <table border="0" bgcolor="#E0E0E0" width="100%">
+ <tr>
+ <td>
+<pre class="PROGRAMLISTING">
+ $var = foo($bar, $baz, $quux);
+
+</pre>
+ </td>
+ </tr>
+ </table>
+
+ <p>As displayed above, there should be one space on either side of an equals sign used to assign the return value of a function to a variable.</p>
+ </div>
+
+ <div class="SECT2">
+ <hr>
+
+ <h2 class="SECT2"><a name="DEVSTANDARDS-FUNCDEFS">Function Calls</a></h2>
+
+ <p>Function definitions follow the format of function calls, with the opening brace at the end of the line of the function declaration. The global variable list (if used) should be placed on the line immediately following the opening brace, with a blank line between the variable list and the first line of function code. If the global variable list is not neccessary, include a blank line between the opening brace and the first line of function code.</p>
+
+ <table border="0" bgcolor="#E0E0E0" width="100%">
+ <tr>
+ <td>
+<pre class="PROGRAMLISTING">
+ function fooFunction($arg1, $arg2 = '') {
global $foo1, $foo2;
if (condition) {
@@ -38,48 +100,84 @@
}
return $val;
}
- Arguments with default values go at the end of the argument list.
- Always attempt to return a meaningful value from a function if one is
- appropriate. Here is a slightly longer example:
- function connect(&$dsn, $persistent = false) {
+
+</pre>
+ </td>
+ </tr>
+ </table>
+
+ <p>Arguments with default values go at the end of the argument list. Always attempt to return a meaningful value from a function if one is appropriate. Here is a slightly longer example:</p>
+
+ <table border="0" bgcolor="#E0E0E0" width="100%">
+ <tr>
+ <td>
+<pre class="PROGRAMLISTING">
+ function connect(&$dsn, $persistent = false) {
if (is_array($dsn)) {
- $dsninfo = &$dsn;
+ $dsninfo = &$dsn;
} else {
$dsninfo = DB::parseDSN($dsn);
}
if (!$dsninfo || !$dsninfo['phptype']) {
- return $this->raiseError();
+ return $this->raiseError();
}
return true;
}
- Comments Non-documentation comments are strongly encouraged. A general rule of
- thumb is that if you look at a section of code and think "Wow, I don't
- want to try and describe that", you need to comment it before you
- forget how it works.
- Including Code Anywhere you are unconditionally including a class file, use
- require_once(). Anywhere you are
- conditionally including a class file (for example, factory methods),
- use include_once(). Either of these will
- ensure that class files are included only once. They share the same file
- list, so you don't need to worry about mixing them - a file included
- with require_once() will not be included again by
- include_once().
- PHP Tags Always use <?php ?>
- to delimit PHP code, not the <? ?>
- shorthand.
- Naming Constants Constants should always be uppercase, with underscores to separate
- words.
- Other ConventionsFile Naming File names should be all lowercase and contain no spaces. HTML files
- should have .html as the extension, and PHP files
- should have .php as the extension. Where possible,
- template files should match the name of the PHP file that will be using
- it, e. g., index.html would be the template file
- for index.php. Where one PHP file uses more than one
- templates, the templates should be similarly named:
- user.php could use
- userlist.html and userform.html
- for a list of users and editing a user, respectively.
-
\ No newline at end of file
+
+</pre>
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <div class="SECT2">
+ <hr>
+
+ <h2 class="SECT2"><a name="DEVSTANDARDS-COMMENTS">Comments</a></h2>
+
+ <p>Non-documentation comments are strongly encouraged. A general rule of thumb is that if you look at a section of code and think "Wow, I don't want to try and describe that", you need to comment it before you forget how it works.</p>
+ </div>
+
+ <div class="SECT2">
+ <hr>
+
+ <h2 class="SECT2"><a name="DEVSTANDARDS-INCLUDING">Including Code</a></h2>
+
+ <p>Anywhere you are unconditionally including a class file, use <a href="http://php.net/manual/en/html/function.require-once.html" target="_top"><tt class="FUNCTION">require_once()</tt></a>. Anywhere you are conditionally including a class file (for example, factory methods), use <a href="http://php.net/manual/en/html/function.include-once.html" target="_top"><tt class="FUNCTION">include_once()</tt></a>. Either of these will ensure that class files are included only once. They share the same file list, so you don't need to worry about mixing them - a file included with <tt class="FUNCTION">require_once()</tt> will not be included again by <tt class="FUNCTION">include_once()</tt>.</p>
+ </div>
+
+ <div class="SECT2">
+ <hr>
+
+ <h2 class="SECT2"><a name="DEVSTANDARDS-PHPTAGS">PHP Tags</a></h2>
+
+ <p>Always use <tt class="COMPUTEROUTPUT"><?php ?></tt> to delimit PHP code, not the <tt class="COMPUTEROUTPUT"><? ?></tt> shorthand.</p>
+ </div>
+
+ <div class="SECT2">
+ <hr>
+
+ <h2 class="SECT2"><a name="DEVSTANDARDS-CONSTANTS">Naming Constants</a></h2>
+
+ <p>Constants should always be uppercase, with underscores to separate words.</p>
+ </div>
+ </div>
+
+ <div class="SECT1">
+ <hr>
+
+ <h1 class="SECT1"><a name="DEVSTARDS-OTHERCONVENTIONS">Other Conventions</a></h1>
+
+ <div class="SECT2">
+ <h2 class="SECT2"><a name="DEVSTANDARDS-FILENAMING">File Naming</a></h2>
+
+ <p>File names should be all lowercase and contain no spaces. HTML files should have <tt class="FILENAME">.html</tt> as the extension, and PHP files should have <tt class="FILENAME">.php</tt> as the extension. Where possible, template files should match the name of the PHP file that will be using it, e. g., <tt class="FILENAME">index.html</tt> would be the template file for <tt class="FILENAME">index.php</tt>. Where one PHP file uses more than one templates, the templates should be similarly named: <tt class="FILENAME">user.php</tt> could use <tt class="FILENAME">userlist.html</tt> and <tt class="FILENAME">userform.html</tt> for a list of users and editing a user, respectively.</p>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
+
|
|
From: Benjamin C. <bc...@us...> - 2001-09-19 14:21:37
|
Update of /cvsroot/phpbt/phpbt/docs/html
In directory usw-pr-cvs1:/tmp/cvs-serv3435/html
Added Files:
devstandards.html
Log Message:
Beginnings of the documentation
--- NEW FILE: devstandards.html ---
Development Standards This document will contain the coding and process standards to be
followed by the developers working on phpBugTracker.
Coding StandardsIndenting Use an indent of one tab per indent.
Control Structures These include if, for, while, switch, etc. Here is an example if
statement, since it is the most complicated of them:
if ((condition1) || (condition2)) {
action1;
} elseif ((condition3) && (condition4)) {
action2;
} else {
defaultaction;
}
Control statements should have one space between the control keyword
and opening parenthesis, to distinguish them from function calls.
You are strongly encouraged to always use curly braces even in
situations where they are technically optional. Having them increases
readability and decreases the likelihood of logic errors being
introduced when new lines are added.
Function Calls Functions should be called with no spaces between the function name,
the opening parenthesis, and the first parameter; spaces between
commas and each parameter, and no space between the last parameter,
the closing parenthesis, and the semicolon. Here's an example:
$var = foo($bar, $baz, $quux);
As displayed above, there should be one space on either side of an
equals sign used to assign the return value of a function to a variable.
Function Calls Function definitions follow the format of function calls, with the
opening brace at the end of the line of the function declaration. The
global variable list (if used) should be placed on the line immediately
following the opening brace, with a blank line between the variable
list and the first line of function code. If the global variable list
is not neccessary, include a blank line between the opening brace and
the first line of function code.
function fooFunction($arg1, $arg2 = '') {
global $foo1, $foo2;
if (condition) {
statement;
}
return $val;
}
Arguments with default values go at the end of the argument list.
Always attempt to return a meaningful value from a function if one is
appropriate. Here is a slightly longer example:
function connect(&$dsn, $persistent = false) {
if (is_array($dsn)) {
$dsninfo = &$dsn;
} else {
$dsninfo = DB::parseDSN($dsn);
}
if (!$dsninfo || !$dsninfo['phptype']) {
return $this->raiseError();
}
return true;
}
Comments Non-documentation comments are strongly encouraged. A general rule of
thumb is that if you look at a section of code and think "Wow, I don't
want to try and describe that", you need to comment it before you
forget how it works.
Including Code Anywhere you are unconditionally including a class file, use
require_once(). Anywhere you are
conditionally including a class file (for example, factory methods),
use include_once(). Either of these will
ensure that class files are included only once. They share the same file
list, so you don't need to worry about mixing them - a file included
with require_once() will not be included again by
include_once().
PHP Tags Always use <?php ?>
to delimit PHP code, not the <? ?>
shorthand.
Naming Constants Constants should always be uppercase, with underscores to separate
words.
Other ConventionsFile Naming File names should be all lowercase and contain no spaces. HTML files
should have .html as the extension, and PHP files
should have .php as the extension. Where possible,
template files should match the name of the PHP file that will be using
it, e. g., index.html would be the template file
for index.php. Where one PHP file uses more than one
templates, the templates should be similarly named:
user.php could use
userlist.html and userform.html
for a list of users and editing a user, respectively.
|
|
From: Benjamin C. <bc...@us...> - 2001-09-19 14:21:37
|
Update of /cvsroot/phpbt/phpbt/docs/sgml
In directory usw-pr-cvs1:/tmp/cvs-serv3435/sgml
Added Files:
devstandards.sgml
Log Message:
Beginnings of the documentation
--- NEW FILE: devstandards.sgml ---
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
[
<!ENTITY phpbt "phpBugTracker">
]>
<article id="devstandards" xreflabel="Development Standards">
<articleinfo>
<title>Development Standards</title>
<abstract>
<para>
This document will contain the coding and process standards to be
followed by the developers working on &phpbt;.
</para>
</abstract>
</articleinfo>
<sect1 id="devstandards-code" xreflabel="Coding Standards">
<title>Coding Standards</title>
<sect2 id="devstandards-indenting" xreflabel="Indenting">
<title>Indenting</title>
<para>
Use an indent of one tab per indent.
</para>
</sect2>
<sect2 id="devstandards-control" xreflabel="Control Structures">
<title>Control Structures</title>
<para>
These include if, for, while, switch, etc. Here is an example if
statement, since it is the most complicated of them:
</para>
<programlisting>
if ((condition1) || (condition2)) {
action1;
} elseif ((condition3) && (condition4)) {
action2;
} else {
defaultaction;
}
</programlisting>
<para>
Control statements should have one space between the control keyword
and opening parenthesis, to distinguish them from function calls.
</para>
<para>
You are strongly encouraged to always use curly braces even in
situations where they are technically optional. Having them increases
readability and decreases the likelihood of logic errors being
introduced when new lines are added.
</para>
</sect2>
<sect2 id="devstandards-funccalls" xreflabel="Function Calls">
<title>Function Calls</title>
<para>
Functions should be called with no spaces between the function name,
the opening parenthesis, and the first parameter; spaces between
commas and each parameter, and no space between the last parameter,
the closing parenthesis, and the semicolon. Here's an example:
</para>
<programlisting>
$var = foo($bar, $baz, $quux);
</programlisting>
<para>
As displayed above, there should be one space on either side of an
equals sign used to assign the return value of a function to a variable.
</para>
</sect2>
<sect2 id="devstandards-funcdefs" xreflabel="Function Definitions">
<title>Function Calls</title>
<para>
Function definitions follow the format of function calls, with the
opening brace at the end of the line of the function declaration. The
global variable list (if used) should be placed on the line immediately
following the opening brace, with a blank line between the variable
list and the first line of function code. If the global variable list
is not neccessary, include a blank line between the opening brace and
the first line of function code.
</para>
<programlisting>
function fooFunction($arg1, $arg2 = '') {
global $foo1, $foo2;
if (condition) {
statement;
}
return $val;
}
</programlisting>
<para>
Arguments with default values go at the end of the argument list.
Always attempt to return a meaningful value from a function if one is
appropriate. Here is a slightly longer example:
</para>
<programlisting>
function connect(&$dsn, $persistent = false) {
if (is_array($dsn)) {
$dsninfo = &$dsn;
} else {
$dsninfo = DB::parseDSN($dsn);
}
if (!$dsninfo || !$dsninfo['phptype']) {
return $this->raiseError();
}
return true;
}
</programlisting>
</sect2>
<sect2 id="devstandards-comments" xreflabel="Comments">
<title>Comments</title>
<para>
Non-documentation comments are strongly encouraged. A general rule of
thumb is that if you look at a section of code and think "Wow, I don't
want to try and describe that", you need to comment it before you
forget how it works.
</para>
</sect2>
<sect2 id="devstandards-including" xreflabel="Including Code">
<title>Including Code</title>
<para>
Anywhere you are unconditionally including a class file, use
<ulink url="http://php.net/manual/en/html/function.require-once.html">
<function>require_once()</function></ulink>. Anywhere you are
conditionally including a class file (for example, factory methods),
use <ulink url="http://php.net/manual/en/html/function.include-once.html">
<function>include_once()</function></ulink>. Either of these will
ensure that class files are included only once. They share the same file
list, so you don't need to worry about mixing them - a file included
with <function>require_once()</function> will not be included again by
<function>include_once()</function>.
</para>
</sect2>
<sect2 id="devstandards-phptags" xreflabel="PHP Tags">
<title>PHP Tags</title>
<para>
Always use <computeroutput><![CDATA[<?php ?>]]></computeroutput>
to delimit PHP code, not the <computeroutput><![CDATA[<? ?>]]></computeroutput>
shorthand.
</para>
</sect2>
<sect2 id="devstandards-constants" xreflabel="Naming Constants">
<title>Naming Constants</title>
<para>
Constants should always be uppercase, with underscores to separate
words.
</para>
</sect2>
</sect1>
<sect1 id="devstards-otherconventions" xreflabel="Other Conventions">
<title>Other Conventions</title>
<sect2 id="devstandards-filenaming" xreflabel="File Naming">
<title>File Naming</title>
<para>
File names should be all lowercase and contain no spaces. HTML files
should have <filename>.html</filename> as the extension, and PHP files
should have <filename>.php</filename> as the extension. Where possible,
template files should match the name of the PHP file that will be using
it, e. g., <filename>index.html</filename> would be the template file
for <filename>index.php</filename>. Where one PHP file uses more than one
templates, the templates should be similarly named:
<filename>user.php</filename> could use
<filename>userlist.html</filename> and <filename>userform.html</filename>
for a list of users and editing a user, respectively.
</para>
</sect2>
</sect1>
</article>
|