From 2f0a0cb63f12c9428cce9403fdd11dd155f73116 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Fri, 29 Sep 2017 09:33:55 +1300 Subject: [PATCH 1/9] NEW Add (alt text) to title field for clarity --- model/Image.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model/Image.php b/model/Image.php index cd7b87056..abb5fe3d1 100644 --- a/model/Image.php +++ b/model/Image.php @@ -131,6 +131,8 @@ class Image extends File implements Flushable { $fileAttributes = $fields->fieldByName('Root.Main.FilePreview')->fieldByName('FilePreviewData'); $fileAttributes->push(new ReadonlyField("Dimensions", _t('AssetTableField.DIM','Dimensions') . ':')); + $fields->fieldByName('Root.Main.Title')->setTitle(_t('Image.TITLE', 'Title (alt text)')); + return $fields; } From f69f35eeadd040ed2f3fd4eaf7e7f62486dc2227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sam=20Minn=C3=A9e?= Date: Mon, 9 Oct 2017 11:36:23 +1300 Subject: [PATCH 2/9] DOCS: Fixed incorrect statement on ID generation --- docs/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md b/docs/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md index 4710be4ec..57f9b61a0 100644 --- a/docs/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md +++ b/docs/en/02_Developer_Guides/00_Model/01_Data_Model_and_ORM.md @@ -68,8 +68,7 @@ or the command is run through [CLI](../cli). When rebuilding the database schema through the [api:SS_ClassLoader] the following additional properties are automatically set on the `DataObject`. -* ID: Primary Key. When a new record is created, SilverStripe does not use the database's built-in auto-numbering -system. Instead, it will generate a new `ID` by adding 1 to the current maximum ID. +* ID: Primary Key. This will use the database's built-in auto-numbering system on the base table, and apply the same ID to all subclass tables. * ClassName: An enumeration listing this data-class and all of its subclasses. * Created: A date/time field set to the creation date of this record * LastEdited: A date/time field set to the date this record was last edited through `write()` From 6fd737d2525041352cee2551dc97a80c118d0e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabrijel=20Gavranovic=CC=81?= Date: Mon, 29 Sep 2014 00:02:20 +0200 Subject: [PATCH 3/9] caching.md, false examples: updated The previous exmaple for adding a Mamcached backend was not working properly. Using this example results in Zend_Cache_Backend_Memcached using the default (fallback) settings (which are exactly the same as in the exmaple though). + Added an extra example for Memcached instances which are listening on a Unix socket. --- .../08_Performance/01_Caching.md | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/en/02_Developer_Guides/08_Performance/01_Caching.md b/docs/en/02_Developer_Guides/08_Performance/01_Caching.md index 7e9d236d3..ca76d60da 100644 --- a/docs/en/02_Developer_Guides/08_Performance/01_Caching.md +++ b/docs/en/02_Developer_Guides/08_Performance/01_Caching.md @@ -114,7 +114,7 @@ To use this backend, you need a memcached daemon and the memcache PECL extension :::php // _config.php SS_Cache::add_backend( - 'primary_memcached', + 'primary_memcached', 'Memcached', array( 'servers' => array( @@ -130,6 +130,28 @@ To use this backend, you need a memcached daemon and the memcache PECL extension ) ); SS_Cache::pick_backend('primary_memcached', 'any', 10); + +If your Memcached instance is using a local Unix socket instead of a network port: + + :::php + // _config.php + SS_Cache::add_backend( + 'primary_memcached', + 'Memcached', + array( + 'servers' => array( + 'host' => 'unix:///path/to/memcached.socket', + 'port' => 0, + 'persistent' => true, + 'weight' => 1, + 'timeout' => 5, + 'retry_interval' => 15, + 'status' => true, + 'failure_callback' => null + ) + ) + ); + SS_Cache::pick_backend('primary_memcached', 'any', 10); ### APC From ed1a16b6e29d7aff721d48dee9dc4d783184cd29 Mon Sep 17 00:00:00 2001 From: 3Dgoo Date: Tue, 31 Oct 2017 10:17:25 +1030 Subject: [PATCH 4/9] CSVParser API doc fix CSVParser API doc fix --- dev/CSVParser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/CSVParser.php b/dev/CSVParser.php index 158d9d863..178b6a5f9 100644 --- a/dev/CSVParser.php +++ b/dev/CSVParser.php @@ -11,9 +11,9 @@ * * $parser = new CSVParser('myfile.csv'); * $parser->mapColumns(array( - * 'first name' => 'FirstName' + * 'first name' => 'FirstName', * 'lastname' => 'Surname', - * 'last name' => 'Surname', + * 'last name' => 'Surname' * )); * foreach($parser as $row) { * // $row is a map of column name => column value From 36d542ef7bbb3dca4a4ea060905d02273c45151d Mon Sep 17 00:00:00 2001 From: Andrew Aitken-Fincham Date: Tue, 14 Nov 2017 08:21:26 +0000 Subject: [PATCH 5/9] sanitise select tag in DropdownField Docblock --- forms/DropdownField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forms/DropdownField.php b/forms/DropdownField.php index 1aa6c28f5..aef7f9a97 100644 --- a/forms/DropdownField.php +++ b/forms/DropdownField.php @@ -1,6 +1,6 @@ tag. + * Dropdown field, created from a select tag. * * Setting a $has_one relation * From 9d4263c51fa82f90298fa90e513957b39c125d99 Mon Sep 17 00:00:00 2001 From: Andrew Aitken-Fincham Date: Tue, 14 Nov 2017 09:46:02 +0000 Subject: [PATCH 6/9] sanitise ListboxField docblock --- forms/ListboxField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forms/ListboxField.php b/forms/ListboxField.php index bdc402b5f..c3d83fd46 100644 --- a/forms/ListboxField.php +++ b/forms/ListboxField.php @@ -1,6 +1,6 @@ tag. + * Multi-line listbox field, created from a select tag. * * Usage * From 4d1440f13aae8f13f19bf6ede2b6a8c6bd2124ac Mon Sep 17 00:00:00 2001 From: Andrew Aitken-Fincham Date: Tue, 14 Nov 2017 09:53:41 +0000 Subject: [PATCH 7/9] sanitise FormField docblock --- forms/FormField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forms/FormField.php b/forms/FormField.php index e1624954c..4325036c0 100644 --- a/forms/FormField.php +++ b/forms/FormField.php @@ -513,7 +513,7 @@ class FormField extends RequestHandler { } /** - * Set an HTML attribute on the field element, mostly an tag. + * Set an HTML attribute on the field element, mostly an input tag. * * Some attributes are best set through more specialized methods, to avoid interfering with * built-in behaviour: From 40628ac04a437b159e697fa97f44dfbde387da46 Mon Sep 17 00:00:00 2001 From: Andrew Aitken-Fincham Date: Tue, 14 Nov 2017 09:58:18 +0000 Subject: [PATCH 8/9] sanitise more docblocks --- forms/FormField.php | 4 ++-- forms/GroupedDropdownField.php | 10 +++++----- forms/ListboxField.php | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/forms/FormField.php b/forms/FormField.php index 4325036c0..f656b2024 100644 --- a/forms/FormField.php +++ b/forms/FormField.php @@ -1103,7 +1103,7 @@ class FormField extends RequestHandler { * * The field type is the class name with the word Field dropped off the end, all lowercase. * - * It's handy for assigning HTML classes. Doesn't signify the attribute. + * It's handy for assigning HTML classes. Doesn't signify the input type attribute. * * @see {link getAttributes()}. * @@ -1145,7 +1145,7 @@ class FormField extends RequestHandler { /** * Describe this field, provide help text for it. * - * By default, renders as a underneath the form field. + * By default, renders as a span class="description" underneath the form field. * * @param string $description * diff --git a/forms/GroupedDropdownField.php b/forms/GroupedDropdownField.php index 2d30956e5..8bd0d986d 100644 --- a/forms/GroupedDropdownField.php +++ b/forms/GroupedDropdownField.php @@ -1,13 +1,13 @@ tags. + * Grouped dropdown, using optgroup tags. * * $source parameter (from DropdownField) must be a two dimensional array. - * The first level of the array is used for the , and the second - * level are the for each group. + * The first level of the array is used for the optgroup, and the second + * level are the options for each group. * - * Returns a field with a single element. + * @see DropdownField for a simple select field with a single element. * @see CheckboxSetField for multiple selections through checkboxes. * @see OptionsetField for single selections via radiobuttons. * @see TreeDropdownField for a rich and customizeable UI that can visualize a tree of selectable elements @@ -69,7 +69,7 @@ class ListboxField extends DropdownField { } /** - * Returns a