cvs: pearweb /public_html account-edit.php

From: Date: Sat, 31 May 2008 20:45:00 +0000
Subject: cvs: pearweb /public_html account-edit.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-7589@lists.php.net to get a copy of this message
dufuz Sat May 31 20:45:00 2008 UTC Modified files: /pearweb/public_html account-edit.php Log: remove the cvs acls code, we're not using it anymore and we have not for the longest time http://cvs.php.net/viewvc.cgi/pearweb/public_html/account-edit.php?r1=1.66&r2=1.67&diff_format=u Index: pearweb/public_html/account-edit.php diff -u pearweb/public_html/account-edit.php:1.66 pearweb/public_html/account-edit.php:1.67 --- pearweb/public_html/account-edit.php:1.66 Sat May 31 20:35:51 2008 +++ pearweb/public_html/account-edit.php Sat May 31 20:44:59 2008 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: account-edit.php,v 1.66 2008/05/31 20:35:51 dufuz Exp $ + $Id: account-edit.php,v 1.67 2008/05/31 20:44:59 dufuz Exp $ */ include_once 'HTML/QuickForm.php'; @@ -114,35 +114,6 @@ break; } - $old_acl = $dbh->getCol('SELECT path FROM cvs_acl '. - 'WHERE username = ' . "'$handle'" . ' AND access = 1', 0); - - $new_acl = preg_split("/[\r\n]+/", trim($_POST['cvs_acl'])); - - $lost_entries = array_diff($old_acl, $new_acl); - $new_entries = array_diff($new_acl, $old_acl); - - if (sizeof($lost_entries) > 0) { - $sth = $dbh->prepare("DELETE FROM cvs_acl WHERE username = ? ". - "AND path = ?"); - foreach ($lost_entries as $ent) { - $del = $dbh->affectedRows(); - $dbh->execute($sth, array($handle, $ent)); - print "Removing CVS access to " . htmlspecialchars($ent) - . " for " . htmlspecialchars($handle) . "...<br />\n"; - } - } - - if (sizeof($new_entries) > 0) { - $sth = $dbh->prepare("INSERT INTO cvs_acl (username,path,access) ". - "VALUES(?,?,?)"); - foreach ($new_entries as $ent) { - $dbh->execute($sth, array($handle, $ent, 1)); - print "Adding CVS access to " . htmlspecialchars($ent) - . " for " . htmlspecialchars($handle) . "...<br />\n"; - } - } - report_success('Your information was successfully updated.'); } @@ -193,11 +164,6 @@ $row = $dbh->getRow('SELECT * FROM users WHERE handle = ?', array($handle)); -$cvs_acl_arr = $dbh->getCol('SELECT path FROM cvs_acl' - . ' WHERE username = ? AND access = 1', 0, - array($handle)); -$cvs_acl = implode("\n", $cvs_acl_arr); - if ($row === null) { error_handler(htmlspecialchars($handle) . ' is not a valid account name.', 'Invalid Account'); @@ -241,7 +207,6 @@ 'wishlist' => htmlspecialchars($row['wishlist']), 'pgpkeyid' => htmlspecialchars($row['pgpkeyid']), 'userinfo' => htmlspecialchars($row['userinfo']), - 'cvs_acl' => htmlspecialchars($cvs_acl), 'latitude' => htmlspecialchars($row['latitude']), 'longitude' => htmlspecialchars($row['longitude']), )); @@ -256,7 +221,6 @@ . '<p class="cell_note">(Without leading 0x)</p>', array('size' => 40, 'maxlength' => 20)); $form->addElement('textarea', 'userinfo', 'Additional User Information:' . '<p class="cell_note">(limited to 255 chars)</p>', 'cols="40" rows="5"'); -$form->addElement('textarea', 'cvs_acl', 'CVS Access:', 'cols="40" rows="5"'); $form->addElement('text', 'latitude', 'Latitude Point:', 'size="40" id="latitude"'); $form->addElement('text', 'longitude', 'Longitude Point:', 'size="40" id="longitude"'); $form->addElement('static', null, '

« previous php.pear.core (#7589) next »