From 5995f1e6802a0ae35e91d6c429609a5943cbcbe8 Mon Sep 17 00:00:00 2001 From: Christian Pfeffer Gjengedal Date: Wed, 19 Oct 2011 15:41:10 +0200 Subject: [PATCH 01/11] Fixed #018714: admin2: "Select none" button does the same as "Select All Visible" button --- design/admin2/javascript/ezajaxsubitems_datatable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/design/admin2/javascript/ezajaxsubitems_datatable.js b/design/admin2/javascript/ezajaxsubitems_datatable.js index 590f212e097..2a9c6ef7011 100644 --- a/design/admin2/javascript/ezajaxsubitems_datatable.js +++ b/design/admin2/javascript/ezajaxsubitems_datatable.js @@ -311,7 +311,7 @@ var sortableSubitems = function () { var shownKeys = []; $('#to-dialog-container input[name=TableOptionColumn]').each(function(i, e) { if ( $(this).prop('checked') == true ) - shownKeys.push( $(this).attr('value') ); + shownKeys.push( $(this).prop('value') ); }); // Update cookie and local variable @@ -356,7 +356,7 @@ var sortableSubitems = function () { // Toolbar buttons: Select, Create new, More actions var selectItemsBtnAction = function( type, args, item ) { - $('#content-sub-items-list').find(':checkbox').attr('checked', item.value); + $('#content-sub-items-list').find(':checkbox').prop('checked', item.value); } var selectItemsBtnInvert = function( type, args, item ) { From e42dab0cac8c7a97b0664d6345c271b5d6e59a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81ro=CC=82me=20Vieilledent?= Date: Wed, 19 Oct 2011 17:11:11 +0200 Subject: [PATCH 02/11] Added doc about namespace support in extensions --- doc/features/4.6/namespace_support.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/features/4.6/namespace_support.txt diff --git a/doc/features/4.6/namespace_support.txt b/doc/features/4.6/namespace_support.txt new file mode 100644 index 00000000000..c6abc89f513 --- /dev/null +++ b/doc/features/4.6/namespace_support.txt @@ -0,0 +1,16 @@ +Namespace support +================= + +eZ Publish now supports **PHP namespaces in extensions**. +If used, classes will be referenced with their FQN (Full Qualified Name) in ``var/autoload/ezp_extension.php`` + +For instance, this class:: + + Date: Wed, 19 Oct 2011 21:24:24 +0200 Subject: [PATCH 03/11] Changed $matchFilesArray to the correct $matchFileArray --- kernel/common/eztemplatedesignresource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/common/eztemplatedesignresource.php b/kernel/common/eztemplatedesignresource.php index 2698afa1e0a..847a1e99397 100644 --- a/kernel/common/eztemplatedesignresource.php +++ b/kernel/common/eztemplatedesignresource.php @@ -855,7 +855,7 @@ static function overrideArray( $siteAccess = false ) // Generate match cache for all templates // Build arrays of available files, start with standard design and end with most prefered design - $matchFilesArray = array(); + $matchFileArray = array(); $reverseBases = array_reverse( $bases ); From 64c35e816feba11438696e37d68dcb4c3bfa4c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81ro=CC=82me=20Vieilledent?= Date: Wed, 19 Oct 2011 16:49:04 +0200 Subject: [PATCH 04/11] #17656: Subtree limitation is not properly honored for multi-located contents --- doc/bc/4.6/changes-4.6.0.txt | 9 +++++++-- kernel/classes/eznodeviewfunctions.php | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/bc/4.6/changes-4.6.0.txt b/doc/bc/4.6/changes-4.6.0.txt index c3c45efb47f..23d59117a6f 100644 --- a/doc/bc/4.6/changes-4.6.0.txt +++ b/doc/bc/4.6/changes-4.6.0.txt @@ -4,9 +4,9 @@ Changes to BC and behavior in version 4.6.0 INI setting changes ------------------- -- subtreeexpirycleanup.php cronjob is not activated by default. +- subtreeexpirycleanup.php cronjob is not activated by default. - As DelayedCacheBlockCleanup is disabled this script is not activated by + As DelayedCacheBlockCleanup is disabled this script is not activated by default. You can re-enable it by adding Scripts[]=subtreeexpirycleanup.php to cronjob.ini[CronjobSettings] @@ -31,6 +31,11 @@ Change of behavior Subdir=templates Match[navigation_part_identifier]=ezusernavigationpart +- #17656: Subtree limitation is not properly honored for multi-located contents + + Content read access is now checked at the node level instead of content object. + For the record, this access is checked in eZNodeViewFunctions::contentViewGenerate() + Removed features diff --git a/kernel/classes/eznodeviewfunctions.php b/kernel/classes/eznodeviewfunctions.php index e2c0a9f3c37..a50e4a42b66 100644 --- a/kernel/classes/eznodeviewfunctions.php +++ b/kernel/classes/eznodeviewfunctions.php @@ -539,11 +539,11 @@ static function contentViewGenerate( $file, $args ) 'store' => false ); } - if ( !$object->canRead() ) + if ( !$node->canRead() ) { return array( 'content' => $Module->handleError( eZError::KERNEL_ACCESS_DENIED, 'kernel', - array( 'AccessList' => $object->accessList( 'read' ) ) ), + array( 'AccessList' => $node->checkAccess( 'read', false, false, true ) ) ), 'store' => false ); } From 9c33ba9e19fdbbec6533aedaa01b91366dcdddf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20R?= Date: Thu, 20 Oct 2011 16:08:43 +0200 Subject: [PATCH 05/11] Fixed #016471: ezstring default value should not be truncated --- design/standard/templates/class/datatype/edit/ezstring.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/design/standard/templates/class/datatype/edit/ezstring.tpl b/design/standard/templates/class/datatype/edit/ezstring.tpl index 9e680355f11..cb2a34defe2 100644 --- a/design/standard/templates/class/datatype/edit/ezstring.tpl +++ b/design/standard/templates/class/datatype/edit/ezstring.tpl @@ -3,7 +3,7 @@ {* Default value. *}
- +
{* Maximum string length. *} From 7f827cb3f9a9207169d01997ef64657a095e4d4c Mon Sep 17 00:00:00 2001 From: Bertrand Dunogier Date: Thu, 20 Oct 2011 16:35:02 +0200 Subject: [PATCH 06/11] Fixed #018793: Ubuntu 11.10 adds PCNTL function to php.ini "disable_functions" - added code before the daemon starts to check if the functions are available - added documentation on how to override the disabled functions --- bin/php/ezasynchronouspublisher.php | 14 +++++++++++++- doc/features/4.5/ezasynchronouspublisher.txt | 16 ++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/bin/php/ezasynchronouspublisher.php b/bin/php/ezasynchronouspublisher.php index 8d628836550..764f839bd59 100755 --- a/bin/php/ezasynchronouspublisher.php +++ b/bin/php/ezasynchronouspublisher.php @@ -14,13 +14,25 @@ require 'autoload.php'; $cli = eZCLI::instance(); + $script = eZScript::instance( array( 'description' => "Processes the eZ Publish publishing queue", 'use-session' => false, 'use-modules' => true, 'use-extensions' => true ) ); - $script->startup(); +// check required pcntl functions (ubuntu 11 disables them by default) +$pcntlFunctions = array( 'pcntl_fork', 'pcntl_signal', 'pcntl_waitpid', 'pcntl_wexitstatus' ); +foreach( $pcntlFunctions as $pcntlFunction ) +{ + if ( !function_exists( $pcntlFunction ) ) + { + $cli->error( "The following pcntl (http://php.net/pcntl) function is disabled: $pcntlFunction" ); + $cli->error( "Required functions: " . implode( ', ', $pcntlFunctions ) ); + } + $script->shutdown( 1 ); +} + $options = $script->getOptions( // options definition "[n|daemon][p:|pid-file:]", diff --git a/doc/features/4.5/ezasynchronouspublisher.txt b/doc/features/4.5/ezasynchronouspublisher.txt index eae6f52d6a3..81143fb6afe 100644 --- a/doc/features/4.5/ezasynchronouspublisher.txt +++ b/doc/features/4.5/ezasynchronouspublisher.txt @@ -30,6 +30,22 @@ System configuration -------------------- Publishing operations are handled by a system daemon. This daemon must be running, or content just won't be published. +PHP +''' +The asynchronous publishing script/daemon requires the pcntl functions to be available in order to run, as it heavily +requires on parallel publishing through forking and process control. Some distributions (Ubuntu 11.0 for instance) +disable them by default. The daemon won't be able to run if one of the required ones isn't available. + +If they are disabled, either change your CLI php.ini configuration, or if the option isn't available to you, override +them locally as follows:: + + php -d disabled_functions=0 bin/php/ezasynchronouspublisher.php + +Using the init scripts as described below in 'Settings', you can also add this option to your +ezasynchronouspublisher.conf:: + + PHP_EXECUTABLE=/usr/bin/php -d disabled_functions=0 + Manual execution '''''''''''''''' The daemon can be started manually by running the following, as your webserver user:: From 77525fdaee19c79283487e08484bcc9ce00bf27f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20R?= Date: Thu, 20 Oct 2011 17:00:29 +0200 Subject: [PATCH 07/11] Fixed #018584: PHP notice in Author datatype --- kernel/classes/datatypes/ezauthor/ezauthor.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/classes/datatypes/ezauthor/ezauthor.php b/kernel/classes/datatypes/ezauthor/ezauthor.php index b20e314c9aa..302e26711b6 100644 --- a/kernel/classes/datatypes/ezauthor/ezauthor.php +++ b/kernel/classes/datatypes/ezauthor/ezauthor.php @@ -59,7 +59,12 @@ function name() function addAuthor( $id, $name, $email ) { if ( $id == -1 ) - $id = $this->Authors[$this->AuthorCount - 1]['id'] + 1; + { + if ( isset( $this->Authors[$this->AuthorCount - 1] ) ) + $id = $this->Authors[$this->AuthorCount - 1]['id'] + 1; + else + $id = 1; + } $this->Authors[] = array( "id" => $id, "name" => $name, From e72cfa08d7e85cb940278de16fdfcf453a0ac20e Mon Sep 17 00:00:00 2001 From: Bertrand Dunogier Date: Thu, 20 Oct 2011 17:27:34 +0200 Subject: [PATCH 08/11] Fixed a stupid mistake in 7f827cb --- bin/php/ezasynchronouspublisher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/php/ezasynchronouspublisher.php b/bin/php/ezasynchronouspublisher.php index 764f839bd59..f2d0c9ece9c 100755 --- a/bin/php/ezasynchronouspublisher.php +++ b/bin/php/ezasynchronouspublisher.php @@ -29,8 +29,8 @@ { $cli->error( "The following pcntl (http://php.net/pcntl) function is disabled: $pcntlFunction" ); $cli->error( "Required functions: " . implode( ', ', $pcntlFunctions ) ); + $script->shutdown( 1 ); } - $script->shutdown( 1 ); } $options = $script->getOptions( From 8fb79aba550410525948cf3fc59c251e8c6267c9 Mon Sep 17 00:00:00 2001 From: Bertrand Dunogier Date: Thu, 20 Oct 2011 17:37:05 +0200 Subject: [PATCH 09/11] Fixed #018774: An error is given when publishing when using Asynchronous publishing --- settings/content.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings/content.ini b/settings/content.ini index 77b4f050bbf..ee5e78ecc33 100644 --- a/settings/content.ini +++ b/settings/content.ini @@ -737,7 +737,7 @@ AsynchronousPublishingFilters[] # Hooks can either be registered dynamically, using PHP code, or pre-defined in INI settings using the following variable # AsynchronousPublishingQueueHooks[]=MyHookClass::queue # The hook method must accept two parameters: the content object id, and its version (both integers) -AsynchronousPublishingQueueHooks[] +AsynchronousPublishingPreQueueHooks[] # Post handling hooks # These hooks will be executed right after an item has been processed by asynchronous publishing From d7cea676d1a1d51b8fb31728e9722d858a5e3eb5 Mon Sep 17 00:00:00 2001 From: xc Date: Fri, 21 Oct 2011 14:44:53 +0800 Subject: [PATCH 10/11] Fixed #018729: Wrong account activation message --- design/admin/templates/user/activate.tpl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/design/admin/templates/user/activate.tpl b/design/admin/templates/user/activate.tpl index 09437166073..c13b3f6896c 100644 --- a/design/admin/templates/user/activate.tpl +++ b/design/admin/templates/user/activate.tpl @@ -13,9 +13,15 @@

