Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki-CVS

SVN: [58726] trunk/extensions/DataCenter/Views

 

 

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded


ashley at svn

Nov 7, 2009, 10:07 AM

Post #1 of 1 (12 views)
Permalink
SVN: [58726] trunk/extensions/DataCenter/Views

http://www.mediawiki.org/wiki/Special:Code/MediaWiki/58726

Revision: 58726
Author: ashley
Date: 2009-11-07 18:07:23 +0000 (Sat, 07 Nov 2009)

Log Message:
-----------
DataCenter: coding style cleanup for Views

Modified Paths:
--------------
trunk/extensions/DataCenter/Views/Assets.php
trunk/extensions/DataCenter/Views/Facilities/Location.php
trunk/extensions/DataCenter/Views/Facilities/Space.php
trunk/extensions/DataCenter/Views/Facilities.php
trunk/extensions/DataCenter/Views/Models.php
trunk/extensions/DataCenter/Views/Overview.php
trunk/extensions/DataCenter/Views/Plans/Object.php
trunk/extensions/DataCenter/Views/Plans/Plan.php
trunk/extensions/DataCenter/Views/Plans/Rack.php
trunk/extensions/DataCenter/Views/Plans.php
trunk/extensions/DataCenter/Views/Search.php
trunk/extensions/DataCenter/Views/Settings/Field.php
trunk/extensions/DataCenter/Views/Settings.php

Modified: trunk/extensions/DataCenter/Views/Assets.php
===================================================================
--- trunk/extensions/DataCenter/Views/Assets.php 2009-11-07 18:03:57 UTC (rev 58725)
+++ trunk/extensions/DataCenter/Views/Assets.php 2009-11-07 18:07:23 UTC (rev 58726)
@@ -41,9 +41,7 @@

/* Functions */

