Merge branch 'master' into pulls/4.0/remove-object

This commit is contained in:
Damian Mooyman 2017-05-22 21:17:40 +12:00 committed by GitHub
commit 72e46a8fc1
4 changed files with 12 additions and 9 deletions

View File

@ -39,7 +39,8 @@ before_script:
# Install composer dependencies # Install composer dependencies
- composer install --prefer-dist - composer install --prefer-dist
- composer require --update-with-dependencies silverstripe/framework:4.0.x-dev silverstripe/siteconfig:4.0.x-dev silverstripe/config:1.0.x-dev silverstripe/admin:1.0.x-dev silverstripe/assets:1.0.x-dev silverstripe/versioned:1.0.x-dev --prefer-dist - composer require --prefer-dist --no-update symfony/config:^3.2 silverstripe/framework:4.0.x-dev silverstripe/siteconfig:4.0.x-dev silverstripe/config:1.0.x-dev silverstripe/admin:1.0.x-dev silverstripe/assets:1.0.x-dev silverstripe/versioned:1.0.x-dev
- composer update
- if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.0.x-dev --prefer-dist; fi - if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.0.x-dev --prefer-dist; fi
- if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:2.0.x-dev --prefer-dist; fi - if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:2.0.x-dev --prefer-dist; fi

View File

@ -1984,7 +1984,9 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
// This filter ensures that the ParentID dropdown selection does not show this node, // This filter ensures that the ParentID dropdown selection does not show this node,
// or its descendents, as this causes vanishing bugs // or its descendents, as this causes vanishing bugs
$parentIDField->setFilterFunction(create_function('$node', "return \$node->ID != {$this->ID};")); $parentIDField->setFilterFunction(function ($node) {
return $node->ID != $this->ID;
});
$parentTypeSelector->addExtraClass('parentTypeSelector'); $parentTypeSelector->addExtraClass('parentTypeSelector');
$tabBehaviour->setTitle(_t(__CLASS__.'.TABBEHAVIOUR', "Behavior")); $tabBehaviour->setTitle(_t(__CLASS__.'.TABBEHAVIOUR', "Behavior"));

View File

@ -210,7 +210,7 @@ class VirtualPage extends Page
"SilverStripe\\CMS\\Model\\SiteTree" "SilverStripe\\CMS\\Model\\SiteTree"
); );
// filter doesn't let you select children of virtual pages as as source page // filter doesn't let you select children of virtual pages as as source page
//$copyContentFromField->setFilterFunction(create_function('$item', 'return !($item instanceof VirtualPage);')); //$copyContentFromField->setFilterFunction(function ($item) { return !($item instanceof VirtualPage); });
// Setup virtual fields // Setup virtual fields
if ($virtualFields = $this->getVirtualFields()) { if ($virtualFields = $this->getVirtualFields()) {

View File

@ -148,12 +148,12 @@ class SearchForm extends Form
$keywords = $request->requestVar('Search'); $keywords = $request->requestVar('Search');
$andProcessor = create_function('$matches', ' $andProcessor = function ($matches) {
return " +" . $matches[2] . " +" . $matches[4] . " "; return ' +' . $matches[2] . ' +' . $matches[4] . ' ';
'); };
$notProcessor = create_function('$matches', ' $notProcessor = function ($matches) {
return " -" . $matches[3]; return ' -' . $matches[3];
'); };
$keywords = preg_replace_callback('/()("[^()"]+")( and )("[^"()]+")()/i', $andProcessor, $keywords); $keywords = preg_replace_callback('/()("[^()"]+")( and )("[^"()]+")()/i', $andProcessor, $keywords);
$keywords = preg_replace_callback('/(^| )([^() ]+)( and )([^ ()]+)( |$)/i', $andProcessor, $keywords); $keywords = preg_replace_callback('/(^| )([^() ]+)( and )([^ ()]+)( |$)/i', $andProcessor, $keywords);