Skip to content

Instantly share code, notes, and snippets.

View sminnee's full-sized avatar

Sam Minnée sminnee

View GitHub Profile
Index: sapphire/core/model/Aggregate.php
===================================================================
--- sapphire/core/model/Aggregate.php (revision 97402)
+++ sapphire/core/model/Aggregate.php (working copy)
@@ -85,12 +85,18 @@
$attribute = $args ? $args[0] : 'ID';
$table = null;
-
- foreach (ClassInfo::ancestry($this->type, true) as $class) {
Index: themes/blackcandy/templates/Page.ss
===================================================================
--- themes/blackcandy/templates/Page.ss (revision 97920)
+++ themes/blackcandy/templates/Page.ss (working copy)
@@ -26,6 +26,7 @@
<body>
<div id="BgContainer">
<div id="Container">
+ <% cacheblock 'blackcandy_header', ID, Aggregate(SiteTree).Max(LastEdited), SiteConfig.LastEdited %>
<div id="Header">
Index: sapphire/dev/TestRunner.php
===================================================================
--- sapphire/dev/TestRunner.php (revision 98079)
+++ sapphire/dev/TestRunner.php (working copy)
@@ -300,39 +300,51 @@
return <<<HTML
<form action="$me">
<p>Enter a fixture file name to start a new test session. Don't forget to visit dev/tests/endsession when you're done!</p>
- <p>Fixture file: <input id="fixture-file" name="fixture" /></p>
+ <p>Fixture file (leave blank to start with default set-up): <input id="fixture-file" name="fixture" /></p>
Index: sapphire/core/model/DataObject.php
===================================================================
--- sapphire/core/model/DataObject.php (revision 98430)
+++ sapphire/core/model/DataObject.php (working copy)
@@ -1522,6 +1522,8 @@
}
}
+ private static $_cache_db = array();
+
Index: sapphire/core/Object.php
===================================================================
--- sapphire/core/Object.php (revision 98430)
+++ sapphire/core/Object.php (working copy)
@@ -538,11 +538,7 @@
if($extensions = self::uninherited_static($class, 'extensions')) {
foreach($extensions as $extension) {
- // an $extension value can contain parameters as a string,
- // e.g. "Versioned('Stage','Live')"
Index: sapphire/core/Object.php
===================================================================
--- sapphire/core/Object.php (revision 98430)
+++ sapphire/core/Object.php (working copy)
@@ -538,11 +538,7 @@
if($extensions = self::uninherited_static($class, 'extensions')) {
foreach($extensions as $extension) {
- // an $extension value can contain parameters as a string,
- // e.g. "Versioned('Stage','Live')"
Index: cms/code/CMSMain.php
===================================================================
--- cms/code/CMSMain.php (revision 98430)
+++ cms/code/CMSMain.php (working copy)
@@ -536,7 +536,7 @@
// DataObject::fieldExists only checks the current class, not the hierarchy
// This allows the CMS to set the correct sort value
- if($newItem->castingHelperPair('Sort')) {
+ if($newItem->castingHelper('Sort')) {
Index: sapphire/core/model/Hierarchy.php
===================================================================
--- sapphire/core/model/Hierarchy.php (revision 98430)
+++ sapphire/core/model/Hierarchy.php (working copy)
@@ -378,18 +378,6 @@
}
/**
- * Cached result for AllChildren().
- * @var DataObjectSet
Index: sapphire/forms/ComplexTableField.php
===================================================================
--- sapphire/forms/ComplexTableField.php (revision 98430)
+++ sapphire/forms/ComplexTableField.php (working copy)
@@ -996,17 +996,6 @@
* @subpackage fields-relational
*/
class ComplexTableField_Item extends TableListField_Item {
- /**
- * Needed to transfer pagination-status from overview.
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));