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: Benjamin C. <bc...@us...> - 2002-01-26 16:10:08
|
Update of /cvsroot/phpbt/phpbt/schemas In directory usw-pr-cvs1:/tmp/cvs-serv9428/schemas Modified Files: mysql.in pgsql.in Log Message: Added bug_vote table Index: mysql.in =================================================================== RCS file: /cvsroot/phpbt/phpbt/schemas/mysql.in,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- mysql.in 2001/12/24 20:00:49 1.13 +++ mysql.in 2002/01/26 16:10:02 1.14 @@ -109,6 +109,14 @@ created_date bigint(20) unsigned NOT NULL default '0' ) TYPE=MyISAM; +CREATE TABLE TBL_BUG_VOTE ( + user_id int(10) unsigned NOT NULL default '0', + bug_id int(10) unsigned NOT NULL default '0', + created_date bigint(20) unsigned NOT NULL default '0', + PRIMARY KEY (user_id, bug_id), + KEY bug_id (bug_id) +) TYPE=MyISAM; + CREATE TABLE TBL_COMMENT ( comment_id int(10) unsigned NOT NULL default '0', bug_id int(10) unsigned NOT NULL default '0', Index: pgsql.in =================================================================== RCS file: /cvsroot/phpbt/phpbt/schemas/pgsql.in,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- pgsql.in 2001/12/24 20:00:49 1.14 +++ pgsql.in 2002/01/26 16:10:04 1.15 @@ -113,6 +113,13 @@ created_date INT8 NOT NULL DEFAULT '0' ); +CREATE TABLE TBL_BUG_GROUP ( + user_id INT4 NOT NULL DEFAULT '0', + bug_id INT4 NOT NULL DEFAULT '0', + created_date INT8 NOT NULL DEFAULT '0', + PRIMARY KEY (user_id,bug_id) +); + CREATE TABLE TBL_COMMENT ( comment_id INT4 NOT NULL DEFAULT '0', bug_id INT4 NOT NULL DEFAULT '0', |
|
From: Benjamin C. <bc...@us...> - 2002-01-26 16:07:46
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv9102 Added Files: dbchanges.sql Log Message: Acted a little too soon on this one :) |
|
From: Ben C. <php...@be...> - 2002-01-26 14:49:04
|
Try out my last commit on include.php with the change to INSTALL_PATH and see if that works. On Mon, Dec 31, 2001 at 12:06:40PM +0100, Javier Sixto wrote: > Hi ben, > i was testing last phpbt , i have found some little bugs : > > - My provider run php with CGI apache API, when 'install.php' script > search for INSTALL_PATH, it got CGI path. > So i have changed to an other HTTP_SERVER_VARS called PATH_TRANSLATED > instead of SCRIPT_FILENAME. > it works ... but i don't know if it works for all apache configs ... i > think phpbt must try some variables and found which is working good. > > - I have installed phpbt with postgresql 7.1 > (http://phpbt.dyndns.org/phpbt-pg/), php won't connect to postgresql > until DB_HOST set to empty string. i don't know if it's a common > problem, but i report it ;-) > > > > > > > _______________________________________________ > phpbt-dev mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpbt-dev |
|
From: Benjamin C. <bc...@us...> - 2002-01-26 14:48:33
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv27665
Modified Files:
include.php install.php
Log Message:
Got this idea from phpmole
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -r1.91 -r1.92
--- include.php 2002/01/23 14:22:06 1.91
+++ include.php 2002/01/26 14:48:29 1.92
@@ -23,11 +23,7 @@
// $Id$
// Where are we?
-if (!empty($HTTP_SERVER_VARS['SCRIPT_FILENAME'])) {
- define ('INSTALL_PATH', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
-} else {
- define ('INSTALL_PATH', '.');
-}
+define ('INSTALL_PATH', dirname(__FILE__));
// Handle being included from admin files
if (!defined('INCLUDE_PATH')) {
Index: install.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/install.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- install.php 2002/01/21 08:10:05 1.9
+++ install.php 2002/01/26 14:48:29 1.10
@@ -23,7 +23,7 @@
// ------------------------------------------------------------------------
// $Id$
-define ('INSTALL_PATH', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
+define ('INSTALL_PATH', dirname(__FILE__));
if (!defined('INCLUDE_PATH')) {
define('INCLUDE_PATH', '');
|
|
From: Benjamin C. <bc...@us...> - 2002-01-26 14:21:35
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv22723
Modified Files:
query.php
Log Message:
Fixed a warning
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- query.php 2002/01/23 14:24:23 1.55
+++ query.php 2002/01/26 14:21:32 1.56
@@ -173,7 +173,7 @@
" (saved_query_id, user_id, saved_query_name, saved_query_string)
values (".$q->nextid(TBL_SAVED_QUERY).", $u, '$savedqueryname', '$savedquerystring')");
}
- if (!$order) {
+ if (!isset($order)) {
if (isset($_sv['queryinfo']['order'])) {
$order = $_sv['queryinfo']['order'];
$sort = $_sv['queryinfo']['sort'];
|
|
From: Benjamin C. <bc...@us...> - 2002-01-26 14:20:44
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv22568
Modified Files:
bug.php
Log Message:
Prevent multiple promotions
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- bug.php 2002/01/25 15:10:10 1.74
+++ bug.php 2002/01/26 14:20:40 1.75
@@ -30,25 +30,37 @@
global $u, $q, $now, $_pv, $STRING;
// Check to see if the user already voted on this bug
- if ($q->grab_field("select count(*) from ".TBL_BUG_VOTE." where bug_id = $bug_id and user_id = $u")) {
+ if ($q->grab_field("select count(*) from ".TBL_BUG_VOTE.
+ " where bug_id = $bug_id and user_id = $u")) {
show_bug($bug_id, array('vote' => $STRING['already_voted']));
return;
}
// Check whether the user has used his allotment of votes (if there is a max)
- if (MAX_USER_VOTES and $q->grab_field("select count(*) from ".TBL_BUG_VOTE." where user_id = $u") > MAX_USER_VOTES) {
+ if (MAX_USER_VOTES and $q->grab_field("select count(*) from ".TBL_BUG_VOTE.
+ " where user_id = $u") > MAX_USER_VOTES) {
show_bug($bug_id, array('vote' => $STRING['too_many_votes']));
return;
}
// Record the vote
- $q->query("insert into ".TBL_BUG_VOTE." (user_id, bug_id, created_date) values ($u, $bug_id, $now)");
+ $q->query("insert into ".TBL_BUG_VOTE." (user_id, bug_id, created_date)
+ values ($u, $bug_id, $now)");
- // If a number of votes are required to promote a bug, check for promotion
- if (PROMOTE_VOTES and $q->grab_field("select count(*) from ".TBL_BUG_VOTE." where bug_id = $bug_id") > PROMOTE_VOTES) {
- $status_id = $q->grab_field("select status_id from ".TBL_STATUS." where status_name = 'New'");
- $buginfo = $q->grab("select * from ".TBL_BUG." where bug_id = $bug_id");
- $changedfields = array('status_id' => $status_id);
- do_changedfields($u, $buginfo, $changedfields);
+ // Proceed only if promoting by votes is turned on
+ if (PROMOTE_VOTES) {
+ // Has this bug already been promoted?
+ $bug_is_new = $q->grab_field("select count(*) from ".TBL_BUG." b, ".
+ TBL_STATUS." s where bug_id = $bug_id and b.status_id = s.status_id and
+ status_name = 'New'");
+
+ // If a number of votes are required to promote a bug, check for promotion
+ if (!$bug_is_new and $q->grab_field("select count(*) from ".
+ TBL_BUG_VOTE." where bug_id = $bug_id") == PROMOTE_VOTES) {
+ $status_id = $q->grab_field("select status_id from ".TBL_STATUS." where status_name = 'New'");
+ $buginfo = $q->grab("select * from ".TBL_BUG." where bug_id = $bug_id");
+ $changedfields = array('status_id' => $status_id);
+ do_changedfields($u, $buginfo, $changedfields);
+ }
}
header("Location: bug.php?op=show&bugid=$bug_id&pos={$_pv['pos']}");
|
|
From: Benjamin C. <bc...@us...> - 2002-01-25 15:10:13
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv21799
Modified Files:
bug.php
Log Message:
Starting on the bug voting
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- bug.php 2002/01/23 14:25:24 1.73
+++ bug.php 2002/01/25 15:10:10 1.74
@@ -25,6 +25,36 @@
include 'include.php';
///
+/// Add a vote to a bug to (possibly) promote it
+function vote_bug($bug_id) {
+ global $u, $q, $now, $_pv, $STRING;
+
+ // Check to see if the user already voted on this bug
+ if ($q->grab_field("select count(*) from ".TBL_BUG_VOTE." where bug_id = $bug_id and user_id = $u")) {
+ show_bug($bug_id, array('vote' => $STRING['already_voted']));
+ return;
+ }
+ // Check whether the user has used his allotment of votes (if there is a max)
+ if (MAX_USER_VOTES and $q->grab_field("select count(*) from ".TBL_BUG_VOTE." where user_id = $u") > MAX_USER_VOTES) {
+ show_bug($bug_id, array('vote' => $STRING['too_many_votes']));
+ return;
+ }
+
+ // Record the vote
+ $q->query("insert into ".TBL_BUG_VOTE." (user_id, bug_id, created_date) values ($u, $bug_id, $now)");
+
+ // If a number of votes are required to promote a bug, check for promotion
+ if (PROMOTE_VOTES and $q->grab_field("select count(*) from ".TBL_BUG_VOTE." where bug_id = $bug_id") > PROMOTE_VOTES) {
+ $status_id = $q->grab_field("select status_id from ".TBL_STATUS." where status_name = 'New'");
+ $buginfo = $q->grab("select * from ".TBL_BUG." where bug_id = $bug_id");
+ $changedfields = array('status_id' => $status_id);
+ do_changedfields($u, $buginfo, $changedfields);
+ }
+ header("Location: bug.php?op=show&bugid=$bug_id&pos={$_pv['pos']}");
+
+}
+
+///
/// Beautify the bug comments
function format_comments($comments) {
global $me;
|
|
From: Patrick M. <mai...@st...> - 2002-01-23 18:46:23
|
On Wed, Jan 23, 2002 at 05:07:10AM -0800, Ben Curtis wrote: > What version of php are you using? phpinfo() tells: PHP Version 4.0.6 './configure' 'i386-redhat-linux' '--prefix=3D/usr' '--exec-prefix=3D/usr' '--bindir=3D/usr/bin' '--sbindir=3D/usr/sbin' '--sysconfdir=3D/etc' '--datadir=3D/usr/share' '--includedir=3D/usr/include' '--libdir=3D/usr/lib' '--libexecdir=3D/usr/libexec' '--localstatedir=3D/var' '--sharedstatedir=3D/usr/com' '--mandir=3D/usr/share/man' '--infodir=3D/usr/share/info' '--prefix=3D/usr' '--with-config-file-path=3D/etc' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-apxs=3D/usr/sbin/apxs' '--with-bz2' '--with-curl' '--with-db3' '--with-dom' '--with-exec-dir=3D/usr/bin' '--with-gd' '--with-gdbm' '--with-gettext' '--with-jpeg-dir=3D/usr' '--with-mm' '--with-openssl' '--with-png' '--with-regex=3Dsystem' '--with-ttf' '--with-zlib' '--with-layout=3DGNU' '--enable-debugger' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-yp' '--enable-wddx' '--without-mysql' '--without-unixODBC' '--without-oracle' '--without-oci8' '--with-pspell' '--with-xml' --=20 Patrick Mairif ICQ# 96716515 GPG: http://home.nikocity.de/mairif/PatrickMairif.asc |
|
From: Benjamin C. <bc...@us...> - 2002-01-23 14:46:57
|
Update of /cvsroot/phpbt/phpbt/languages In directory usw-pr-cvs1:/tmp/cvs-serv6916/languages Added Files: es.php Log Message: Spanish translation --- NEW FILE: es.php --- <?php // strings-es.php - Spanish strings and titles // ------------------------------------------------------------------------ // Copyright (c) 2001 Manuel Amador (Rudd-O) <am...@al...> // ------------------------------------------------------------------------ // This file is part of phpBugTracker // // phpBugTracker 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. // // 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. // // You should have received a copy of the GNU General Public License // along with phpBugTracker; if not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // ------------------------------------------------------------------------ // $Id: es.php,v 1.1 2002/01/23 14:46:52 bcurtis Exp $ $STRING = array( 'lang_charset' => 'iso-8859-1', 'nouser' => 'Ese usuario no existe', 'dupeofself' => 'Un error no puede ser duplicado de si mismo', 'nobug' => 'Ese error no existe', 'givesummary' => 'Por favor escriba un resumen', 'givedesc' => 'Por favor escriba una descripcion', 'noprojects' => 'No hay proyectos', 'totalbugs' => 'Total de errores', 'giveemail' => 'Por favor escriba una direccion válida de correo electronico', 'givelogin' => 'Por favor escriba un nombre de usuario', 'loginused' => 'Ese nombre de usuario está siendo utilizado', 'newacctsubject' => 'Inicio de sesion phpBugTracker', 'newacctmessage' => "Su contraseña phpBugTracker es %s", 'nobugs' => 'No hay errores', 'givename' => 'Por favor escriba un nombre', 'edit' => 'Editar', 'addnew' => 'Agregar nuevo', 'nooses' => 'No hay sistemas operativos', 'giveinitversion' => 'Por favor escriba la version inicial del proyecto', 'giveversion' => 'Por favor escriba una version', 'noversions' => 'No hay versiones', 'nocomponents' => 'No hay componentes', 'nostatuses' => 'No hay estados', 'noseverities' => 'No hay severidades', 'givepassword' => 'Por favor escriba una contraseña', 'nousers' => 'No hay usuarios', 'bugbadperm' => 'Ud. no puede modificar este error', 'bugbadnum' => 'Ese error no existe', 'datecollision' => 'Alguien actualizo este error desde la última vez. La informacion del error ha sido actualizada con los últimos cambios', 'passwordmatch' => 'Las contraseñas no coinciden. Por favor vuelva a intentar.', 'nobughistory' => 'No hay historia para ese error', 'logintomodify' => 'Para modificar este error, inicie una sesion con su nombre de usuario.', 'dupe_attachment' => 'Ese archivo ya está presente', 'give_attachment' => 'Por favor especifique un archivo a recibir', 'no_attachment_save_path' => 'No se encuentra la carpeta de archivos', 'attachment_path_not_writeable' => 'La carpeta de archivos está protegida contra escritura', 'attachment_move_error' => 'Hubo un error ubicando el archivo a la carpeta de archivos', 'bad_attachment' => 'Ese archivo no existe', 'attachment_too_large' => 'El archivo enviado excede el tamaño máximo de '.number_format(ATTACHMENT_MAX_SIZE).' bytes', 'bad_permission' => 'Esa funcion requiere privilegios administrativos que Ud. no posee', 'project_only_all_groups' => 'No se pueden elegir grupos específicos si "Todos los grupos" está seleccionado', 'previous_bug' => 'Previo', 'next_bug' => 'Siguiente' ); // Page titles $TITLE = array( 'enterbug' => 'Enviar un error', 'editbug' => 'Editar un error', 'newaccount' => 'Crear una nueva cuenta de usuario', 'bugquery' => 'Búsqueda de errores', 'buglist' => 'Lista de errores', 'addcomponent' => 'Agregar componente', 'editcomponent' => 'Editar componente', 'addproject' => 'Agregar proyecto', 'editproject' => 'Editar proyecto', 'addversion' => 'Agregar version', 'editversion' => 'Editar version', 'project' => 'Proyectos', 'os' => 'Sistemas operativos', 'resolution' => 'Soluciones', 'status' => 'Estados', 'severity' => 'Severidad', 'user' => 'Usuarios', 'home' => 'Inicio', 'reporting' => 'Reportar', 'group' => 'Grupos' ); ?> |
|
From: Benjamin C. <bc...@us...> - 2002-01-23 14:41:15
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv5604 Modified Files: index.php Log Message: Fatten the plot a little Index: index.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/index.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- index.php 2001/12/05 13:48:10 1.14 +++ index.php 2002/01/23 14:41:10 1.15 @@ -67,7 +67,7 @@ } // Create the Pie Graph. - $graph = new PieGraph(300,200,"bug_cat_summary"); + $graph = new PieGraph(350,200,"bug_cat_summary"); $graph->SetShadow(); // Set A title for the plot |
|
From: Benjamin C. <bc...@us...> - 2002-01-23 14:28:25
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv1662 Modified Files: CHANGELOG Log Message: Index: CHANGELOG =================================================================== RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- CHANGELOG 2001/12/27 14:49:42 1.40 +++ CHANGELOG 2002/01/23 14:28:20 1.41 @@ -1,3 +1,8 @@ +-- 0.7.0 -- +: Removed the requirement for register_globals = on in PHP settings. +: Added dynamic select boxes to the bug form for changing component and version + information when selecting a different project. + -- 0.6.2 -- 27 Dec 2001 : Improved compatibility with Opera and IIS. : Fixed a bug with logging in. |
|
From: Benjamin C. <bc...@us...> - 2002-01-23 14:26:13
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv990/admin
Modified Files:
project.php
Log Message:
Cleanup
Index: project.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- project.php 2001/12/07 14:18:22 1.28
+++ project.php 2002/01/23 14:26:07 1.29
@@ -208,7 +208,7 @@
if ($error) { show_project($projectid, $error); return; }
foreach ($_pv as $k => $v) $$k = $v;
- if (!$active) $active = 0;
+ if (!isset($active)) $active = 0;
if (!$projectid) {
$projectid = $q->nextid(TBL_PROJECT);
$q->query('insert into '.TBL_PROJECT
|
|
From: Benjamin C. <bc...@us...> - 2002-01-23 14:25:30
|
Update of /cvsroot/phpbt/phpbt/templates/default
In directory usw-pr-cvs1:/tmp/cvs-serv690/templates/default
Modified Files:
bugdisplay.html
Log Message:
Added js-driven select boxes for project selection
Index: bugdisplay.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/bugdisplay.html,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- bugdisplay.html 2002/01/05 20:34:52 1.14
+++ bugdisplay.html 2002/01/23 14:25:25 1.15
@@ -1,3 +1,26 @@
+<script language="JavaScript">
+<!--
+versions = new Array();
+components = new Array();
+versions['All'] = new Array(new Array('','All'));
+components['All'] = new Array(new Array('','All'));
+{js}
+
+function updateMenus(f) {
+ sel = f.project_id[f.project_id.selectedIndex].text;
+ f.version_id.length = versions[sel].length;
+ for (var x = 0; x < versions[sel].length; x++) {
+ f.version_id.options[x].value = versions[sel][x][0];
+ f.version_id.options[x].text = versions[sel][x][1];
+ }
+ f.component_id.length = components[sel].length;
+ for (var x = 0; x < components[sel].length; x++) {
+ f.component_id.options[x].value = components[sel][x][0];
+ f.component_id.options[x].text = components[sel][x][1];
+ }
+}
+//-->
+</script>
<form action="bug.php" method="post">
<input type="hidden" name="op" value="update">
<input type="hidden" name="bugid" value="{bugid}">
@@ -24,7 +47,7 @@
Product:
</td>
<td>
- <select name="project_id">{project}</select>
+ <select name="project_id" onChange="updateMenus(this.form)">{project}</select>
</td>
<td>
Component:
|
|
From: Benjamin C. <bc...@us...> - 2002-01-23 14:25:30
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv690
Modified Files:
bug.php
Log Message:
Added js-driven select boxes for project selection
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- bug.php 2002/01/05 20:34:49 1.72
+++ bug.php 2002/01/23 14:25:24 1.73
@@ -677,6 +677,7 @@
$t->parse('reopenrow','rerow',true);
break;
}
+ $t->set_var('js', build_project_js());
// Show the attachments
$q->query("select * from ".TBL_ATTACHMENT." where bug_id = $bugid");
|
|
From: Benjamin C. <bc...@us...> - 2002-01-23 14:24:26
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv32670
Modified Files:
query.php
Log Message:
Moved javascript array code to inc/functions.php for use by bug.php
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- query.php 2002/01/19 17:20:11 1.54
+++ query.php 2002/01/23 14:24:23 1.55
@@ -33,51 +33,12 @@
}
function show_query() {
- global $q, $t, $TITLE, $u, $perm, $auth;
+ global $q, $t, $TITLE, $u;
- $nq = new dbclass;
- $js = '';
-
$t->set_file('content','queryform.html');
$t->set_block('content', 'savequeryblock', 'sqblock');
$t->set_block('savequeryblock','row','rows');
- // Build the javascript-powered select boxes
- if ($perm->have_perm('Admin')) {
- $q->query("select project_id, project_name from ".TBL_PROJECT.
- " where active = 1 order by project_name");
- } else {
- $q->query('select p.project_id, project_name from '.TBL_PROJECT.
- ' p left join '.TBL_PROJECT_GROUP.' pg using(project_id)
- where active = 1 and (pg.project_id is null or pg.group_id in ('.
- delimit_list(',', $auth->auth['group_ids']).')) group by
- p.project_id, p.project_name order by project_name');
- }
- while (list($pid, $pname) = $q->grab()) {
- $pname = addslashes($pname);
- // Version array
- $js .= "versions['$pname'] = new Array(new Array('','All'),";
- $nq->query("select version_name, version_id from ".TBL_VERSION.
- " where project_id = $pid and active = 1");
- while (list($version,$vid) = $nq->grab()) {
- $version = addslashes($version);
- $js .= "new Array($vid,'$version'),";
- }
- if (substr($js,-1) == ',') $js = substr($js,0,-1);
- $js .= ");\n";
-
- // Component array
- $js .= "components['$pname'] = new Array(new Array('','All'),";
- $nq->query("select component_name, component_id from ".TBL_COMPONENT.
- " where project_id = $pid and active = 1");
- while (list($comp,$cid) = $nq->grab()) {
- $comp = addslashes($comp);
- $js .= "new Array($cid,'$comp'),";
- }
- if (substr($js,-1) == ',') $js = substr($js,0,-1);
- $js .= ");\n";
- }
-
if ($u != 'nobody') {
// Grab the saved queries if there are any
$q->query("select * from ".TBL_SAVED_QUERY." where user_id = '$u'");
@@ -99,7 +60,7 @@
}
$t->set_var(array(
- 'js' => $js,
+ 'js' => build_project_js(),
'status' => build_select('status'),
'resolution' => build_select('resolution'),
'os' => build_select('os',-1), // Prevent the OS regex selection
|
|
From: Benjamin C. <bc...@us...> - 2002-01-23 14:22:09
|
Update of /cvsroot/phpbt/phpbt/inc
In directory usw-pr-cvs1:/tmp/cvs-serv31784/inc
Added Files:
functions.php
Log Message:
Moved support functions from include.php to inc/functions.php
--- NEW FILE: functions.php ---
<?php
// functions.php - Set up global functions
// ------------------------------------------------------------------------
// Copyright (c) 2001 The phpBugTracker Group
// ------------------------------------------------------------------------
// This file is part of phpBugTracker
//
// phpBugTracker 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.
//
// 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.
//
// You should have received a copy of the GNU General Public License
// along with phpBugTracker; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// ------------------------------------------------------------------------
// $Id: functions.php,v 1.1 2002/01/23 14:22:06 bcurtis Exp $
///
/// Show text to the browser - escape hatch
function show_text($text, $iserror = false) {
global $t;
$t->set_file('content','error.html');
if (!$iserror) $t->set_var('text',$text);
else $t->set_var('text',"<font color=red>$text</font>");
}
$select['priority'] = array(
1 => '1 - Low',
2 => '2',
3 => '3 - Medium',
4 => '4',
5 => '5 - High'
);
///
/// Build a select box with the item matching $value selected
function build_select($box, $value = '', $project = 0) {
global $q, $select, $perm, $auth;
//create hash to map tablenames
$cfgDatabase = array(
'group' => TBL_AUTH_GROUP,
'project' => TBL_PROJECT,
'component' => TBL_COMPONENT,
'status' => TBL_STATUS,
'resolution' => TBL_RESOLUTION,
'severity' => TBL_SEVERITY,
'version' => TBL_VERSION
);
$text = '';
if (isset($cfgDatabase[$box])) {
$querystart = "select {$box}_id, {$box}_name from $cfgDatabase[$box]";
$queries = array(
'group' => $querystart.' where group_name <> \'User\' order by group_name',
'severity' => $querystart.' where sort_order > 0 order by sort_order',
'status' => $querystart.' where sort_order > 0 order by sort_order',
'resolution' => $querystart.' where sort_order > 0 order by sort_order',
'project' => $perm->have_perm('Admin')
? $querystart." where active > 0 order by {$box}_name"
: "select p.{$box}_id, {$box}_name from $cfgDatabase[$box] p left join ".
TBL_PROJECT_GROUP.' pg using(project_id) where active > 0
and (pg.project_id is null or pg.group_id in ('.
delimit_list(',', $auth->auth['group_ids']).')) group by
p.project_id, p.project_name order by project_name',
'component' => $querystart." where project_id = $project order by {$box}_name",
'version' => $querystart." where project_id = $project order by {$box}_id desc"
);
}
switch($box) {
case 'group' :
if ($project) { // If we are building for project admin page
if (!count($value) or (count($value) && in_array(0, $value))) {
$sel = ' selected';
} else {
$sel = '';
}
$text = "<option value=\"all\"$sel>All Groups</option>";
}
$q->query($queries[$box]);
while ($row = $q->grab()) {
if (count($value) && in_array($row[$box.'_id'], $value)) $sel = ' selected';
else $sel = '';
$text .= '<option value="'.
$row[$box.'_id']."\"$sel>".$row[$box.'_name'].'</option>';
}
break;
case 'severity' :
case 'status' :
case 'resolution' :
case 'project' :
case 'component' :
case 'version' :
$q->query($queries[$box]);
while ($row = $q->grab()) {
if ($value == $row[$box.'_id'] and $value != '') $sel = ' selected';
else $sel = '';
$text .= '<option value="'.
$row[$box.'_id']."\"$sel>".$row[$box.'_name'].'</option>';
}
break;
case 'os' :
$q->query("select {$box}_id, {$box}_name, regex from ".TBL_OS." order by sort_order");
while ($row = $q->grab()) {
if ($value == '' and isset($row['Regex']) and
preg_match($row['Regex'],$GLOBALS['HTTP_USER_AGENT'])) $sel = ' selected';
elseif ($value == $row[$box.'_id']) $sel = ' selected';
else $sel = '';
$text .= '<option value="'.
$row[$box.'_id']."\"$sel>".$row[$box.'_name']."</option>";
}
break;
case 'owner' :
$q->query("select u.user_id, login from ".TBL_AUTH_USER." u, ".TBL_USER_GROUP." ug, ".TBL_AUTH_GROUP." g where u.active > 0 and u.user_id = ug.user_id and ug.group_id = g.group_id and group_name = 'Developer' order by login");
while ($row = $q->grab()) {
if ($value == $row['user_id']) $sel = ' selected';
else $sel = '';
$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;
case 'LANGUAGE' :
$dir = opendir(INSTALL_PATH.'/'.INCLUDE_PATH.'languages');
while (false !== ($file = readdir($dir))) {
if ($file != '.' && $file != '..' && $file != 'CVS') {
$file = str_replace('.php', '', $file);
if ($file == $value) {
$sel = ' selected';
} else {
$sel = '';
}
$text .= "<option value=\"$file\"$sel>$file</option>";
}
}
break;
case 'THEME' :
$dir = opendir(INSTALL_PATH.'/'.INCLUDE_PATH.'templates');
while (false !== ($file = readdir($dir))) {
if ($file != '.' && $file != '..' && $file != 'CVS') {
$file = str_replace('.php', '', $file);
if ($file == $value) {
$sel = ' selected';
} else {
$sel = '';
}
$text .= "<option value=\"$file\"$sel>$file</option>";
}
}
break;
default :
$deadarray = $select[$box];
while(list($val,$item) = each($deadarray)) {
if ($value == $val and $value != '') $sel = ' selected';
else $sel = '';
$text .= "<option value=\"$val\"$sel>$item</option>";
}
break;
}
return $text;
}
///
/// Divide the results of a database query into multiple pages
function multipages($nr, $page, $urlstr) {
global $me, $selrange;
$pages = '';
if (!$page) $page = 1;
if ($page == 'all') {
$selrange = $nr;
$llimit = 0;
$page = 0;
} else {
#$selrange = 60;
$llimit = ($page-1)*$selrange;
}
if ($nr) $npages = ceil($nr/$selrange);
else $npages = 0;
if ($npages == 1) $pages = 1;
else {
for ($i=1; $i<=$npages; $i++) {
$pages .= $i != $page ? " <a href='$me?page=$i&$urlstr'>$i</a> " : " $i ";
$pages .= $i != $npages ? '|' : '';
}
}
return array($selrange, $llimit, $npages, $pages);
}
///
/// Sets variables in the templates for the column headers to sort database results
function sorting_headers($url, $headers, $order, $sort, $urlstr = '') {
global $t;
while(list($k, $v) = each($headers)) {
$t->set_var($k.'url', "$url?order=$v&sort=".
($order == $v ? ($sort == 'asc' ? 'desc' : 'asc') : 'asc').
($urlstr ? '&'.$urlstr : ''));
$t->set_var($k.'color', $order == $v ? '#bbbbbb' : '#eeeeee');
$t->set_var($k.'class', $order == $v ? 'head-selected' : 'head');
}
}
///
/// Generates a somewhat random pronounceable password $length letters long
/// (From zend.com user Rival7)
function genpassword($length){
srand((double)microtime()*1000000);
$vowels = array("a", "e", "i", "o", "u");
$cons = array("b", "c", "d", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "u", "v", "w", "tr", "cr", "br", "fr", "th", "dr", "ch", "ph", "wr", "st", "sp", "sw", "pr", "sl", "cl");
$password = '';
$num_vowels = count($vowels);
$num_cons = count($cons);
for($i = 0; $i < $length; $i++){
$password .= $cons[rand(0, $num_cons - 1)] . $vowels[rand(0, $num_vowels - 1)];
}
return substr($password, 0, $length);
}
///
/// Wrap text - Picked up somewhere on the net - probably zend.com
function textwrap($text, $wrap=72, $break="\n"){
$len = strlen($text);
if ($len > $wrap) {
$h = '';
$lastWhite = 0;
$lastChar = 0;
$lastBreak = 0;
while ($lastChar < $len) {
$char = substr($text, $lastChar, 1);
if (($lastChar - $lastBreak > $wrap) && ($lastWhite > $lastBreak)) {
$h .= substr($text, $lastBreak, ($lastWhite - $lastBreak)) . $break;
$lastChar = $lastWhite + 1;
$lastBreak = $lastChar;
}
/* You may wish to include other characters as valid whitespace... */
if ($char == ' ' || $char == chr(13) || $char == chr(10))
$lastWhite = $lastChar;
$lastChar = $lastChar + 1;
}
$h .= substr($text, $lastBreak);
}
else $h = $text;
return $h;
}
///
/// Return a delimited list if there is more than one element in $ary, otherwise
/// return the lone element as the list
function delimit_list($delimiter, $ary) {
if (isset($ary[1])) return join($delimiter, $ary);
elseif (isset($ary[0])) return ($ary[0]);
else return '';
}
///
/// Check the validity of an email address
/// (From zend.com user russIndr)
function valid_email($email) {
return eregi('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$', $email);
}
///
/// If the constant is set do a little email masking to make harvesting a little harder
function maskemail($email) {
global $auth;
if (HIDE_EMAIL && empty($auth->auth['uid'])) {
return '******';
} elseif (MASK_EMAIL) {
return str_replace('@', ' at ', str_replace('.', ' dot ', $email));
} else {
return $email;
}
}
///
/// Build the javascript for the dynamic project -> component -> version select boxes
function build_project_js() {
global $q, $u, $perm, $auth;
$nq = new dbclass;
$js = '';
// Build the javascript-powered select boxes
if ($perm->have_perm('Admin')) {
$q->query("select project_id, project_name from ".TBL_PROJECT.
" where active = 1 order by project_name");
} else {
$q->query('select p.project_id, project_name from '.TBL_PROJECT.
' p left join '.TBL_PROJECT_GROUP.' pg using(project_id)
where active = 1 and (pg.project_id is null or pg.group_id in ('.
delimit_list(',', $auth->auth['group_ids']).')) group by
p.project_id, p.project_name order by project_name');
}
while (list($pid, $pname) = $q->grab()) {
$pname = addslashes($pname);
// Version array
$js .= "versions['$pname'] = new Array(new Array('','All'),";
$nq->query("select version_name, version_id from ".TBL_VERSION.
" where project_id = $pid and active = 1");
while (list($version,$vid) = $nq->grab()) {
$version = addslashes($version);
$js .= "new Array($vid,'$version'),";
}
if (substr($js,-1) == ',') $js = substr($js,0,-1);
$js .= ");\n";
// Component array
$js .= "components['$pname'] = new Array(new Array('','All'),";
$nq->query("select component_name, component_id from ".TBL_COMPONENT.
" where project_id = $pid and active = 1");
while (list($comp,$cid) = $nq->grab()) {
$comp = addslashes($comp);
$js .= "new Array($cid,'$comp'),";
}
if (substr($js,-1) == ',') $js = substr($js,0,-1);
$js .= ");\n";
}
return $js;
}
|
|
From: Benjamin C. <bc...@us...> - 2002-01-23 14:22:09
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv31784
Modified Files:
include.php
Log Message:
Moved support functions from include.php to inc/functions.php
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- include.php 2002/01/16 09:43:17 1.90
+++ include.php 2002/01/23 14:22:06 1.91
@@ -1,6 +1,6 @@
<?php
-// include.php - Set up global variables and functions
+// include.php - Set up global variables
// ------------------------------------------------------------------------
// Copyright (c) 2001 The phpBugTracker Group
// ------------------------------------------------------------------------
@@ -43,6 +43,9 @@
exit();
}
+// Grab the global functions
+include (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/functions.php');
+
class dbclass extends DB_Sql {
var $classname = 'dbclass';
var $Host = DB_HOST;
@@ -134,8 +137,8 @@
$me2 = $HTTP_SERVER_VARS['REQUEST_URI'];
$selrange = 30;
$now = time();
-$_gv = &$HTTP_GET_VARS;
-$_pv = &$HTTP_POST_VARS;
+$_gv =& $HTTP_GET_VARS;
+$_pv =& $HTTP_POST_VARS;
$all_db_fields = array(
'bug_id' => 'ID',
@@ -217,288 +220,9 @@
'error' => '',
'loginerror' => '',
'template_path' => INCLUDE_PATH.'templates/'.THEME));
-
-// End classes -- Begin helper functions
-
-///
-/// Show text to the browser - escape hatch
-function show_text($text, $iserror = false) {
- global $t;
-
- $t->set_file('content','error.html');
- if (!$iserror) $t->set_var('text',$text);
- else $t->set_var('text',"<font color=red>$text</font>");
-}
-
-$select['priority'] = array(
- 1 => '1 - Low',
- 2 => '2',
- 3 => '3 - Medium',
- 4 => '4',
- 5 => '5 - High'
- );
-
-///
-/// Build a select box with the item matching $value selected
-function build_select($box, $value = '', $project = 0) {
- global $q, $select, $perm, $auth;
-
- //create hash to map tablenames
- $cfgDatabase = array(
- 'group' => TBL_AUTH_GROUP,
- 'project' => TBL_PROJECT,
- 'component' => TBL_COMPONENT,
- 'status' => TBL_STATUS,
- 'resolution' => TBL_RESOLUTION,
- 'severity' => TBL_SEVERITY,
- 'version' => TBL_VERSION
- );
-
- $text = '';
- if (isset($cfgDatabase[$box])) {
- $querystart = "select {$box}_id, {$box}_name from $cfgDatabase[$box]";
- $queries = array(
- 'group' => $querystart.' where group_name <> \'User\' order by group_name',
- 'severity' => $querystart.' where sort_order > 0 order by sort_order',
- 'status' => $querystart.' where sort_order > 0 order by sort_order',
- 'resolution' => $querystart.' where sort_order > 0 order by sort_order',
- 'project' => $perm->have_perm('Admin')
- ? $querystart." where active > 0 order by {$box}_name"
- : "select p.{$box}_id, {$box}_name from $cfgDatabase[$box] p left join ".
- TBL_PROJECT_GROUP.' pg using(project_id) where active > 0
- and (pg.project_id is null or pg.group_id in ('.
- delimit_list(',', $auth->auth['group_ids']).')) group by
- p.project_id, p.project_name order by project_name',
- 'component' => $querystart." where project_id = $project order by {$box}_name",
- 'version' => $querystart." where project_id = $project order by {$box}_id desc"
- );
- }
-
- switch($box) {
- case 'group' :
- if ($project) { // If we are building for project admin page
- if (!count($value) or (count($value) && in_array(0, $value))) {
- $sel = ' selected';
- } else {
- $sel = '';
- }
- $text = "<option value=\"all\"$sel>All Groups</option>";
- }
- $q->query($queries[$box]);
- while ($row = $q->grab()) {
- if (count($value) && in_array($row[$box.'_id'], $value)) $sel = ' selected';
- else $sel = '';
- $text .= '<option value="'.
- $row[$box.'_id']."\"$sel>".$row[$box.'_name'].'</option>';
- }
- break;
- case 'severity' :
- case 'status' :
- case 'resolution' :
- case 'project' :
- case 'component' :
- case 'version' :
- $q->query($queries[$box]);
- while ($row = $q->grab()) {
- if ($value == $row[$box.'_id'] and $value != '') $sel = ' selected';
- else $sel = '';
- $text .= '<option value="'.
- $row[$box.'_id']."\"$sel>".$row[$box.'_name'].'</option>';
- }
- break;
- case 'os' :
- $q->query("select {$box}_id, {$box}_name, regex from ".TBL_OS." order by sort_order");
- while ($row = $q->grab()) {
- if ($value == '' and isset($row['Regex']) and
- preg_match($row['Regex'],$GLOBALS['HTTP_USER_AGENT'])) $sel = ' selected';
- elseif ($value == $row[$box.'_id']) $sel = ' selected';
- else $sel = '';
- $text .= '<option value="'.
- $row[$box.'_id']."\"$sel>".$row[$box.'_name']."</option>";
- }
- break;
- case 'owner' :
- $q->query("select u.user_id, login from ".TBL_AUTH_USER." u, ".TBL_USER_GROUP." ug, ".TBL_AUTH_GROUP." g where u.active > 0 and u.user_id = ug.user_id and ug.group_id = g.group_id and group_name = 'Developer' order by login");
- while ($row = $q->grab()) {
- if ($value == $row['user_id']) $sel = ' selected';
- else $sel = '';
- $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;
- case 'LANGUAGE' :
- $dir = opendir(INSTALL_PATH.'/'.INCLUDE_PATH.'languages');
- while (false !== ($file = readdir($dir))) {
- if ($file != '.' && $file != '..' && $file != 'CVS') {
- $file = str_replace('.php', '', $file);
- if ($file == $value) {
- $sel = ' selected';
- } else {
- $sel = '';
- }
- $text .= "<option value=\"$file\"$sel>$file</option>";
- }
- }
- break;
- case 'THEME' :
- $dir = opendir(INSTALL_PATH.'/'.INCLUDE_PATH.'templates');
- while (false !== ($file = readdir($dir))) {
- if ($file != '.' && $file != '..' && $file != 'CVS') {
- $file = str_replace('.php', '', $file);
- if ($file == $value) {
- $sel = ' selected';
- } else {
- $sel = '';
- }
- $text .= "<option value=\"$file\"$sel>$file</option>";
- }
- }
- break;
- default :
- $deadarray = $select[$box];
- while(list($val,$item) = each($deadarray)) {
- if ($value == $val and $value != '') $sel = ' selected';
- else $sel = '';
- $text .= "<option value=\"$val\"$sel>$item</option>";
- }
- break;
- }
- return $text;
-}
-
-///
-/// Divide the results of a database query into multiple pages
-function multipages($nr, $page, $urlstr) {
- global $me, $selrange;
-
- $pages = '';
- if (!$page) $page = 1;
- if ($page == 'all') {
- $selrange = $nr;
- $llimit = 0;
- $page = 0;
- } else {
- #$selrange = 60;
- $llimit = ($page-1)*$selrange;
- }
- if ($nr) $npages = ceil($nr/$selrange);
- else $npages = 0;
- if ($npages == 1) $pages = 1;
- else {
- for ($i=1; $i<=$npages; $i++) {
- $pages .= $i != $page ? " <a href='$me?page=$i&$urlstr'>$i</a> " : " $i ";
- $pages .= $i != $npages ? '|' : '';
- }
- }
- return array($selrange, $llimit, $npages, $pages);
-}
-
-///
-/// Sets variables in the templates for the column headers to sort database results
-function sorting_headers($url, $headers, $order, $sort, $urlstr = '') {
- global $t;
-
- while(list($k, $v) = each($headers)) {
- $t->set_var($k.'url', "$url?order=$v&sort=".
- ($order == $v ? ($sort == 'asc' ? 'desc' : 'asc') : 'asc').
- ($urlstr ? '&'.$urlstr : ''));
- $t->set_var($k.'color', $order == $v ? '#bbbbbb' : '#eeeeee');
- $t->set_var($k.'class', $order == $v ? 'head-selected' : 'head');
- }
-}
-
-///
-/// Generates a somewhat random pronounceable password $length letters long
-/// (From zend.com user Rival7)
-function genpassword($length){
-
- srand((double)microtime()*1000000);
-
- $vowels = array("a", "e", "i", "o", "u");
- $cons = array("b", "c", "d", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "u", "v", "w", "tr", "cr", "br", "fr", "th", "dr", "ch", "ph", "wr", "st", "sp", "sw", "pr", "sl", "cl");
- $password = '';
-
- $num_vowels = count($vowels);
- $num_cons = count($cons);
-
- for($i = 0; $i < $length; $i++){
- $password .= $cons[rand(0, $num_cons - 1)] . $vowels[rand(0, $num_vowels - 1)];
- }
-
- return substr($password, 0, $length);
-}
-
-///
-/// Wrap text - Picked up somewhere on the net - probably zend.com
-function textwrap($text, $wrap=72, $break="\n"){
- $len = strlen($text);
- if ($len > $wrap) {
- $h = '';
- $lastWhite = 0;
- $lastChar = 0;
- $lastBreak = 0;
- while ($lastChar < $len) {
- $char = substr($text, $lastChar, 1);
- if (($lastChar - $lastBreak > $wrap) && ($lastWhite > $lastBreak)) {
- $h .= substr($text, $lastBreak, ($lastWhite - $lastBreak)) . $break;
- $lastChar = $lastWhite + 1;
- $lastBreak = $lastChar;
- }
- /* You may wish to include other characters as valid whitespace... */
- if ($char == ' ' || $char == chr(13) || $char == chr(10))
- $lastWhite = $lastChar;
- $lastChar = $lastChar + 1;
- }
- $h .= substr($text, $lastBreak);
- }
- else $h = $text;
- return $h;
-}
-
-///
-/// Return a delimited list if there is more than one element in $ary, otherwise
-/// return the lone element as the list
-function delimit_list($delimiter, $ary) {
- if (isset($ary[1])) return join($delimiter, $ary);
- elseif (isset($ary[0])) return ($ary[0]);
- else return '';
-}
-
-///
-/// Check the validity of an email address
-/// (From zend.com user russIndr)
-function valid_email($email) {
- return eregi('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$', $email);
-}
-
-///
-/// If the constant is set do a little email masking to make harvesting a little harder
-function maskemail($email) {
- global $auth;
-
- if (HIDE_EMAIL && empty($auth->auth['uid'])) {
- return '******';
- } elseif (MASK_EMAIL) {
- return str_replace('@', ' at ', str_replace('.', ' dot ', $email));
- } else {
- return $email;
- }
-}
+// End classes -- Begin page
-// Begin every page with a page_open
if (!defined('NO_AUTH')) {
session_start();
$_sv =& $HTTP_SESSION_VARS;
@@ -533,4 +257,4 @@
$op = isset($_gv['op']) ? $_gv['op'] : (isset($_pv['op']) ? $_pv['op'] : '');
-?>
\ No newline at end of file
+?>
|
|
From: Ben C. <php...@be...> - 2002-01-23 13:10:34
|
What version of php are you using? On Mon, Jan 21, 2002 at 06:02:30PM +0100, Patrick Mairif wrote: > well, another bug. >=20 > I just installed th bugtracker with install.php copied the new > config.php and tried to login: >=20 > Warning: Cannot use a scalar value as an array in > /home/patrick/public_html/phpbt/inc/auth.php on line 42 > =20 > Warning: Cannot use a scalar value as an array in > /home/patrick/public_html/phpbt/inc/auth.php on line 66 > =20 > Warning: Cannot use a scalar value as an array in > /home/patrick/public_html/phpbt/inc/auth.php on line 74 > =20 > Warning: Cannot use a scalar value as an array in > /home/patrick/public_html/phpbt/inc/auth.php on line 82 > =20 > Warning: Cannot use a scalar value as an array in > /home/patrick/public_html/phpbt/inc/auth.php on line 83 > =20 > Warning: Cannot use a scalar value as an array in > /home/patrick/public_html/phpbt/inc/auth.php on line 84 > =20 > Warning: Cannot use a scalar value as an array in > /home/patrick/public_html/phpbt/inc/auth.php on line 85 > =20 > Warning: Cannot use a scalar value as an array in > /home/patrick/public_html/phpbt/inc/auth.php on line 82 > =20 > Warning: Cannot use a scalar value as an array in > /home/patrick/public_html/phpbt/inc/auth.php on line 83 > =20 > Warning: Cannot use a scalar value as an array in > /home/patrick/public_html/phpbt/inc/auth.php on line 84 > =20 > Warning: Cannot use a scalar value as an array in > /home/patrick/public_html/phpbt/inc/auth.php on line 85 > =20 > Fatal error: Call to a member function on a non-object in > /home/patrick/public_html/phpbt/include.php on line 197 >=20 > ..just for info! :-) >=20 > --=20 > Patrick Mairif ICQ# 96716515 > GPG: http://home.nikocity.de/mairif/PatrickMairif.asc |
|
From: Patrick M. <mai...@st...> - 2002-01-21 17:01:56
|
well, another bug.
I just installed th bugtracker with install.php copied the new
config.php and tried to login:
Warning: Cannot use a scalar value as an array in
/home/patrick/public_html/phpbt/inc/auth.php on line 42
=20
Warning: Cannot use a scalar value as an array in
/home/patrick/public_html/phpbt/inc/auth.php on line 66
=20
Warning: Cannot use a scalar value as an array in
/home/patrick/public_html/phpbt/inc/auth.php on line 74
=20
Warning: Cannot use a scalar value as an array in
/home/patrick/public_html/phpbt/inc/auth.php on line 82
=20
Warning: Cannot use a scalar value as an array in
/home/patrick/public_html/phpbt/inc/auth.php on line 83
=20
Warning: Cannot use a scalar value as an array in
/home/patrick/public_html/phpbt/inc/auth.php on line 84
=20
Warning: Cannot use a scalar value as an array in
/home/patrick/public_html/phpbt/inc/auth.php on line 85
=20
Warning: Cannot use a scalar value as an array in
/home/patrick/public_html/phpbt/inc/auth.php on line 82
=20
Warning: Cannot use a scalar value as an array in
/home/patrick/public_html/phpbt/inc/auth.php on line 83
=20
Warning: Cannot use a scalar value as an array in
/home/patrick/public_html/phpbt/inc/auth.php on line 84
=20
Warning: Cannot use a scalar value as an array in
/home/patrick/public_html/phpbt/inc/auth.php on line 85
=20
Fatal error: Call to a member function on a non-object in
/home/patrick/public_html/phpbt/include.php on line 197
=2E.just for info! :-)
--=20
Patrick Mairif ICQ# 96716515
GPG: http://home.nikocity.de/mairif/PatrickMairif.asc
|
|
From: Patrick M. <mai...@st...> - 2002-01-21 15:05:34
|
On Mon, Jan 21, 2002 at 06:10:47AM -0800, Ben Curtis wrote: > Remember that config.php is empty in the release package now that > there is a web-based install. So if you want to get the total install > experience you should just empty out config.php. You can either leave > it writeable with no content or remove it altogether and get different > types of installation. ok, I just didn't know! :) |
|
From: Ben C. <php...@be...> - 2002-01-21 14:13:53
|
Remember that config.php is empty in the release package now that
there is a web-based install. So if you want to get the total install
experience you should just empty out config.php. You can either leave
it writeable with no content or remove it altogether and get different
types of installation.
On Mon, Jan 21, 2002 at 09:13:05AM +0100, Patrick Mairif wrote:
> I think I got it now. I defined INLUDE_PATH if it's not already done.
> but what about the "define ('DB_HOST', 'localhost');" in config.php?
>=20
> --=20
> Patrick Mairif ICQ# 96716515
> GPG: http://home.nikocity.de/mairif/PatrickMairif.asc
|
|
From: Patrick M. <mai...@st...> - 2002-01-21 08:13:21
|
I think I got it now. I defined INLUDE_PATH if it's not already done.
but what about the "define ('DB_HOST', 'localhost');" in config.php?
--=20
Patrick Mairif ICQ# 96716515
GPG: http://home.nikocity.de/mairif/PatrickMairif.asc
|
|
From: Patrick M. <mo...@us...> - 2002-01-21 08:10:08
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv865
Modified Files:
install.php
Log Message:
INCLUDE_PATH was not defined and template.php was included without use of INCLUDE_PATH
Index: install.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/install.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- install.php 2001/12/14 14:42:09 1.8
+++ install.php 2002/01/21 08:10:05 1.9
@@ -25,7 +25,11 @@
define ('INSTALL_PATH', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
-include (INSTALL_PATH.'/inc/template.php');
+if (!defined('INCLUDE_PATH')) {
+ define('INCLUDE_PATH', '');
+}
+
+include (INSTALL_PATH.'/'.INCLUDE_PATH.'/inc/template.php');
$t = new Template('templates/default', 'keep');
$t->set_var('me', $HTTP_SERVER_VARS['PHP_SELF']);
$_gv =& $HTTP_GET_VARS;
|
|
From: Patrick M. <mai...@st...> - 2002-01-21 08:00:04
|
Fatal error: Failed opening required '/home/patrick/public_html/phpbt/INCLUDE_PATHinc/db/mysql.php' (include_path='.:/php/includes:/usr/share/php') in /home/patrick/public_html/phpbt/config.php on line 64 It seems that INCLUDE_PATH is not defined, and it really isn't! INSTALL_PATH is defined in install.php, but not INCLUDE_PATH! -- Patrick Mairif ICQ# 96716515 GPG: http://home.nikocity.de/mairif/PatrickMairif.asc |
|
From: Patrick M. <mai...@st...> - 2002-01-21 07:47:05
|
On Sun, Jan 20, 2002 at 07:59:05PM -0800, Ben Curtis wrote:
> You need to make sure DB_HOST isn't being defined in config.php if you
> want to do the install.
line 47 in config.php unchanged from cvs:
define ('DB_HOST', 'localhost');
it seems this variable is already defined!
when comment this line out, the page is forwarded to install.php,
fine! but this page is empty, too!
--
Patrick Mairif ICQ# 96716515
GPG: http://home.nikocity.de/mairif/PatrickMairif.asc
|