cvs: docweb /include/rfc rfc-cron.php rfc-emails.php rfc.php /www/rfc rfc-bbcode-help.php rfc-comments-show.php rfc-overview.php
rfc-proposal-delete.php rfc-proposal-edit.php rfc-proposal-show.php rfc-vote-show.php rfc-votes-show.php

From: Date: Sun, 12 Sep 2004 07:39:02 +0000
Subject: cvs: docweb /include/rfc rfc-cron.php rfc-emails.php rfc.php /www/rfc rfc-bbcode-help.php rfc-comments-show.php rfc-overview.php
rfc-proposal-delete.php rfc-proposal-edit.php rfc-proposal-show.php rfc-vote-show.php rfc-votes-show.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-285@lists.php.net to get a copy of this message
vincent Sun Sep 12 03:39:02 2004 EDT Modified files: /docweb/include/rfc rfc-cron.php rfc-emails.php rfc.php /docweb/www/rfc rfc-bbcode-help.php rfc-comments-show.php rfc-overview.php rfc-proposal-delete.php rfc-proposal-edit.php rfc-proposal-show.php rfc-vote-show.php rfc-votes-show.php Log: Fix RFC paths # Note: this does not fix the navigation paths problems

http://cvs.php.net/diff.php/docweb/include/rfc/rfc-cron.php?r1=1.2&r2=1.3&ty=u Index: docweb/include/rfc/rfc-cron.php diff -u docweb/include/rfc/rfc-cron.php:1.2 docweb/include/rfc/rfc-cron.php:1.3 --- docweb/include/rfc/rfc-cron.php:1.2 Wed Aug 25 07:02:59 2004 +++ docweb/include/rfc/rfc-cron.php Sun Sep 12 03:39:01 2004 @@ -22,7 +22,7 @@ * @author Tobias Schlitt <toby@php.net> * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: rfc-cron.php,v 1.2 2004/08/25 11:02:59 vincent Exp $ + * @version $Id: rfc-cron.php,v 1.3 2004/09/12 07:39:01 vincent Exp $ */ /* @@ -30,8 +30,8 @@ * the system expects it to run at 4 am */ -require_once './../lib_general.inc.php'; -require_once './rfc.php'; +$path = realpath(dirname(__FILE__)); +require_once $path . '/../../include/rfc/rfc.php'; $proposals =& proposal::getAll($dbh, 'vote'); http://cvs.php.net/diff.php/docweb/include/rfc/rfc-emails.php?r1=1.1&r2=1.2&ty=u Index: docweb/include/rfc/rfc-emails.php diff -u docweb/include/rfc/rfc-emails.php:1.1 docweb/include/rfc/rfc-emails.php:1.2 --- docweb/include/rfc/rfc-emails.php:1.1 Wed Aug 18 17:25:26 2004 +++ docweb/include/rfc/rfc-emails.php Sun Sep 12 03:39:01 2004 @@ -17,7 +17,7 @@ | Authors: Vincent Gevers <vincent@php.net> | | Tobias Schlitt <toby@php.net> | +----------------------------------------------------------------------+ - $Id: rfc-emails.php,v 1.1 2004/08/18 21:25:26 vincent Exp $ + $Id: rfc-emails.php,v 1.2 2004/09/12 07:39:01 vincent Exp $ */ $proposalEmailTexts = array( @@ -77,7 +77,7 @@ 'user' => '{email_pear_dev}, {owner_name} {owner_email}' ), 'subject' => 'Proposal finished {pkg_category}::{pkg_name}', - 'text' => "PEPr has automatically finished the proposal on {pkg_category}::{pkg_name}.\n\n{vote_result}\n\nFurther details on the status of the proposal and the votes can be found here:\n{proposal_url}\n\nIf you are the person who initiated the proposal,\nplease read the 'Proposal Finished' instructions at\nhttp://pear.php.net/manual/en/newmaint.proposal.step3.php#newmaint.proposal.step3.stage4" + 'text' => "RFC has automatically finished the proposal on {pkg_category}::{pkg_name}.\n\n{vote_result}\n\nFurther details on the status of the proposal and the votes can be found here:\n{proposal_url}" ), // $proposal->sendActionEmail("edit_proposal", $_COOKIE["PEAR_USER"], $proposal); http://cvs.php.net/diff.php/docweb/include/rfc/rfc.php?r1=1.7&r2=1.8&ty=u Index: docweb/include/rfc/rfc.php diff -u docweb/include/rfc/rfc.php:1.7 docweb/include/rfc/rfc.php:1.8 --- docweb/include/rfc/rfc.php:1.7 Sun Sep 5 05:16:32 2004 +++ docweb/include/rfc/rfc.php Sun Sep 12 03:39:01 2004 @@ -24,14 +24,17 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: rfc.php,v 1.7 2004/09/05 09:16:32 vincent Exp $ + * @version $Id: rfc.php,v 1.8 2004/09/12 07:39:01 vincent Exp $ */ - + +$path = realpath(dirname(__FILE__)); + require_once 'DB.php'; require_once 'DB/storage.php'; -require_once dirname(__FILE__) . '/rfc-config.php'; +require_once $path . '/rfc-config.php'; +require_once $path . '/../../include/lib_general.inc.php'; -define('PEAR_DATABASE_DSN', 'sqlite://./../../sqlite/rfc.sqlite'); +define('PEAR_DATABASE_DSN', 'sqlite:///'.$path.'/../../sqlite/rfc.sqlite'); define('DEVBOX', false); if (empty($dbh)) { @@ -110,11 +113,10 @@ function print_tabbed_navigation($items, $no_active = false) { $page = basename($_SERVER['PHP_SELF']); - $master_url = get_resource_url(); echo '<div id="nav">' . "\n"; foreach ($items as $title => $item) { - echo '<a href="' . $master_url . 'rfc/' . $item['url'] // !!! + echo '<a href="' . $item['url'] . '" title="' . $item['title'] . '"'; if (strpos($item['url'], $page) !== false && $no_active == false) { echo ' class="active"'; http://cvs.php.net/diff.php/docweb/www/rfc/rfc-bbcode-help.php?r1=1.3&r2=1.4&ty=u Index: docweb/www/rfc/rfc-bbcode-help.php diff -u docweb/www/rfc/rfc-bbcode-help.php:1.3 docweb/www/rfc/rfc-bbcode-help.php:1.4 --- docweb/www/rfc/rfc-bbcode-help.php:1.3 Fri Aug 27 09:13:55 2004 +++ docweb/www/rfc/rfc-bbcode-help.php Sun Sep 12 03:39:02 2004 @@ -1,6 +1,7 @@ <?php -require_once '../../include/lib_general.inc.php'; +$path = realpath(dirname(__FILE__)); +require_once $path . '/../../include/rfc/rfc.php'; echo site_header('RFC :: BBCode Help'); ?> http://cvs.php.net/diff.php/docweb/www/rfc/rfc-comments-show.php?r1=1.3&r2=1.4&ty=u Index: docweb/www/rfc/rfc-comments-show.php diff -u docweb/www/rfc/rfc-comments-show.php:1.3 docweb/www/rfc/rfc-comments-show.php:1.4 --- docweb/www/rfc/rfc-comments-show.php:1.3 Tue Aug 24 07:08:42 2004 +++ docweb/www/rfc/rfc-comments-show.php Sun Sep 12 03:39:02 2004 @@ -19,14 +19,14 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: rfc-comments-show.php,v 1.3 2004/08/24 11:08:42 vincent Exp $ + * @version $Id: rfc-comments-show.php,v 1.4 2004/09/12 07:39:02 vincent Exp $ */ /** * Obtain the common functions and classes. */ -require_once '../../include/lib_general.inc.php'; -require_once '../../include/rfc/rfc.php'; +$path = realpath(dirname(__FILE__)); +require_once $path . '/../../include/rfc/rfc.php'; if (!$proposal =& proposal::get($dbh, @$_GET['id'])) { echo site_header('RFC :: Comments :: Invalid Request'); http://cvs.php.net/diff.php/docweb/www/rfc/rfc-overview.php?r1=1.6&r2=1.7&ty=u Index: docweb/www/rfc/rfc-overview.php diff -u docweb/www/rfc/rfc-overview.php:1.6 docweb/www/rfc/rfc-overview.php:1.7 --- docweb/www/rfc/rfc-overview.php:1.6 Fri Sep 10 10:24:22 2004 +++ docweb/www/rfc/rfc-overview.php Sun Sep 12 03:39:02 2004 @@ -22,14 +22,14 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: rfc-overview.php,v 1.6 2004/09/10 14:24:22 vincent Exp $ + * @version $Id: rfc-overview.php,v 1.7 2004/09/12 07:39:02 vincent Exp $ */ /** * Obtain the common functions and classes. */ -require_once '../../include/lib_general.inc.php'; -require_once '../../include/rfc/rfc.php'; +$path = realpath(dirname(__FILE__)); +require_once $path . '/../../include/rfc/rfc.php'; if (isset($_GET['filter']) && isset($proposalStatiMap[$_GET['filter']])) { $selectStatus = $_GET['filter']; http://cvs.php.net/diff.php/docweb/www/rfc/rfc-proposal-delete.php?r1=1.2&r2=1.3&ty=u Index: docweb/www/rfc/rfc-proposal-delete.php diff -u docweb/www/rfc/rfc-proposal-delete.php:1.2 docweb/www/rfc/rfc-proposal-delete.php:1.3 --- docweb/www/rfc/rfc-proposal-delete.php:1.2 Thu Aug 19 06:30:53 2004 +++ docweb/www/rfc/rfc-proposal-delete.php Sun Sep 12 03:39:02 2004 @@ -19,14 +19,14 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: rfc-proposal-delete.php,v 1.2 2004/08/19 10:30:53 vincent Exp $ + * @version $Id: rfc-proposal-delete.php,v 1.3 2004/09/12 07:39:02 vincent Exp $ */ /** * Obtain the common functions and classes. */ -require_once '../../include/lib_general.inc.php'; -require_once '../../include/rfc/rfc.php'; +$path = realpath(dirname(__FILE__)); +require_once $path . '/../../include/rfc/rfc.php'; //auth_require('pear.pepr'); // deleting is something for admins http://cvs.php.net/diff.php/docweb/www/rfc/rfc-proposal-edit.php?r1=1.9&r2=1.10&ty=u Index: docweb/www/rfc/rfc-proposal-edit.php diff -u docweb/www/rfc/rfc-proposal-edit.php:1.9 docweb/www/rfc/rfc-proposal-edit.php:1.10 --- docweb/www/rfc/rfc-proposal-edit.php:1.9 Fri Sep 10 10:24:22 2004 +++ docweb/www/rfc/rfc-proposal-edit.php Sun Sep 12 03:39:02 2004 @@ -22,14 +22,14 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: rfc-proposal-edit.php,v 1.9 2004/09/10 14:24:22 vincent Exp $ + * @version $Id: rfc-proposal-edit.php,v 1.10 2004/09/12 07:39:02 vincent Exp $ */ /** * Obtain the common functions and classes. */ -require_once '../../include/lib_general.inc.php'; -require_once '../../include/rfc/rfc.php'; +$path = realpath(dirname(__FILE__)); +require_once $path . '/../../include/rfc/rfc.php'; /** * Obtain code for Bulletin Board markup. */ @@ -63,7 +63,7 @@ $hash = substr($_GET['delete'], -32); $file = substr($_GET['delete'], 0, -32); - if (!file_exists('./../../files/' . $hash)) { + if (!file_exists($path . '/../../files/' . $hash)) { report_error('File ' . htmlspecialchars(stripslashes($file)) . ' does not exists'); } else { $proposal->pkg_filehash = str_replace('|' . $_GET['delete'], '', $proposal->pkg_filehash); @@ -74,7 +74,7 @@ $res = $dbh->query($sql); // this might need some more security - unlink('./../../files/' . $hash); + unlink($path . '/../../files/' . $hash); report_success('File ' . htmlspecialchars(stripslashes($file)) . ' deleted!'); } @@ -293,7 +293,7 @@ } else { $filehash = md5($_FILES['thefile']['name'] . time()); move_uploaded_file($_FILES['thefile']['tmp_name'], - './../../files/' . $filehash); + $path . '/../../files/' . $filehash); $proposal->pkg_filehash = $proposal->pkg_filehash . '|' . basename($_FILES['thefile']['name']) . $filehash; } http://cvs.php.net/diff.php/docweb/www/rfc/rfc-proposal-show.php?r1=1.8&r2=1.9&ty=u Index: docweb/www/rfc/rfc-proposal-show.php diff -u docweb/www/rfc/rfc-proposal-show.php:1.8 docweb/www/rfc/rfc-proposal-show.php:1.9 --- docweb/www/rfc/rfc-proposal-show.php:1.8 Fri Sep 10 15:11:47 2004 +++ docweb/www/rfc/rfc-proposal-show.php Sun Sep 12 03:39:02 2004 @@ -19,19 +19,19 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: rfc-proposal-show.php,v 1.8 2004/09/10 19:11:47 vincent Exp $ + * @version $Id: rfc-proposal-show.php,v 1.9 2004/09/12 07:39:02 vincent Exp $ */ /** * Obtain the common functions and classes. */ -require_once '../../include/rfc/rfc.php'; -require_once '../../include/lib_general.inc.php'; +$path = realpath(dirname(__FILE__)); +require_once $path . '/../../include/rfc/rfc.php'; if (isset($_GET['get']) AND !empty($_GET['get'])) { $get = basename($_GET['get']); - if (file_exists('./../../files/' . $get) && strlen($get) == 32 && + if (file_exists($path . '/../../files/' . $get) && strlen($get) == 32 && strpos($get, "..") === FALSE) { $hash = sqlite_escape_string($get); @@ -52,9 +52,9 @@ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Content-Type: octet-stream"); - header("Content-Length: " . filesize('./../../files/' . $get)); + header("Content-Length: " . filesize($path . '/../../files/' . $get)); header("Content-Disposition: attachment; filename=".stripslashes($file)); - echo file_get_contents('./../../files/' . $get); + echo file_get_contents($path . '/../../files/' . $get); exit; } exit; http://cvs.php.net/diff.php/docweb/www/rfc/rfc-vote-show.php?r1=1.3&r2=1.4&ty=u Index: docweb/www/rfc/rfc-vote-show.php diff -u docweb/www/rfc/rfc-vote-show.php:1.3 docweb/www/rfc/rfc-vote-show.php:1.4 --- docweb/www/rfc/rfc-vote-show.php:1.3 Thu Sep 2 13:39:43 2004 +++ docweb/www/rfc/rfc-vote-show.php Sun Sep 12 03:39:02 2004 @@ -19,14 +19,14 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: rfc-vote-show.php,v 1.3 2004/09/02 17:39:43 vincent Exp $ + * @version $Id: rfc-vote-show.php,v 1.4 2004/09/12 07:39:02 vincent Exp $ */ /** * Obtain the common functions and classes. */ -require_once '../../include/lib_general.inc.php'; -require_once '../../include/rfc/rfc.php'; +$path = realpath(dirname(__FILE__)); +require_once $path . '/../../include/rfc/rfc.php'; $handle = htmlspecialchars(@$_GET['handle']); http://cvs.php.net/diff.php/docweb/www/rfc/rfc-votes-show.php?r1=1.3&r2=1.4&ty=u Index: docweb/www/rfc/rfc-votes-show.php diff -u docweb/www/rfc/rfc-votes-show.php:1.3 docweb/www/rfc/rfc-votes-show.php:1.4 --- docweb/www/rfc/rfc-votes-show.php:1.3 Wed Aug 25 07:02:59 2004 +++ docweb/www/rfc/rfc-votes-show.php Sun Sep 12 03:39:02 2004 @@ -19,14 +19,14 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: rfc-votes-show.php,v 1.3 2004/08/25 11:02:59 vincent Exp $ + * @version $Id: rfc-votes-show.php,v 1.4 2004/09/12 07:39:02 vincent Exp $ */ /** * Obtain the common functions and classes. */ -require_once '../../include/lib_general.inc.php'; -require_once '../../include/rfc/rfc.php'; +$path = realpath(dirname(__FILE__)); +require_once $path . '/../../include/rfc/rfc.php'; if (!$proposal =& proposal::get($dbh, @$_GET['id'])) {
« previous php.doc.web (#285) next »