Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #49 from arambalakjian/3.1

Fixed non versioned ModelAdmin loading
  • Loading branch information...
commit c3cceb0e87982c8d7a2799dbc269313eac282a90 2 parents ddd904b + 782f125
Aram Balakjian authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 code/ModelAdmin/DataObjectAsPageAdmin.php
View
8 code/ModelAdmin/DataObjectAsPageAdmin.php
@@ -6,8 +6,12 @@ class DataObjectAsPageAdmin extends ModelAdmin
public function init()
{
parent::init();
-
- Versioned::reading_stage('Stage');
+
+ //if versioned we need to tell ModelAdmin to read from stage
+ if(Singleton($this->modelClass)->isVersioned)
+ {
+ Versioned::reading_stage('Stage');
+ }
//Styling for preview links and status
Requirements::CSS(MOD_DOAP_DIR . '/css/dataobjectaspageadmin.css');
}
Please sign in to comment.
Something went wrong with that request. Please try again.