{if $account_activated} -{'Your account is now activated.'|i18n('design/admin/user')} + {if $is_pending} + {'Your email address has been confirmed. An administrator needs to approve your sign up request, before your login becomes valid.'|i18n('design/standard/user')} + {else} + {'Your account is now activated.'|i18n('design/standard/user')} + {/if} +{elseif $already_active} + {'Your account is already active.'|i18n('design/standard/user')} {else} -{'Sorry, the key submitted was not a valid key. Account was not activated.'|i18n('design/admin/user')} + {'Sorry, the key submitted was not a valid key. Account was not activated.'|i18n('design/standard/user')} {/if}

From d1c48e4260552070cfe50808efe54e848128527a Mon Sep 17 00:00:00 2001 From: Jerome Despatis Date: Fri, 21 Oct 2011 18:31:01 +0200 Subject: [PATCH 11/11] Implemented #16873: specify the name of offset to use in google.tpl, in order to have more than one navigator one a page --- design/admin/templates/navigator/google.tpl | 9 +++++---- design/admin2/templates/navigator/google.tpl | 9 +++++---- design/standard/templates/navigator/google.tpl | 9 +++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/design/admin/templates/navigator/google.tpl b/design/admin/templates/navigator/google.tpl index 0b73fcf58d9..9800a437e99 100644 --- a/design/admin/templates/navigator/google.tpl +++ b/design/admin/templates/navigator/google.tpl @@ -1,7 +1,8 @@ {* DO NOT EDIT THIS FILE! Use an override template instead. *} {default page_uri_suffix=false() left_max=7 - right_max=6} + right_max=6 + offset_name=offset} {default name=ViewParameter page_uri_suffix=false() left_max=$left_max @@ -9,7 +10,7 @@ {let page_count=int( ceil( div( $item_count,$item_limit ) ) ) current_page=min($:page_count, - int( ceil( div( first_set( $view_parameters.offset, 0), + int( ceil( div( first_set( $view_parameters[$offset_name], 0 ), $item_limit ) ) ) ) item_previous=sub( mul( $:current_page, $item_limit ), $item_limit ) @@ -19,10 +20,10 @@ left_length=min($ViewParameter:current_page,$:left_max) right_length=max(min(sub($ViewParameter:page_count,$ViewParameter:current_page,1),$:right_max),0) view_parameter_text="" - offset_text=eq( ezini( 'ControlSettings', 'AllowUserVariables', 'template.ini' ), 'true' )|choose( '/offset/', '/(offset)/' )} + offset_text=eq( ezini( 'ControlSettings', 'AllowUserVariables', 'template.ini' ), 'true' )|choose( concat('/', $offset_name, '/'), concat('/(', $offset_name, ')/') )} {* Create view parameter text with the exception of offset *} {section loop=$view_parameters} - {section-exclude match=$:key|eq('offset')} + {section-exclude match=$:key|eq($offset_name)} {section-exclude match=$:item|eq('')} {set view_parameter_text=concat($:view_parameter_text,'/(',$:key,')/',$:item)} {/section} diff --git a/design/admin2/templates/navigator/google.tpl b/design/admin2/templates/navigator/google.tpl index 0b73fcf58d9..9800a437e99 100644 --- a/design/admin2/templates/navigator/google.tpl +++ b/design/admin2/templates/navigator/google.tpl @@ -1,7 +1,8 @@ {* DO NOT EDIT THIS FILE! Use an override template instead. *} {default page_uri_suffix=false() left_max=7 - right_max=6} + right_max=6 + offset_name=offset} {default name=ViewParameter page_uri_suffix=false() left_max=$left_max @@ -9,7 +10,7 @@ {let page_count=int( ceil( div( $item_count,$item_limit ) ) ) current_page=min($:page_count, - int( ceil( div( first_set( $view_parameters.offset, 0), + int( ceil( div( first_set( $view_parameters[$offset_name], 0 ), $item_limit ) ) ) ) item_previous=sub( mul( $:current_page, $item_limit ), $item_limit ) @@ -19,10 +20,10 @@ left_length=min($ViewParameter:current_page,$:left_max) right_length=max(min(sub($ViewParameter:page_count,$ViewParameter:current_page,1),$:right_max),0) view_parameter_text="" - offset_text=eq( ezini( 'ControlSettings', 'AllowUserVariables', 'template.ini' ), 'true' )|choose( '/offset/', '/(offset)/' )} + offset_text=eq( ezini( 'ControlSettings', 'AllowUserVariables', 'template.ini' ), 'true' )|choose( concat('/', $offset_name, '/'), concat('/(', $offset_name, ')/') )} {* Create view parameter text with the exception of offset *} {section loop=$view_parameters} - {section-exclude match=$:key|eq('offset')} + {section-exclude match=$:key|eq($offset_name)} {section-exclude match=$:item|eq('')} {set view_parameter_text=concat($:view_parameter_text,'/(',$:key,')/',$:item)} {/section} diff --git a/design/standard/templates/navigator/google.tpl b/design/standard/templates/navigator/google.tpl index a21dd7a339d..bfcfce63c74 100644 --- a/design/standard/templates/navigator/google.tpl +++ b/design/standard/templates/navigator/google.tpl @@ -1,7 +1,8 @@ {* DO NOT EDIT THIS FILE! Use an override template instead. *} {default page_uri_suffix=false() left_max=7 - right_max=6} + right_max=6 + offset_name=offset} {default name=ViewParameter page_uri_suffix=false() left_max=$left_max @@ -9,7 +10,7 @@ {let page_count=int( ceil( div( $item_count,$item_limit ) ) ) current_page=min($:page_count, - int( ceil( div( first_set( $view_parameters.offset, 0 ), + int( ceil( div( first_set( $view_parameters[$offset_name], 0 ), $item_limit ) ) ) ) item_previous=sub( mul( $:current_page, $item_limit ), $item_limit ) @@ -19,10 +20,10 @@ left_length=min($ViewParameter:current_page,$:left_max) right_length=max(min(sub($ViewParameter:page_count,$ViewParameter:current_page,1),$:right_max),0) view_parameter_text="" - offset_text=eq( ezini( 'ControlSettings', 'AllowUserVariables', 'template.ini' ), 'true' )|choose( '/offset/', '/(offset)/' )} + offset_text=eq( ezini( 'ControlSettings', 'AllowUserVariables', 'template.ini' ), 'true' )|choose( concat('/', $offset_name, '/'), concat('/(', $offset_name, ')/') )} {* Create view parameter text with the exception of offset *} {section loop=$view_parameters} - {section-exclude match=$:key|eq('offset')} + {section-exclude match=$:key|eq($offset_name)} {section-exclude match=$:item|eq('')} {set view_parameter_text=concat($:view_parameter_text,'/(',$:key,')/',$:item)} {/section}