MINOR Merged from trunk

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.3@79279 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
ischommer 2009-06-16 00:01:32 +00:00 committed by Sam Minnee
parent 9db2aa6377
commit 64bcb94c34
3 changed files with 21 additions and 1 deletions

View File

@ -7,6 +7,7 @@ Allow from 127.0.0.1
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /phpinstaller-2.3
RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)|(\.php$)

View File

@ -4,7 +4,7 @@ global $project;
$project = 'mysite';
global $database;
$database = "";
$database = "SS_phpinstaller_23";
require_once("conf/ConfigureFromEnv.php");
@ -12,4 +12,5 @@ require_once("conf/ConfigureFromEnv.php");
// downloaded from http://www.silverstripe.com/themes/
SSViewer::set_theme('blackcandy');
//Object::add_extension('SiteTree', 'Translatable');
?>

View File

@ -2,12 +2,30 @@
class Page extends SiteTree {
static $api_access = true;
public static $db = array(
'AdditionalProperty' => 'Text',
);
public static $has_one = array(
);
function getCMSFields() {
$fields = parent::getCMSFields();
if($this->hasExtension('Translatable')) {
$translation = $this->getTranslation(Translatable::default_locale());
$transformation = new Translatable_Transformation($translation);
$additionalField = $transformation->transformFormField(
new TextField('AdditionalProperty')
);
$fields->addFieldToTab('Root.Content.Main', $additionalField);
}
return $fields;
}
}
class Page_Controller extends ContentController {