Source for file trans.php
Documentation is available at trans.php
auth_require ('pear.dev');
require_once 'notes/ManualNotes.class.php';
if (isset ($_REQUEST['action'])) {
if (isset ($_GET['noteId'])) {
$noteId = (int) $_GET['noteId'];
$note = $manualNotes->getSingleCommentById ($noteId);
$package_name = is_null($package) ? 'Documentation' : $package;
$bug_type = 'Documentation Problem';
$email = $auth_user->email;
$handle = $auth_user->handle;
$sdesc = 'User note that is a documentation problem';
$ldesc = 'Manual page: ' . $note['page_url'] . "\n" .
'Note submitter:' . "\n";
if (!empty ($note['user_handle'])) {
$ldesc .= user_link ($note['user_handle'], true );
include_once 'bugs/pear-bugs-utils.php';
$ldesc .= PEAR_Bugs_Utils ::spamProtect ($note['user_name'], 'text');
$php_version = 'Irrelevant';
$reporter_name = $auth_user->name;
$args = array ($registered, $package_name, $bug_type,
$email, $handle, $sdesc, $ldesc, $php_version, $php_os, $status, $reporter_name);
$dbh->query ($sql, $args);
// TODO: add error handling
$manualNotes->deleteSingleComment ($noteId);
// TODO: add error handling
'reporter_name' => $reporter_name,
'email' => $auth_user->email ,
'package_version' => $package_version,
'php_version' => $php_version,
'package_name' => $package_name,
require 'bugs/pear-bug-accountrequest.php';
$pba = new PEAR_Bug_AccountRequest;
$pba->sendBugEmail ($emailInfos);
include dirname (__FILE__ ) . '/index.php';
if (isset ($_POST['noteIds']) && is_array($_POST['noteIds'])) {
if (isset ($_POST['pending'])) {
$notes = $manualNotes->updateCommentList ($_POST['noteIds'], 'pending');
} elseif (isset ($_POST['delete'])) {
$notes = $manualNotes->updateCommentList ($_POST['noteIds'], 'no');
$notes = PEAR ::raiseError ('Neither delete nor approve was selected');
if (PEAR ::isError ($notes)) {
$error = 'Error while making the note pending, contact webmaster';
$message = 'Comment(s) successfully ';
$message .= isset ($_POST['pending']) ? 'made pending' : 'deleted';
$_GET['status'] = 'approved';
include dirname (__FILE__ ) . '/index.php';
$error = 'Neither pending nor delete was selected';
$_GET['status'] = 'approved';
include dirname (__FILE__ ) . '/index.php';
if (isset ($_POST['url']) && !empty ($_POST['url'])) {
$pendingComments = $manualNotes->getPageComments ($_POST['url'], 'yes');
$pendingComments = $manualNotes->getPageComments ('', 'yes', true );
$url = isset ($_POST['url']) ? strip_tags($_POST['url']) : '';
require PEARWEB_TEMPLATEDIR . '/notes/note-manage-admin.tpl.php';
if (isset ($_POST['noteIds']) && is_array($_POST['noteIds'])) {
if (isset ($_POST['approve']) || isset ($_POST['undelete'])) {
$notes = $manualNotes->updateCommentList ($_POST['noteIds'], 'yes');
} elseif (isset ($_POST['delete'])) {
$notes = $manualNotes->updateCommentList ($_POST['noteIds'], 'no');
$notes = PEAR ::raiseError ('Neither delete nor un-delete nor approve was selected');
if (PEAR ::isError ($notes)) {
$error = 'Error approving the comments, contact webmaster';
$message = 'Comment(s) successfully ';
$message .= isset ($_POST['approve']) ? 'approved' : 'deleted';
if (isset ($_POST['undelete'])) {
$_GET['status'] = 'deleted';
include dirname (__FILE__ ) . '/index.php';
$error = 'Neither delete nor un-delete nor approve was selected';
if (isset ($_POST['undelete'])) {
$_GET['status'] = 'deleted';
include dirname (__FILE__ ) . '/index.php';
if (isset ($_POST['url']) && !empty ($_POST['url'])) {
$pendingComments = $manualNotes->getPageComments ($_POST['url'], 'pending');
$pendingComments = $manualNotes->getPageComments ('', 'pending', true );
$url = isset ($_POST['url']) ? strip_tags($_POST['url']) : '';
require PEARWEB_TEMPLATEDIR . '/notes/note-manage-admin.tpl.php';
response_header ('Note Administration', null , null );
report_error ('Missing action');
$res = preg_match('/^package\.[\w-]+\.([\w-]+).*\.php$/', $id, $matches);
$query = 'SELECT name FROM packages WHERE LCASE(name) = LCASE(?)';
return $dbh->getOne ($query, $package);
Documentation generated on Mon, 11 Mar 2019 16:04:26 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|