This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class NetwerkstattDataObjectCMSPermissionExtension extends DataExtension implements PermissionProvider { | |
/** | |
* Return a map of permission codes to add to the dropdown shown in the Security section of the CMS. | |
* array( | |
* 'VIEW_SITE' => 'View the site', | |
* ); | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class GalleryPic | |
* @todo: sync Copyright if Image has a db field for it | |
*/ | |
class GalleryPic extends DataObject implements Shortcodable | |
{ | |
private static $db = array( | |
'Title' => 'Text', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO off | |
SETLOCAL | |
IF [%1]==[] goto s_start | |
ECHO GETDATE.cmd | |
ECHO Returns the date independent of regional settings | |
ECHO Creates the environment variables %v_year% %v_month% %v_day% | |
ECHO. | |
ECHO SYNTAX | |
ECHO GETDATE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// file: mysite/code/TranslatableControllerExtension.php | |
class TranslatableControllerExtension extends Extension { | |
/** | |
* save the current controller to ensure we have access to it, | |
* this is necessary because Security crates a fake Page_Controller to render templates | |
* @var Controller | |
*/ | |
protected static $actual_current_controller; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Created by IntelliJ IDEA. | |
* User: Werner M. Krauß <[email protected]> | |
* Date: 01.12.2015 | |
* Time: 15:36 | |
*/ | |
class NetwerkstattStringFieldExtension extends Extension { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#parse("PHP File Header.php") | |
class ${NAME} extends DataObject { | |
private static \$db = array(); | |
private static \$has_one = array(); | |
private static \$has_many = array(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 6d2a7ac089e1412cf6444fcff575c8780e93a6f9 Mon Sep 17 00:00:00 2001 | |
From: Mark Guinn <[email protected]> | |
Date: Tue, 15 Mar 2016 09:58:44 +0000 | |
Subject: [PATCH 1/3] Applied 327/migrate | |
--- | |
core/Diff.php | 21 +- | |
model/connect/DBSchemaManager.php | 4 +- | |
model/fieldtypes/Double.php | 2 +- | |
model/fieldtypes/Float.php | 2 +- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Director::isLive()) { | |
$hostname = gethostname(); | |
$http_host = $_SERVER['HTTP_HOST']; | |
if (strpos($http_host, $hostname) !== false) { | |
//redirect to original domain | |
$destURL = str_replace('.' . $hostname, '', $http_host); | |
$response = new SS_HTTPResponse(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static $create_table_options = array( | |
'MySQLDatabase' => 'ENGINE=InnoDB ROW_FORMAT=COMPRESSED' | |
); | |