Skip to content

Instantly share code, notes, and snippets.

@sminnee
Created February 9, 2010 05:28
Show Gist options
  • Select an option

  • Save sminnee/298941 to your computer and use it in GitHub Desktop.

Select an option

Save sminnee/298941 to your computer and use it in GitHub Desktop.
Index: sapphire/forms/ComplexTableField.php
===================================================================
--- sapphire/forms/ComplexTableField.php (revision 98430)
+++ sapphire/forms/ComplexTableField.php (working copy)
@@ -288,7 +288,7 @@
$output = new DataObjectSet();
foreach($this->sourceItems as $pageIndex=>$item) {
- $output->push(Object::create($this->itemClass,$item, $this, $pageStart+$pageIndex));
+ $output->push(Object::create($this->itemClass,$item, $this));
}
return $output;
}
@@ -996,17 +996,6 @@
* @subpackage fields-relational
*/
class ComplexTableField_Item extends TableListField_Item {
- /**
- * Needed to transfer pagination-status from overview.
- */
- protected $start;
-
- function __construct(DataObject $item, ComplexTableField $parent, $start) {
- $this->start = $start;
-
- parent::__construct($item, $parent);
- }
-
function Link($action = null) {
return Controller::join_links($this->parent->Link(), '/item/', $this->item->ID, $action);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment