Skip to content

Commit

Permalink
Merge branch '3.0' into 3
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 13, 2025
2 parents 9989be2 + cce8161 commit 1cf176b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Versioned.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use SilverStripe\Core\Extension;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Core\Resettable;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Forms\FieldList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\ORM\DataList;
Expand Down Expand Up @@ -1986,7 +1985,6 @@ public function stagesDifferRecursive(): bool
* @param string $filter
* @param string $sort
* @param string $limit
* @param string $join Deprecated, use leftJoin($table, $joinClause) instead
* @return ArrayList<Versioned_Version>
*/
public function Versions($filter = "", $sort = "", $limit = "", $join = "")
Expand All @@ -2002,7 +2000,7 @@ public function Versions($filter = "", $sort = "", $limit = "", $join = "")
$oldMode = static::get_reading_mode();
static::set_stage(static::DRAFT);

$list = DataObject::get(DataObject::getSchema()->baseDataClass($owner), $filter, $sort, $join, $limit);
$list = DataObject::get(DataObject::getSchema()->baseDataClass($owner), $filter, $sort, $limit);

$query = $list->dataQuery()->query();

Expand Down Expand Up @@ -2483,7 +2481,6 @@ public static function prepopulate_versionnumber_cache($class, $stage, $idList =
* @param string $stage The name of the stage.
* @param string $filter A filter to be inserted into the WHERE clause.
* @param string $sort A sort expression to be inserted into the ORDER BY clause.
* @param string $join Deprecated, use leftJoin($table, $joinClause) instead
* @param int $limit A limit on the number of records returned from the database.
* @param string $containerClass The container class for the result set (default is DataList)
*
Expand All @@ -2494,12 +2491,11 @@ public static function get_by_stage(
$stage,
$filter = '',
$sort = '',
$join = '',
$limit = null,
$containerClass = DataList::class
) {
ReadingMode::validateStage($stage);
$result = DataObject::get($class, $filter, $sort, $join, $limit, $containerClass);
$result = DataObject::get($class, $filter, $sort, $limit, $containerClass);
return $result->setDataQueryParam([
'Versioned.mode' => 'stage',
'Versioned.stage' => $stage
Expand Down

0 comments on commit 1cf176b

Please sign in to comment.