mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge branch '3.4' into 3.5
This commit is contained in:
commit
5a6f784e42
@ -61,16 +61,16 @@ class SS_ClassManifest {
|
|||||||
public static function get_namespaced_class_parser() {
|
public static function get_namespaced_class_parser() {
|
||||||
return new TokenisedRegularExpression(array(
|
return new TokenisedRegularExpression(array(
|
||||||
0 => T_CLASS,
|
0 => T_CLASS,
|
||||||
1 => T_WHITESPACE,
|
1 => array(T_WHITESPACE, 'optional' => true),
|
||||||
2 => array(T_STRING, 'can_jump_to' => array(8, 16), 'save_to' => 'className'),
|
2 => array(T_STRING, 'can_jump_to' => array(8, 16), 'save_to' => 'className'),
|
||||||
3 => T_WHITESPACE,
|
3 => array(T_WHITESPACE, 'optional' => true),
|
||||||
4 => T_EXTENDS,
|
4 => T_EXTENDS,
|
||||||
5 => T_WHITESPACE,
|
5 => array(T_WHITESPACE, 'optional' => true),
|
||||||
6 => array(T_NS_SEPARATOR, 'save_to' => 'extends[]', 'optional' => true),
|
6 => array(T_NS_SEPARATOR, 'save_to' => 'extends[]', 'optional' => true),
|
||||||
7 => array(T_STRING, 'save_to' => 'extends[]', 'can_jump_to' => array(6, 16)),
|
7 => array(T_STRING, 'save_to' => 'extends[]', 'can_jump_to' => array(6, 16)),
|
||||||
8 => T_WHITESPACE,
|
8 => array(T_WHITESPACE, 'optional' => true),
|
||||||
9 => T_IMPLEMENTS,
|
9 => T_IMPLEMENTS,
|
||||||
10 => T_WHITESPACE,
|
10 => array(T_WHITESPACE, 'optional' => true),
|
||||||
11 => array(T_NS_SEPARATOR, 'save_to' => 'interfaces[]', 'optional' => true),
|
11 => array(T_NS_SEPARATOR, 'save_to' => 'interfaces[]', 'optional' => true),
|
||||||
12 => array(T_STRING, 'can_jump_to' => array(11, 16), 'save_to' => 'interfaces[]'),
|
12 => array(T_STRING, 'can_jump_to' => array(11, 16), 'save_to' => 'interfaces[]'),
|
||||||
13 => array(T_WHITESPACE, 'optional' => true),
|
13 => array(T_WHITESPACE, 'optional' => true),
|
||||||
@ -87,7 +87,7 @@ class SS_ClassManifest {
|
|||||||
public static function get_namespace_parser() {
|
public static function get_namespace_parser() {
|
||||||
return new TokenisedRegularExpression(array(
|
return new TokenisedRegularExpression(array(
|
||||||
0 => T_NAMESPACE,
|
0 => T_NAMESPACE,
|
||||||
1 => T_WHITESPACE,
|
1 => array(T_WHITESPACE, 'optional' => true),
|
||||||
2 => array(T_NS_SEPARATOR, 'save_to' => 'namespaceName[]', 'optional' => true),
|
2 => array(T_NS_SEPARATOR, 'save_to' => 'namespaceName[]', 'optional' => true),
|
||||||
3 => array(T_STRING, 'save_to' => 'namespaceName[]', 'can_jump_to' => 2),
|
3 => array(T_STRING, 'save_to' => 'namespaceName[]', 'can_jump_to' => 2),
|
||||||
4 => array(T_WHITESPACE, 'optional' => true),
|
4 => array(T_WHITESPACE, 'optional' => true),
|
||||||
@ -101,7 +101,7 @@ class SS_ClassManifest {
|
|||||||
public static function get_interface_parser() {
|
public static function get_interface_parser() {
|
||||||
return new TokenisedRegularExpression(array(
|
return new TokenisedRegularExpression(array(
|
||||||
0 => T_INTERFACE,
|
0 => T_INTERFACE,
|
||||||
1 => T_WHITESPACE,
|
1 => array(T_WHITESPACE, 'optional' => true),
|
||||||
2 => array(T_STRING, 'save_to' => 'interfaceName')
|
2 => array(T_STRING, 'save_to' => 'interfaceName')
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ class SS_ClassManifest {
|
|||||||
public static function get_imported_namespace_parser() {
|
public static function get_imported_namespace_parser() {
|
||||||
return new TokenisedRegularExpression(array(
|
return new TokenisedRegularExpression(array(
|
||||||
0 => T_USE,
|
0 => T_USE,
|
||||||
1 => T_WHITESPACE,
|
1 => array(T_WHITESPACE, 'optional' => true),
|
||||||
2 => array(T_NS_SEPARATOR, 'save_to' => 'importString[]', 'optional' => true),
|
2 => array(T_NS_SEPARATOR, 'save_to' => 'importString[]', 'optional' => true),
|
||||||
3 => array(T_STRING, 'save_to' => 'importString[]', 'can_jump_to' => array(2, 8)),
|
3 => array(T_STRING, 'save_to' => 'importString[]', 'can_jump_to' => array(2, 8)),
|
||||||
4 => array(T_WHITESPACE, 'save_to' => 'importString[]'),
|
4 => array(T_WHITESPACE, 'save_to' => 'importString[]'),
|
||||||
|
@ -110,6 +110,9 @@ class TokenisedRegularExpression {
|
|||||||
}
|
}
|
||||||
else return true;
|
else return true;
|
||||||
}
|
}
|
||||||
|
else if (in_array($tokens[$tokenPos][0], array(T_COMMENT, T_DOC_COMMENT, T_WHITESPACE))) {
|
||||||
|
return $this->matchFrom($tokenPos + 1, $expressionPos, $tokens, $matches);
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
10
docs/en/04_Changelogs/3.4.5.md
Normal file
10
docs/en/04_Changelogs/3.4.5.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# 3.4.5
|
||||||
|
|
||||||
|
<!--- Changes below this line will be automatically regenerated -->
|
||||||
|
|
||||||
|
## Change Log
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
|
||||||
|
* 2017-02-08 [1f3d46b](https://github.com/silverstripe/silverstripe-framework/commit/1f3d46b832c4f69b7c9accd38476491e304a4877) #6606 the JS SiteTree lib depends on whitespace (Daniel Hensby)
|
||||||
|
* 2017-01-30 [10d9f90](https://github.com/silverstripe/silverstripe-cms/commit/10d9f9080b6cc6c909abdae796e8ce944036ccc2) to allow ASSETS_DIR to be a subdirectory (Brendan Halley)
|
@ -127,9 +127,14 @@ class GridFieldExportButton implements GridField_HTMLProvider, GridField_ActionP
|
|||||||
|
|
||||||
// determine the CSV headers. If a field is callable (e.g. anonymous function) then use the
|
// determine the CSV headers. If a field is callable (e.g. anonymous function) then use the
|
||||||
// source name as the header instead
|
// source name as the header instead
|
||||||
|
|
||||||
foreach($csvColumns as $columnSource => $columnHeader) {
|
foreach($csvColumns as $columnSource => $columnHeader) {
|
||||||
|
if (is_array($columnHeader) && array_key_exists('title', $columnHeader)) {
|
||||||
|
$headers[] = $columnHeader['title'];
|
||||||
|
} else {
|
||||||
$headers[] = (!is_string($columnHeader) && is_callable($columnHeader)) ? $columnSource : $columnHeader;
|
$headers[] = (!is_string($columnHeader) && is_callable($columnHeader)) ? $columnSource : $columnHeader;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$fileData .= "\"" . implode("\"{$separator}\"", array_values($headers)) . "\"";
|
$fileData .= "\"" . implode("\"{$separator}\"", array_values($headers)) . "\"";
|
||||||
$fileData .= "\n";
|
$fileData .= "\n";
|
||||||
|
@ -41,6 +41,7 @@ class ClassManifestTest extends SapphireTest {
|
|||||||
'classb' => "{$this->base}/module/classes/ClassB.php",
|
'classb' => "{$this->base}/module/classes/ClassB.php",
|
||||||
'classc' => "{$this->base}/module/classes/ClassC.php",
|
'classc' => "{$this->base}/module/classes/ClassC.php",
|
||||||
'classd' => "{$this->base}/module/classes/ClassD.php",
|
'classd' => "{$this->base}/module/classes/ClassD.php",
|
||||||
|
'classe' => "{$this->base}/module/classes/ClassE.php",
|
||||||
'sstemplateparser' => FRAMEWORK_PATH."/view/SSTemplateParser.php",
|
'sstemplateparser' => FRAMEWORK_PATH."/view/SSTemplateParser.php",
|
||||||
'sstemplateparseexception' => FRAMEWORK_PATH."/view/SSTemplateParser.php"
|
'sstemplateparseexception' => FRAMEWORK_PATH."/view/SSTemplateParser.php"
|
||||||
);
|
);
|
||||||
@ -49,7 +50,7 @@ class ClassManifestTest extends SapphireTest {
|
|||||||
|
|
||||||
public function testGetClassNames() {
|
public function testGetClassNames() {
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
array('sstemplateparser', 'sstemplateparseexception', 'classa', 'classb', 'classc', 'classd'),
|
array('sstemplateparser', 'sstemplateparseexception', 'classa', 'classb', 'classc', 'classd', 'classe'),
|
||||||
$this->manifest->getClassNames());
|
$this->manifest->getClassNames());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @ignore
|
||||||
|
*/
|
||||||
|
class/* */ClassE /** */ //test
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user