Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 103493 Details for
Bug 220977
Standard IP Log format automatically maintained
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
work in progress
clipboard.txt (text/plain), 10.04 KB, created by
Bjorn Freeman-Benson
on 2008-06-04 01:00:12 EDT
(
hide
)
Description:
work in progress
Filename:
MIME Type:
Creator:
Bjorn Freeman-Benson
Created:
2008-06-04 01:00:12 EDT
Size:
10.04 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P myfoundation >Index: components/portal/project_committer/project_committer.class.php >=================================================================== >RCS file: /cvsroot/foundation/myfoundation/components/portal/project_committer/project_committer.class.php,v >retrieving revision 1.21 >diff -u -r1.21 project_committer.class.php >--- components/portal/project_committer/project_committer.class.php 30 May 2008 17:32:25 -0000 1.21 >+++ components/portal/project_committer/project_committer.class.php 4 Jun 2008 04:57:57 -0000 >@@ -17,7 +17,6 @@ > public $reason; > > public $nominate_search_fields; >- public $submit_iplog_fields; > > public $website_url; > public $wiki_url; >@@ -68,11 +67,6 @@ > "to read and understand thus you should not use ephemeral urls (such as bugzilla queries); please ". > "use fixed urls to newsgroups, mailing lists, and bugs (or bug NNN or [NNN]). " ,'check'=>'req noquery') > ); >- $this->submit_iplog_fields = array ( >- 'projectid' => array( 'key' => 'projectid', 'type' => 'hidden' ), >- array( 'key' => 'reason', 'label' => 'Reason (incl project release number)', >- 'type' => 'textarea', 'check' => 'req' ) >- ); > // $this->initialize_cq_fields(); > > $this->nominate_search_fields = array( >@@ -195,12 +189,9 @@ > <li> > <a href="<?= $this->context->getActionLink("manage", $this) ?>">[manage]</a> > inactive committers on the project >- <?php if( isset($_GET['iplogurl']) ) { ?> > <li> >- <a href="<?= $this->context->getActionLink("submitip", $this, $_GET['iplogurl']) ?>">[submit]</a> >+ <a href="<?= $this->context->getActionLink("submitip", $this) ?>">[submit]</a> > ip log to Eclipse Legal for release review >- <?php >- } ?> > </ul> > <br/> > <?php >@@ -212,29 +203,13 @@ > } > > /* SUBMIT IP LOG ------------------------------------------------------------------------------ */ >- public function submitip_action( $context, $param ) { >- $this->margin_action_html('back'); >- echo "<b>Submit IP Log to Eclipse Legal</b><br> >- Submit the current >- <a href='http://www.eclipse.org/projects/ip_log.php?projectid=$param' target=_new>automatic IP log</a> >- for project<?= strpos($param,',') !== false ? 's' : '' ?> <u>$param</u> to Eclipse Legal. >- Legal will respond by email, either with additional questions, or with approval >- to hold the Release Review. >- "; >- $this->html_edit_fields($this->submit_iplog_fields, 'submit'); >- } >- >- public function submit_action() { >- $errors = $this->html_save_fields($this->submit_iplog_fields); >- if( $errors ) { >- $this->submitip_action( $this->context, $this->projectid ); >- } else { >- send_immediate_email ( $this->context, "portal/project_committer", "send_iplog_to_legal", >- $this->context->theuser->user_email_name(), $this->projectid, $this->reason, null ); >- >- $this->margin_action_html('back'); >- echo "The IP Log has been submitted to Eclipse Legal."; >- } >+ public function submitip_action() { >+ $clzname = 'ipzilla'; >+ require_once( $GLOBALS['COMPONENTS_DIRECTORY'] . "portal/$clzname/factory.php" ); >+ $factoryName = $clzname."_Factory"; >+ $factory = new $factoryName(); >+ $object = $factory->getObjectForId('submit_ip_log', $this->projectid, $this->context); >+ $this->signal_replace_component($object); > } > > /* NOMINATE COMMITTERS ------------------------------------------------------------------------------ */ >Index: components/portal/ipzilla/factory.php >=================================================================== >RCS file: /cvsroot/foundation/myfoundation/components/portal/ipzilla/factory.php,v >retrieving revision 1.4 >diff -u -r1.4 factory.php >--- components/portal/ipzilla/factory.php 30 Apr 2008 21:17:42 -0000 1.4 >+++ components/portal/ipzilla/factory.php 4 Jun 2008 04:57:57 -0000 >@@ -17,53 +17,27 @@ > require_once( $GLOBALS['CLASSES_DIRECTORY'] . "abstractfactory.class.php" ); > > class ipzilla_Factory extends abstractfactory implements IFactory { >+ >+ private function create_submit_ip_objects( $id, $context , &$rtrn){ >+ /* >+ * Manage and submit IP log >+ */ >+ if( $id != null && $context->user()->has_committer_role( $id ) ) { >+ require_once( $GLOBALS['COMPONENTS_DIRECTORY'] . "portal/ipzilla/submit_ip_log.class.php" ); >+ $rtrn[] = new submit_ip_log( $context, $id ); >+ } >+ return $rtrn; >+ } >+ > public function getObjects( $classname, $id, $context ) { >- return array(); >- >- if($id === null){ >- //***************************************** >- //TODO UNTIL THIS IS FIXED >- //***************************************** >- /* >- # [198541] >- >- $rtrn = array(); >- if( true) return $rtrn;//disable until it is tested, verified, and needed again >- >- // all projects the user is a committer or project lead, PMC member or PMC lead for >- $projects = array_of_it(foundation_sql("SELECT DISTINCT(ProjectID) as it >- FROM PeopleProjects WHERE PersonID = '" . $context->theuser->getFoundationID() . "' >- AND Relation IN ('CM','PL') >- AND InactiveDate IS NULL")); >- // plus all projects and sub-projects the user is a PMC member or lead for >- $tops = array_of_it(foundation_sql("SELECT DISTINCT(ProjectID) as it >- FROM PeopleProjects WHERE PersonID = '" . $context->theuser->getFoundationID() . "' >- AND Relation IN ('PM','PD') >- AND InactiveDate IS NULL")); >- $tops = "'" . implode("','", $tops) . "'"; >- $tmp = array_of_it(foundation_sql("SELECT DISTINCT(ProjectID) as it >- FROM Projects WHERE ParentProjectID IN ($tops) AND IsComponent = 0")); >- $projects = array_merge($projects, $tmp); >- // create components for projects that have pending ipzilla entries >- $result2 = ipzilla_sql("SELECT distinct(name) as ProjectID >- FROM bugs, components >- WHERE components.id = bugs.component_id >- AND bug_status != 'RESOLVED' >- AND components.name IN ('" . implode('\',\'', $projects) . "')" ); >- >- while( $row = mysql_fetch_assoc( $result2 )){ >- $rtrn[] = new ipzilla( $context, $row['ProjectID'] ); >- } >- return $rtrn; >- */ >- }else{ >- if( $classname != "ipzilla") >- return null; >- // We are not checking permissions because this is public information anyway >- //include("ipzilla.class.php"); >- //return new ipzilla( $context, $id); >- } >- >+ $rtrn = array(); >+ switch( $classname ) { >+ case 'submit_ip_log': return $this->create_submit_ip_objects( $id, $context, $rtrn ); >+ >+ case null: >+ $this->create_submit_ip_objects( null, $context, $rtrn ); >+ return $rtrn; >+ } > } > > public function getActiveObjects( $context ) { >Index: components/portal/ipzilla/submit_ip_log.class.php >=================================================================== >RCS file: components/portal/ipzilla/submit_ip_log.class.php >diff -N components/portal/ipzilla/submit_ip_log.class.php >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ components/portal/ipzilla/submit_ip_log.class.php 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,84 @@ >+<?php >+/******************************************************************************* >+ * Copyright (c) 2006-2008 Eclipse Foundation >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Bjorn Freeman-Benson - initial API and implementation >+ * Ward Cunningham - initial API and implementation >+ * Karl Matthias - initial API and implementation >+ * Gabe O'Brien - refactoring >+ *******************************************************************************/ >+require_once( $GLOBALS['CLASSES_DIRECTORY'] . "abstractcomponent.class.php" ); >+require_once( $GLOBALS['CLASSES_DIRECTORY'] . "functions.php" ); >+require_once( $GLOBALS['CLASSES_DIRECTORY'] . "webapi-functions.php" ); >+ >+class submit_ip_log extends AbstractComponent { >+ >+ public $context; >+ public $projectid; >+ >+ public function submit_ip_log ($context, $projectid) { >+ $this->context = $context; >+ $this->projectid = $projectid; >+ } >+ >+ public function id() { >+ return "portal/ipzilla.submit_ip_log." . $this->projectid; >+ } >+ >+ public function title() { >+ return "Manage & Submit IP Log - " . $this->projectid; >+ } >+ public function initial_height() { >+ return 10; >+ } >+ >+ public function inner_html() { >+ $this->margin_action_html('back'); >+ /* >+ * Get the latest version of the data >+ */ >+ $webapi_method = $this->context->get( "webapi-connection-function" ); >+ if(function_exists($webapi_method)) { >+ $errors = $webapi_method ( >+ "http://www.eclipse.org/projects/web-api/ip_log_data.php?projectid=" . $this->projectid, >+ $this->context, $str ); >+ if( $errors ) return $errors; >+ } else { >+ file_lock_error("ERROR: Invalid webapi method defined ($webapi_method) or correct file not sourced due to an error\n"); >+ $str = ''; >+ } >+ $data = unserialize( trim($str) ); >+ >+ ?><table><?php >+ foreach( $data[5] as $committer ) { >+ ?><tr><td><?= $committer[PID] ?></td> >+ <td><?= $committer[FName] . ' ' . $committer[LName] ?></td> >+ <td>[remove]</td> >+ </tr><tr><td style="border-bottom: thin solid black"></td> >+ <td style="border-bottom: thin solid black"><?= $committer[Name1] ?></td> >+ <td style="border-bottom: thin solid black">[comment]</td> >+ </tr><?php >+ } >+ ?></table><?php >+ >+ } >+ >+ public function back_action(){ >+ require_once( $GLOBALS['COMPONENTS_DIRECTORY'] . "portal/project_committer/project_committer.class.php" ); >+ $clzname = "project_committer"; >+ $project_committer = new $clzname($this->projectid,$this->context); >+ $this->signal_replace_component($project_committer); >+ } >+ >+ public function sort_order() { >+ return 70; >+ } >+ >+} >+ >+?>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 220977
:
100210
|
103493
|
103496