mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 17:05:33 +02:00
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:
parent
9db2aa6377
commit
64bcb94c34
@ -7,6 +7,7 @@ Allow from 127.0.0.1
|
|||||||
|
|
||||||
<IfModule mod_rewrite.c>
|
<IfModule mod_rewrite.c>
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
|
RewriteBase /phpinstaller-2.3
|
||||||
|
|
||||||
RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)|(\.php$)
|
RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)|(\.php$)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ global $project;
|
|||||||
$project = 'mysite';
|
$project = 'mysite';
|
||||||
|
|
||||||
global $database;
|
global $database;
|
||||||
$database = "";
|
$database = "SS_phpinstaller_23";
|
||||||
|
|
||||||
require_once("conf/ConfigureFromEnv.php");
|
require_once("conf/ConfigureFromEnv.php");
|
||||||
|
|
||||||
@ -12,4 +12,5 @@ require_once("conf/ConfigureFromEnv.php");
|
|||||||
// downloaded from http://www.silverstripe.com/themes/
|
// downloaded from http://www.silverstripe.com/themes/
|
||||||
SSViewer::set_theme('blackcandy');
|
SSViewer::set_theme('blackcandy');
|
||||||
|
|
||||||
|
//Object::add_extension('SiteTree', 'Translatable');
|
||||||
?>
|
?>
|
@ -2,12 +2,30 @@
|
|||||||
|
|
||||||
class Page extends SiteTree {
|
class Page extends SiteTree {
|
||||||
|
|
||||||
|
static $api_access = true;
|
||||||
|
|
||||||
public static $db = array(
|
public static $db = array(
|
||||||
|
'AdditionalProperty' => 'Text',
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $has_one = array(
|
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 {
|
class Page_Controller extends ContentController {
|
||||||
|
Loading…
Reference in New Issue
Block a user