- public function main(
- $path
- ) {
+ public function main( $path ) {
if ( !isset( self::$options[$path['type']] ) ) {
return DataCenterUI::renderWidget(
'body', array(
@@ -127,9 +125,7 @@
);
}

- public function history(
- $path
- ) {
+ public function history( $path ) {
$asset = DataCenterDB::getAsset( $path['type'], $path['id'] );
return DataCenterUI::renderLayout(
'columns',
@@ -156,9 +152,7 @@
);
}

- public function export(
- $path
- ) {
+ public function export( $path ) {
// Returns single columm layout with a table
return DataCenterUI::renderLayout(
'columns',
@@ -183,9 +177,7 @@
);
}

- public function view(
- $path
- ) {
+ public function view( $path ) {
// Checks if the user did not provide enough information
if ( !$path['id'] ) {
// Returns error message
@@ -257,9 +249,7 @@
);
}

- public function design(
- $path
- ) {
+ public function design( $path ) {
$options = DataCenterViewModels::$options[$path['type']];
if ( isset( $options['gallery'] ) ) {
// Gets all components from database
@@ -300,15 +290,11 @@
}
}

- public function deploy(
- $path
- ) {
+ public function deploy( $path ) {
return $this->manage( $path );
}

- public function manage(
- $path
- ) {
+ public function manage( $path ) {
// Checks if...
if (
// No rack asset was specified

Modified: trunk/extensions/DataCenter/Views/Facilities/Location.php
===================================================================
--- trunk/extensions/DataCenter/Views/Facilities/Location.php 2009-11-07 18:03:57 UTC (rev 58725)
+++ trunk/extensions/DataCenter/Views/Facilities/Location.php 2009-11-07 18:07:23 UTC (rev 58726)
@@ -10,9 +10,7 @@

/* Functions */

- public function main(
- $path
- ) {
+ public function main( $path ) {
// Gets all components from database
$locations = DataCenterDB::getLocations(
DataCenterDB::buildSort(
@@ -42,7 +40,7 @@
$tables[$tense] = null;
}
}
- // Returns 2 columm layout with a table and a map widget
+ // Returns 2 column layout with a table and a map widget
return DataCenterUI::renderLayout(
'columns',
array(
@@ -78,9 +76,7 @@
);
}

- public function view(
- $path
- ) {
+ public function view( $path ) {
// Checks if the user did not provide enough information
if ( !$path['id'] ) {
// Returns error message
@@ -167,15 +163,11 @@
);
}

- public function add(
- $path
- ) {
+ public function add( $path ) {
return $this->edit( $path );
}

- public function edit(
- $path
- ) {
+ public function edit( $path ) {
// Detects mode
if ( !$path['id'] ) {
// Creates a new facility location
@@ -222,7 +214,7 @@
'subject' => DataCenterUI::message( 'type', $path['type'] )
);
}
- // Builds javascript that hooks the button into the geocoder
+ // Builds JavaScript that hooks the button into the geocoder
$jsForm = 'document.form_save';
$jsOut = DataCenterJs::callFunction(
'addHandler',

Modified: trunk/extensions/DataCenter/Views/Facilities/Space.php
===================================================================
--- trunk/extensions/DataCenter/Views/Facilities/Space.php 2009-11-07 18:03:57 UTC (rev 58725)
+++ trunk/extensions/DataCenter/Views/Facilities/Space.php 2009-11-07 18:07:23 UTC (rev 58726)
@@ -10,9 +10,7 @@

/* Functions */

- public function main(
- $path
- ) {
+ public function main( $path ) {
// Gets all components from database
$spaces = DataCenterDB::getSpaces(
array_merge_recursive(
@@ -73,9 +71,7 @@
);
}

- public function view(
- $path
- ) {
+ public function view( $path ) {
// Checks if the user did not provide enough information
if ( !$path['id'] ) {
// Returns error message
@@ -178,15 +174,11 @@
);
}

- public function add(
- $path
- ) {
+ public function add( $path ) {
return $this->edit( $path );
}

- public function edit(
- $path
- ) {
+ public function edit( $path ) {
// Checks if...
if (
// No space facility was specified
@@ -246,7 +238,7 @@
'subject' => DataCenterUI::message( 'type', $path['type'] )
);
}
- // Builds javascript to access renderable facility
+ // Builds JavaScript to access renderable facility
$jsTarget = DataCenterJs::chain(
array(
"dataCenter.renderer.getTarget" =>

Modified: trunk/extensions/DataCenter/Views/Facilities.php
===================================================================
--- trunk/extensions/DataCenter/Views/Facilities.php 2009-11-07 18:03:57 UTC (rev 58725)
+++ trunk/extensions/DataCenter/Views/Facilities.php 2009-11-07 18:07:23 UTC (rev 58726)
@@ -10,12 +10,10 @@

/* Functions */

- public function history(
- $path
- ) {
+ public function history( $path ) {
if ( $path['type'] == 'location' ) {
$facility = DataCenterDB::getLocation( $path['id'] );
- } else if ( $path['type'] == 'space' ) {
+ } elseif ( $path['type'] == 'space' ) {
$facility = DataCenterDB::getSpace( $path['id'] );
} else {
return null;

Modified: trunk/extensions/DataCenter/Views/Models.php
===================================================================
--- trunk/extensions/DataCenter/Views/Models.php 2009-11-07 18:03:57 UTC (rev 58725)
+++ trunk/extensions/DataCenter/Views/Models.php 2009-11-07 18:07:23 UTC (rev 58726)
@@ -129,9 +129,7 @@

/* Functions */

- public function main(
- $path
- ) {
+ public function main( $path ) {
if ( !isset( self::$options[$path['type']] ) ) {
return 'MODELS';
}
@@ -195,9 +193,7 @@
);
}

- public function history(
- $path
- ) {
+ public function history( $path ) {
$model = DataCenterDB::getModel( $path['type'], $path['id'] );
return DataCenterUI::renderLayout(
'columns',
@@ -224,9 +220,7 @@
);
}

- public function view(
- $path
- ) {
+ public function view( $path ) {
// Checks if the user did not provide enough information
if ( !$path['id'] ) {
// Returns error message
@@ -310,9 +304,7 @@
);
}

- public function select(
- $path
- ) {
+ public function select( $path ) {
// Checks if...
if (
// There was only one parameter
@@ -369,15 +361,11 @@
}
}

- public function attach(
- $path
- ) {
+ public function attach( $path ) {
return $this->configure( $path );
}

- public function configure(
- $path
- ) {
+ public function configure( $path ) {
// Checks if...
if (
is_array( $path['parameter'] ) &&
@@ -489,15 +477,11 @@
);
}

- public function create(
- $path
- ) {
+ public function create( $path ) {
return $this->modify( $path );
}

- public function modify(
- $path
- ) {
+ public function modify( $path ) {
// Checks if the type is supported
if ( !isset( self::$options[$path['type']]['gallery'] ) ) {
// Returns error message

Modified: trunk/extensions/DataCenter/Views/Overview.php
===================================================================
--- trunk/extensions/DataCenter/Views/Overview.php 2009-11-07 18:03:57 UTC (rev 58725)
+++ trunk/extensions/DataCenter/Views/Overview.php 2009-11-07 18:07:23 UTC (rev 58726)
@@ -10,9 +10,7 @@

/* Functions */

- public function main(
- $path
- ) {
+ public function main( $path ) {
return DataCenterUI::renderLayout(
'columns',
array(

Modified: trunk/extensions/DataCenter/Views/Plans/Object.php
===================================================================
--- trunk/extensions/DataCenter/Views/Plans/Object.php 2009-11-07 18:03:57 UTC (rev 58725)
+++ trunk/extensions/DataCenter/Views/Plans/Object.php 2009-11-07 18:07:23 UTC (rev 58726)
@@ -10,9 +10,7 @@

/* Functions */

- public function view(
- $path
- ) {
+ public function view( $path ) {
// Checks if the user did not provide enough information
if ( !$path['id'] ) {
// Returns error message
@@ -105,9 +103,7 @@
);
}

- public function select(
- $path
- ) {
+ public function select( $path ) {
// Checks if...
if (
// No rack asset was specified
@@ -269,9 +265,7 @@
}
}

- public function remove(
- $path
- ) {
+ public function remove( $path ) {
// Gets link from database
$objectLink = DataCenterDB::getAssetLink( $path['id'] );
// Extracts object from link
@@ -364,15 +358,11 @@
);
}

- public function attach(
- $path
- ) {
+ public function attach( $path ) {
return $this->configure( $path );
}

- public function configure(
- $path
- ) {
+ public function configure( $path ) {
// Checks if...
if (
// No rack asset was specified

Modified: trunk/extensions/DataCenter/Views/Plans/Plan.php
===================================================================
--- trunk/extensions/DataCenter/Views/Plans/Plan.php 2009-11-07 18:03:57 UTC (rev 58725)
+++ trunk/extensions/DataCenter/Views/Plans/Plan.php 2009-11-07 18:07:23 UTC (rev 58726)
@@ -10,9 +10,7 @@

/* Functions */

- public function view(
- $path
- ) {
+ public function view( $path ) {
// Checks if the user did not provide enough information
if ( !$path['id'] ) {
// Returns error message
@@ -202,9 +200,7 @@
);
}

- public function remove(
- $path
- ) {
+ public function remove( $path ) {
// Gets link from database
$plan = DataCenterDB::getPlan( $path['id'] );
// Gets links to plan
@@ -277,15 +273,11 @@
);
}

- public function add(
- $path
- ) {
+ public function add( $path ) {
return $this->configure( $path );
}

- public function configure(
- $path
- ) {
+ public function configure( $path ) {
// Detects mode
if ( !$path['id'] ) {
if (

Modified: trunk/extensions/DataCenter/Views/Plans/Rack.php
===================================================================
--- trunk/extensions/DataCenter/Views/Plans/Rack.php 2009-11-07 18:03:57 UTC (rev 58725)
+++ trunk/extensions/DataCenter/Views/Plans/Rack.php 2009-11-07 18:07:23 UTC (rev 58726)
@@ -10,9 +10,7 @@

/* Functions */

- public function view(
- $path
- ) {
+ public function view( $path ) {
// Checks if the user did not provide enough information
if ( !$path['id'] ) {
// Returns error message
@@ -179,9 +177,7 @@
);
}

- public function select(
- $path
- ) {
+ public function select( $path ) {
// Checks if...
if (
// No rack asset was specified
@@ -321,9 +317,7 @@
}
}

- public function remove(
- $path
- ) {
+ public function remove( $path ) {
// Gets link from database
$rackLink = DataCenterDB::getAssetLink( $path['id'] );
// Extracts rack from link
@@ -407,15 +401,11 @@
);
}

- public function attach(
- $path
- ) {
+ public function attach( $path ) {
return $this->configure( $path );
}

- public function configure(
- $path
- ) {
+ public function configure( $path ) {
// Checks if...
if (
// No rack asset was specified

Modified: trunk/extensions/DataCenter/Views/Plans.php
===================================================================
--- trunk/extensions/DataCenter/Views/Plans.php 2009-11-07 18:03:57 UTC (rev 58725)
+++ trunk/extensions/DataCenter/Views/Plans.php 2009-11-07 18:07:23 UTC (rev 58726)
@@ -10,9 +10,7 @@

/* Functions */

- public function main(
- $path
- ) {
+ public function main( $path ) {
$plans = DataCenterDB::getPlans(
DataCenterDB::buildSort(
'meta', 'plan', array( 'space', 'tense DESC' )

Modified: trunk/extensions/DataCenter/Views/Search.php
===================================================================
--- trunk/extensions/DataCenter/Views/Search.php 2009-11-07 18:03:57 UTC (rev 58725)
+++ trunk/extensions/DataCenter/Views/Search.php 2009-11-07 18:07:23 UTC (rev 58726)
@@ -10,9 +10,7 @@

/* Functions */

- public function main(
- $path
- ) {
+ public function main( $path ) {
return DataCenterUI::renderLayout(
'columns',
array(
@@ -35,9 +33,7 @@
);
}

- public function results(
- $path
- ) {
+ public function results( $path ) {
return DataCenterUI::renderLayout(
'columns',
array(

Modified: trunk/extensions/DataCenter/Views/Settings/Field.php
===================================================================
--- trunk/extensions/DataCenter/Views/Settings/Field.php 2009-11-07 18:03:57 UTC (rev 58725)
+++ trunk/extensions/DataCenter/Views/Settings/Field.php 2009-11-07 18:07:23 UTC (rev 58726)
@@ -10,9 +10,7 @@

/* Functions */

- public function main(
- $path
- ) {
+ public function main( $path ) {
$metaFields = DataCenterDB::getMetaFields();
return DataCenterUI::renderLayout(
'columns',
@@ -58,9 +56,7 @@
);
}

- public function view(
- $path
- ) {
+ public function view( $path ) {
$metaField = DataCenterDB::getMetaField( $path['id'] );
return DataCenterUI::renderLayout(
'columns',
@@ -103,9 +99,7 @@
);
}

- public function remove(
- $path
- ) {
+ public function remove( $path ) {
$metaField = DataCenterDB::getMetaField( $path['id'] );
$metaFieldLinks = $metaField->getLinks();
foreach ( $metaFieldLinks as $metaFieldLink ) {
@@ -183,15 +177,11 @@
);
}

- public function add(
- $path
- ) {
+ public function add( $path ) {
return $this->configure( $path );
}

- public function configure(
- $path
- ) {
+ public function configure( $path ) {
// Detects mode
if ( !$path['id'] ) {
// Creates new component

Modified: trunk/extensions/DataCenter/Views/Settings.php
===================================================================
--- trunk/extensions/DataCenter/Views/Settings.php 2009-11-07 18:03:57 UTC (rev 58725)
+++ trunk/extensions/DataCenter/Views/Settings.php 2009-11-07 18:07:23 UTC (rev 58726)
@@ -10,9 +10,7 @@

/* Functions */

- public function main(
- $path
- ) {
+ public function main( $path ) {
return DataCenterUI::renderLayout(
'columns',
array(



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.