Merge branch '3.5' into 3

This commit is contained in:
Daniel Hensby 2017-02-20 21:33:31 +00:00
commit 0ddf3b4186
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E
9 changed files with 50 additions and 13 deletions

View File

@ -1,5 +1,4 @@
<li id="record-$ID" data-id="$ID" data-pagetype="$ClassName" class="$Classes"> <li id="record-$ID" data-id="$ID" data-pagetype="$ClassName" class="$Classes"><ins class="jstree-icon">&nbsp;</ins>
<ins class="jstree-icon">&nbsp;</ins>
<a href="$Link" title="$Title.ATT"><ins class="jstree-icon">&nbsp;</ins> <a href="$Link" title="$Title.ATT"><ins class="jstree-icon">&nbsp;</ins>
<span class="text">$TreeTitle</span> <span class="text">$TreeTitle</span>
</a> </a>

View File

@ -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[]'),

View File

@ -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;

View 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)

View File

@ -0,0 +1,11 @@
# 3.5.3
<!--- 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)
* 2016-11-21 [682e607](https://github.com/silverstripe/silverstripe-cms/commit/682e6070e556f8e56b727b600c556da7507c2f44) Correct response code generated from error pages (Damian Mooyman)

View File

@ -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";

View File

@ -626,7 +626,7 @@ sk:
APPLY_ROLES: "Aplikovať úlohy skupinám" APPLY_ROLES: "Aplikovať úlohy skupinám"
APPLY_ROLES_HELP: "Schopnosť editovať úlohy pridelené k skupine. Vyžaduje \"Prístup k 'Užívatelia' sekcii\"." APPLY_ROLES_HELP: "Schopnosť editovať úlohy pridelené k skupine. Vyžaduje \"Prístup k 'Užívatelia' sekcii\"."
EDITPERMISSIONS: "Spravovať právomoci pre skupiny" EDITPERMISSIONS: "Spravovať právomoci pre skupiny"
EDITPERMISSIONS_HELP: "Schopnosť upravovať právomoci a IP adresi pre skupinu. Vyžaduje prístup do sekcie \"Bezpečnosť\"." EDITPERMISSIONS_HELP: "Schopnosť upravovať právomoci a IP adresy pre skupinu. Vyžaduje prístup do sekcie \"Bezpečnosť\"."
GROUPNAME: "Názov skupiny" GROUPNAME: "Názov skupiny"
IMPORTGROUPS: "Importovať skupiny" IMPORTGROUPS: "Importovať skupiny"
IMPORTUSERS: "Importovať používateľov" IMPORTUSERS: "Importovať používateľov"

View File

@ -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());
} }

View File

@ -0,0 +1,8 @@
<?php
/**
* @ignore
*/
class/* */ClassE /** */ //test
{
}