diff --git a/.gitignore b/.gitignore index 5f85db2bde7..07a147a9f30 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,3 @@ -/var/autoload/ -/var/cache/ -/var/*/cache/ -/var/*_site/ -/var/log/ -/var/*/log/ -/var/storage/ -/var/test* *.DS_Store /.project /.idea/ @@ -14,4 +6,6 @@ /bin/win32 /vendor /composer.lock - +/var/* +# Except for any .gitkeep file in the tree. This is added only to keep directories in the repository. +!.gitkeep diff --git a/.htaccess_root b/.htaccess_root index b78fea12fec..fa365b747e3 100644 --- a/.htaccess_root +++ b/.htaccess_root @@ -11,7 +11,7 @@ RewriteRule ^var/([^/]+/)?storage/images(-versioned)?/.* - [L] RewriteRule ^var/([^/]+/)?cache/(texttoimage|public)/.* - [L] RewriteRule ^design/[^/]+/(stylesheets|images|javascript|fonts)/.* - [L] RewriteRule ^share/icons/.* - [L] -RewriteRule ^extension/[^/]+/design/[^/]+/(stylesheets|flash|images|lib|javascripts?)/.* - [L] +RewriteRule ^extension/[^/]+/design/[^/]+/(stylesheets|flash|images|lib|fonts|javascripts?)/.* - [L] RewriteRule ^packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L] RewriteRule ^packages/styles/.+/thumbnail/.* - [L] RewriteRule ^var/storage/packages/.* - [L] diff --git a/.travis.yml b/.travis.yml index b5ce2c097e9..86e712295d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,38 +1,31 @@ language: php -php: - - 5.3.3 - - 5.3 - - 5.4 - - 5.5 - - 5.6 +services: + - mysql + - postgresql + +cache: + directories: + - $HOME/.composer/cache/files branches: only: - master -# - 5.4 -# - stable-5.3 env: global: - DB_NAME="testdb" - matrix: - - DB="mysql" DB_USER="root" - - DB="postgresql" DB_USER="postgres" # Aim to run tests on all versions of php, make sure each db is run at least once matrix: - exclude: - - php: 5.3.3 - env: DB="postgresql" DB_USER="postgres" - - php: 5.3 - env: DB="mysql" DB_USER="root" - - php: 5.4 + include: + - php: 7.1 env: DB="postgresql" DB_USER="postgres" - - php: 5.5 + - php: 7.1 env: DB="mysql" DB_USER="root" - - php: 5.6 - env: DB="postgresql" DB_USER="postgres" +# Will need to update phpunit for this: https://travis-ci.org/ezsystems/ezpublish-legacy/jobs/279543965#L625 +# - php: 7.2 +# env: DB="postgresql" DB_USER="postgres" before_script: - if [ $DB == "mysql" ]; then mysql -e "CREATE DATABASE IF NOT EXISTS $DB_NAME;" -u$DB_USER ; fi diff --git a/README.md b/README.md index fd1c1ad17a2..fe023864bba 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ -eZ Publish 4 (Referred to as `legacy` in eZ Publish 5.x) [![Build Status](https://secure.travis-ci.org/ezsystems/ezpublish-legacy.png)](http://travis-ci.org/ezsystems/ezpublish-legacy) +eZ Publish 4 (Referred to as `legacy` in eZ Publish 5.x) ======================================================= +[![Build Status](https://img.shields.io/travis/ezsystems/ezpublish-legacy.svg?style=flat-square&branch=master)](https://travis-ci.org/ezsystems/ezpublish-legacy) +[![Downloads](https://img.shields.io/packagist/dt/ezsystems/ezpublish-legacy.svg?style=flat-square)](https://packagist.org/packages/ezsystems/ezpublish-legacy) +[![Latest version](https://img.shields.io/github/release/ezsystems/ezpublish-legacy.svg?style=flat-square)](https://github.com/ezsystems/ezpublish-legacy/releases) +[![License](https://img.shields.io/github/license/ezsystems/ezpublish-legacy.svg?style=flat-square)](LICENSE) + What is eZ Publish? ------------------- eZ Publish is a professional PHP application framework with advanced CMS @@ -17,6 +22,14 @@ eZ Publish is database, platform and browser independent. Because it is browser based it can be used and updated from anywhere as long as you have access to the Internet. +Installation +------------ +Read [doc/INSTALL.md](doc/INSTALL.md) or go to http://doc.ez.no/eZ-Publish + +How to upgrade and use the lovestack version +-- +The eZ Publish upgrade process and how you can switch to +the lovestack is documented in [update/README.md](update/README.md) License ------- @@ -71,11 +84,6 @@ Main eZ Publish features - content geolocation -Installation ------------- -Read doc/INSTALL or go to http://doc.ez.no/eZ-Publish - - Issue tracker ------------- Submitting bugs, improvements and stories is possible on https://jira.ez.no/browse/EZP. diff --git a/autoload.php b/autoload.php index 90f9c86af11..798bbfe96dc 100644 --- a/autoload.php +++ b/autoload.php @@ -19,54 +19,27 @@ require_once __DIR__ . '/config.php'; } +// Check for EZCBASE_ENABLED, if set we can skip autoloading Zeta Components if ( !defined( 'EZCBASE_ENABLED' ) ) { - $defaultAppName = "app"; - if ( !file_exists( __DIR__ . "/../$defaultAppName" ) ) - { - $defaultAppName = "ezpublish"; - } - - $appName = defined( 'EZP_APP_FOLDER_NAME' ) ? EZP_APP_FOLDER_NAME : $defaultAppName; - $appFolder = __DIR__ . "/../$appName"; - $legacyVendorDir = __DIR__ . "/vendor"; + // Start by setting EZCBASE_ENABLED to avoid recursion + define( 'EZCBASE_ENABLED', false ); - // Bundled - if ( defined( 'EZP_USE_BUNDLED_COMPONENTS' ) ? EZP_USE_BUNDLED_COMPONENTS === true : file_exists( __DIR__ . "/lib/ezc" ) ) - { - set_include_path( __DIR__ . PATH_SEPARATOR . __DIR__ . "/lib/ezc" . PATH_SEPARATOR . get_include_path() ); - require 'Base/src/base.php'; - $baseEnabled = true; - } - // Custom config.php defined - else if ( defined( 'EZC_BASE_PATH' ) ) + // If composer autoloader is already present we can skip trying to load it + if ( class_exists( 'Composer\Autoload\ClassLoader', false ) ) { - require EZC_BASE_PATH; - $baseEnabled = true; + // do nothing } - // Composer if in eZ Publish5 context - else if ( strpos( $appFolder, "{$appName}/../{$appName}" ) === false && file_exists( "{$appFolder}/autoload.php" ) ) + // Composer if in eZ Platform context + else if ( file_exists( __DIR__ . "/../vendor/autoload.php" ) ) { - require_once "{$appFolder}/autoload.php"; - $baseEnabled = false; + require_once __DIR__ . "/../vendor/autoload.php"; } // Composer if in eZ Publish legacy context - else if ( file_exists( "{$legacyVendorDir}/autoload.php" ) ) + else if ( file_exists( __DIR__ . "/vendor/autoload.php" ) ) { - require_once "{$legacyVendorDir}/autoload.php"; - $baseEnabled = false; + require_once __DIR__ . "/vendor/autoload.php"; } - // PEAR install - else - { - $baseEnabled = @include 'ezc/Base/base.php'; - if ( !$baseEnabled ) - { - $baseEnabled = @include 'Base/src/base.php'; - } - } - - define( 'EZCBASE_ENABLED', $baseEnabled ); } // Check if ezpAutoloader exists because it can be already declared if running in the Symfony context (e.g. CLI scripts) diff --git a/autoload/ezp_kernel.php b/autoload/ezp_kernel.php old mode 100755 new mode 100644 index ed8ea90e524..aeedd39d3ef --- a/autoload/ezp_kernel.php +++ b/autoload/ezp_kernel.php @@ -163,10 +163,6 @@ 'eZECBHandler' => 'kernel/shop/classes/exchangeratehandlers/ezecb/ezecbhandler.php', 'eZEXIFImageAnalyzer' => 'lib/ezimage/classes/ezexifimageanalyzer.php', 'eZEmailType' => 'kernel/classes/datatypes/ezemail/ezemailtype.php', - 'eZEnum' => 'kernel/classes/datatypes/ezenum/ezenum.php', - 'eZEnumObjectValue' => 'kernel/classes/datatypes/ezenum/ezenumobjectvalue.php', - 'eZEnumType' => 'kernel/classes/datatypes/ezenum/ezenumtype.php', - 'eZEnumValue' => 'kernel/classes/datatypes/ezenum/ezenumvalue.php', 'eZError' => 'kernel/classes/ezerror.php', 'eZExchangeRatesUpdateHandler' => 'kernel/shop/classes/exchangeratehandlers/ezexchangeratesupdatehandler.php', 'eZExecution' => 'lib/ezutils/classes/ezexecution.php', diff --git a/benchmarks/classes/ezbenchmark.php b/benchmarks/classes/ezbenchmark.php index 69cbb13f42e..354cdab982e 100644 --- a/benchmarks/classes/ezbenchmark.php +++ b/benchmarks/classes/ezbenchmark.php @@ -18,12 +18,9 @@ class eZBenchmark extends eZBenchmarkUnit { - /*! - Initializes the benchmark with the name \a $name. - */ - function eZBenchmark( $name ) + function __construct( $name = false ) { - $this->eZBenchmarkUnit( $name ); + parent::__construct( $name ); } function addMark( &$mark ) diff --git a/benchmarks/classes/ezbenchmarkcase.php b/benchmarks/classes/ezbenchmarkcase.php index eeec84791d5..20bf7b2022e 100644 --- a/benchmarks/classes/ezbenchmarkcase.php +++ b/benchmarks/classes/ezbenchmarkcase.php @@ -37,7 +37,7 @@ class MyTest extends eZBenchmarkCase { function MyTest() { - $this->eZBenchmarkCase( 'My test case' ); + parent::__construct( 'My test case' ); $this->addmark( 'markFunctionA', 'Addition mark' ); $this->addFunctionTest( 'MyFunctionMark', 'Addition mark 2' ); } @@ -64,12 +64,9 @@ function MyFunctionMark( &$tr, $parameter ) class eZBenchmarkCase extends eZBenchmarkUnit { - /*! - Constructor - */ - function eZBenchmarkCase( $name = false ) + function __construct( $name = false ) { - $this->eZBenchmarkUnit( $name ); + parent::__construct( $name ); } function addMark( $method, $name, $parameter = false ) diff --git a/benchmarks/classes/ezbenchmarkclirunner.php b/benchmarks/classes/ezbenchmarkclirunner.php index f9b9efc2c2f..25d40413822 100644 --- a/benchmarks/classes/ezbenchmarkclirunner.php +++ b/benchmarks/classes/ezbenchmarkclirunner.php @@ -24,12 +24,9 @@ class eZBenchmarkCLIRunner extends eZBenchmarkRunner { - /*! - Constructor - */ - function eZBenchmarkCLIRunner() + public function __construct() { - $this->eZBenchmarkRunner(); + parent::__construct(); $this->MaxMap = false; } diff --git a/benchmarks/classes/ezbenchmarkrunner.php b/benchmarks/classes/ezbenchmarkrunner.php index 747aad013c6..95d3f0ff749 100644 --- a/benchmarks/classes/ezbenchmarkrunner.php +++ b/benchmarks/classes/ezbenchmarkrunner.php @@ -16,10 +16,10 @@ class eZBenchmarkrunner { - /*! - Constructor - */ - function eZBenchmarkrunner() + /** + * Constructor + */ + public function __construct() { $this->Results = array(); $this->CurrentResult = false; diff --git a/benchmarks/classes/ezbenchmarkunit.php b/benchmarks/classes/ezbenchmarkunit.php index d2ccae2cf9f..3c1476148a6 100644 --- a/benchmarks/classes/ezbenchmarkunit.php +++ b/benchmarks/classes/ezbenchmarkunit.php @@ -21,10 +21,12 @@ class eZBenchmarkUnit { - /*! - Constructor - */ - function eZBenchmarkUnit( $name = false ) + /** + * Initializes the benchmark + * + * @param bool|string $name + */ + function __construct( $name = false ) { if ( !$name ) $name = get_class( $this ); diff --git a/benchmarks/eztemplate/ezmarktemplatecompiler.php b/benchmarks/eztemplate/ezmarktemplatecompiler.php index 5388d720491..5a90ef09029 100644 --- a/benchmarks/eztemplate/ezmarktemplatecompiler.php +++ b/benchmarks/eztemplate/ezmarktemplatecompiler.php @@ -16,12 +16,9 @@ class eZMarkTemplateCompiler extends eZBenchmarkCase { - /*! - Constructor - */ - function eZMarkTemplateCompiler( $name ) + public function __construct( $name = false ) { - $this->eZBenchmarkCase( $name ); + parent::__construct( $name ); $this->addMark( 'markProcess', 'Processed template mark' ); $this->addMark( 'markCompilation', 'Compiled template mark' ); } diff --git a/benchmarks/hashing/ezmarkhashing.php b/benchmarks/hashing/ezmarkhashing.php index 893845778c2..069a8abf5a8 100644 --- a/benchmarks/hashing/ezmarkhashing.php +++ b/benchmarks/hashing/ezmarkhashing.php @@ -16,12 +16,9 @@ class eZMarkHashing extends eZBenchmarkCase { - /*! - Constructor - */ - function eZMarkHashing( $name ) + public function __construct( $name = false ) { - $this->eZBenchmarkCase( $name ); + parent::__construct( $name ); $this->addMark( 'markMD5', 'MD5 hash', array( 'repeat_count' => 1000 ) ); $this->addMark( 'markCRC32', 'CRC32 hash', array( 'repeat_count' => 1000 ) ); } diff --git a/bin/php/ezcsvexport.php b/bin/php/ezcsvexport.php index 86410559dc1..a3d9214a559 100755 --- a/bin/php/ezcsvexport.php +++ b/bin/php/ezcsvexport.php @@ -70,7 +70,7 @@ $subTree = $node->subTree(); $openedFPs = array(); -while ( list( $key, $childNode ) = each( $subTree ) ) +foreach ( $subTree as $key => $childNode ) { $status = true; @@ -158,9 +158,9 @@ $script->iterate( $cli, $status ); } -while ( $fp = each( $openedFPs ) ) +foreach ( $openedFPs as $fp ) { - fclose( $fp['value'] ); + fclose( $fp ); } $script->shutdown(); diff --git a/bin/php/ezcsvimport.php b/bin/php/ezcsvimport.php index 5e2d7b7a48a..8905f51e2ce 100755 --- a/bin/php/ezcsvimport.php +++ b/bin/php/ezcsvimport.php @@ -105,7 +105,7 @@ $attributes = $contentObject->attribute( 'contentobject_attributes' ); - while ( list( $key, $attribute ) = each( $attributes ) ) + foreach ( $attributes as $key => $attribute ) { $dataString = $objectData[$key]; switch ( $datatypeString = $attribute->attribute( 'data_type_string' ) ) diff --git a/bin/php/ezpgenerateautoloads.php b/bin/php/ezpgenerateautoloads.php index 875c3038270..daf5c4858a9 100755 --- a/bin/php/ezpgenerateautoloads.php +++ b/bin/php/ezpgenerateautoloads.php @@ -16,52 +16,22 @@ // Setup, includes //{ -$defaultAppName = "app"; -if ( !file_exists( __DIR__ . "/../../../$defaultAppName" ) ) -{ - $defaultAppName = "ezpublish"; -} -$appName = defined( 'EZP_APP_FOLDER_NAME' ) ? EZP_APP_FOLDER_NAME : $defaultAppName; -$appFolder = getcwd() . "/../$appName"; +$platformVendorDir = getcwd() . "/../vendor"; $legacyVendorDir = getcwd() . "/vendor"; - -$baseEnabled = true; -// Bundled -if ( defined( 'EZP_USE_BUNDLED_COMPONENTS' ) ? EZP_USE_BUNDLED_COMPONENTS === true : file_exists( 'lib/ezc' ) ) +if ( class_exists( 'Composer\Autoload\ClassLoader', false ) ) { - set_include_path( './lib/ezc' . PATH_SEPARATOR . get_include_path() ); - require 'Base/src/base.php'; + // Do nothing, composer autoload already loaded } -// Custom config.php defined -else if ( defined( 'EZC_BASE_PATH' ) ) +// Composer if in eZ Platform context +else if ( file_exists( "{$platformVendorDir}/autoload.php" ) ) { - require EZC_BASE_PATH; -} -// Composer if in eZ Publish5 context -else if ( strpos( $appFolder, "{$appName}/../{$appName}" ) === false && file_exists( "{$appFolder}/autoload.php" ) ) -{ - require_once "{$appFolder}/autoload.php"; - $baseEnabled = false; + require_once "{$platformVendorDir}/autoload.php"; } // Composer if in eZ Publish legacy context else if ( file_exists( "{$legacyVendorDir}/autoload.php" ) ) { require_once "{$legacyVendorDir}/autoload.php"; - $baseEnabled = false; -} -// PEAR -else -{ - if ( !@include 'ezc/Base/base.php' ) - { - require 'Base/src/base.php'; - } -} - -if ( $baseEnabled ) -{ - spl_autoload_register( array( 'ezcBase', 'autoload' ) ); } require 'kernel/private/classes/ezautoloadgenerator.php'; diff --git a/bin/php/ezwebincommon.php b/bin/php/ezwebincommon.php index 38aabbe8478..e70694e41fc 100644 --- a/bin/php/ezwebincommon.php +++ b/bin/php/ezwebincommon.php @@ -312,8 +312,13 @@ function installPackages( $packageList, $params = array() ) // process packages $action = false; - while( ( list( , $packageName ) = each( $packageList ) ) && $action != EZ_INSTALL_PACKAGE_EXTRA_ACTION_QUIT ) + foreach ( $packageList as $packageName ) { + if ( $action == EZ_INSTALL_PACKAGE_EXTRA_ACTION_QUIT ) + { + break; + } + $action = false; $cli->output( $cli->stylize( 'emphasize', "Installing package '$packageName'" ), true ); @@ -333,9 +338,13 @@ function installPackages( $packageList, $params = array() ) $packageType = $package->attribute( 'type' ); $packageItems = $package->installItemsList(); - while( ( list( , $item ) = each( $packageItems ) ) && $action != EZ_INSTALL_PACKAGE_EXTRA_ACTION_QUIT - && $action != EZ_INSTALL_PACKAGE_EXTRA_ACTION_SKIP_PACKAGE ) + foreach ( $packageItems as $item ) { + if ( $action == EZ_INSTALL_PACKAGE_EXTRA_ACTION_QUIT || $action == EZ_INSTALL_PACKAGE_EXTRA_ACTION_SKIP_PACKAGE ) + { + break; + } + $itemInstalled = false; do { diff --git a/bin/php/trashpurge.php b/bin/php/trashpurge.php index 7c6389038e5..07757429cd6 100644 --- a/bin/php/trashpurge.php +++ b/bin/php/trashpurge.php @@ -27,12 +27,13 @@ $script->startup(); $options = $script->getOptions( - "[iteration-sleep:][iteration-limit:][memory-monitoring]", + "[iteration-sleep:][iteration-limit:][memory-monitoring][trashed-days:]", "", array( 'iteration-sleep' => 'Amount of seconds to sleep between each iteration when performing a purge operation, can be a float. Default is one second.', 'iteration-limit' => 'Amount of items to remove in each iteration when performing a purge operation. Default is 100.', - 'memory-monitoring' => 'If set, memory usage will be logged in var/log/trashpurge.log.' + 'memory-monitoring' => 'If set, memory usage will be logged in var/log/trashpurge.log.', + 'trashed-days' => 'If set, only objects that has been trashed for at least the specified amount of days will be purged.' ) ); @@ -45,7 +46,8 @@ if ( $purgeHandler->run( $options['iteration-limit'] ? (int)$options['iteration-limit'] : null, - $options['iteration-sleep'] ? (int)$options['iteration-sleep'] : null + $options['iteration-sleep'] ? (int)$options['iteration-sleep'] : null, + $options['trashed-days'] ? (int)$options['trashed-days'] : null ) ) { @@ -56,4 +58,4 @@ $script->shutdown( 1 ); } -?> +?> \ No newline at end of file diff --git a/composer.json b/composer.json index 6ed97d73374..895e52f4c54 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { - "name": "ezsystems/ezpublish-legacy", - "description": "eZ Publish LegacyStack (4.x)", - "homepage": "http://share.ez.no", + "name": "mugoweb/ezpublish-legacy", + "description": "eZ Publish Legacy Stack (4.x), fork maintained by Mugo Web", + "homepage": "https://www.mugo.ca", "license": "GPL-2.0", "type": "ezpublish-legacy", "suggest": { @@ -9,14 +9,14 @@ "ext-curl": "Curl provides better support for interacting with other servers, like downloading packages over SSL", "ext-gd": "Unless you have ImageMagic installed GD is required for eZ Publish to be able to manipulate images", "ext-mysqli": "Mysqli is the default database handler used by eZ Publish", + "ext-openssl": "OpenSSL provides cryptographically secure random bytes, which is used in certain parts of the product to greatly improve security", "ext-pcntl": "If you plan to take advantage of eZ Publish Async publishing feature, then pcntl extension is required", "ezsystems/ezsi-ls": "ezsi would allow you to use Edge/Server Side Includes of blocks in templates", "ezsystems/ezscriptmonitor-ls": "ezscriptmonitor makes it possible to better deal with long running bulk operations within eZ Publish", - "ezsystems/ezfind-ls": "ezfind is a Solr based advance search engine for eZ Publish with a lot more features then the built in search", "ezsystems/eztags-ls": "eztags is a full tagging/taxonomy solution for eZ Publish replacing the simpler builtin ezkeywords datatype" }, "require": { - "php": ">=5.3.3", + "php": "^7.1", "ext-dom": "*", "ext-libxml": "*", "ext-mbstring": "*", @@ -29,16 +29,9 @@ "ext-simplexml": "*", "ezsystems/ezpublish-legacy-installer": "*", "ezsystems/ezautosave-ls": "~5.3", - "ezsystems/ezdemo-ls-extension": "~5.3", "ezsystems/ezflow-ls-extension": "~5.3", - "ezsystems/ezgmaplocation-ls-extension": "~5.3", - "ezsystems/ezie-ls": "~5.3", - "ezsystems/ezmbpaex-ls": "~5.3", - "ezsystems/ezmultiupload-ls": "~5.3", - "ezsystems/ezodf-ls": "~5.3", - "ezsystems/ezprestapiprovider-ls": "~5.3", - "ezsystems/ezstarrating-ls-extension": "~5.3", "ezsystems/ezwt-ls-extension": "~5.3", + "mugoweb/ezfind": "^2019.03", "zetacomponents/archive": "~1.5", "zetacomponents/authentication": "~1.4", "zetacomponents/authentication-database-tiein": "~1.2", @@ -61,5 +54,19 @@ "require-dev": { "phpunit/phpunit": "3.7.*", "zetacomponents/php-generator": "~1.1" + }, + "autoload": { + "files": ["autoload.php"] + }, + "scripts": { + "legacy-scripts": [ + "@php bin/php/ezpgenerateautoloads.php" + ], + "post-install-cmd": [ + "@legacy-scripts" + ], + "post-update-cmd": [ + "@legacy-scripts" + ] } } diff --git a/composer.json.dist b/composer.json.dist deleted file mode 100644 index 2bb7b1d1a7c..00000000000 --- a/composer.json.dist +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "ezsystems/ezpublish-legacy", - "description": "eZ Publish LegacyStack (4.x)", - "homepage": "http://share.ez.no", - "license": "GPL-2.0", - "type": "ezpublish-legacy", - "suggest": { - "php-64bit": "For support of more than 30 languages, a 64bit php installation on all involved prod/dev machines is required", - "ext-curl": "Curl provides better support for interacting with other servers, like downloading packages over SSL", - "ext-gd": "Unless you have ImageMagic installed GD is required for eZ Publish to be able to manipulate images", - "ext-mysqli": "Mysqli is the default database handler used by eZ Publish", - "ext-pcntl": "If you plan to take advantage of eZ Publish Async publishing feature, then pcntl extension is required" - }, - "require": { - "php": ">=5.3.3", - "ext-dom": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-pcre": "*", - "ext-json": "*", - "ext-iconv": "*", - "ext-reflection": "*", - "ext-session": "*", - "ext-spl": "*", - "ext-simplexml": "*", - "ezsystems/ezpublish-legacy-installer": "*", - "ezsystems/ezautosave-ls": "~5.3", - "ezsystems/ezdemo-ls-extension": "~5.3", - "ezsystems/ezflow-ls-extension": "~5.3", - "ezsystems/ezgmaplocation-ls-extension": "~5.3", - "ezsystems/ezie-ls": "~5.3", - "ezsystems/ezmbpaex-ls": "~5.3", - "ezsystems/ezmultiupload-ls": "~5.3", - "ezsystems/ezodf-ls": "~5.3", - "ezsystems/ezprestapiprovider-ls": "~5.3", - "ezsystems/ezscriptmonitor-ls": "~5.3", - "ezsystems/ezsi-ls": "~5.3", - "ezsystems/ezstarrating-ls-extension": "~5.3", - "ezsystems/ezwt-ls-extension": "~5.3", - "ezsystems/ezfind-ls": "~5.3|>=2014.05", - "ezsystems/eztags-ls": "~1.3", - "zetacomponents/archive": "~1.5", - "zetacomponents/authentication": "~1.4", - "zetacomponents/authentication-database-tiein": "~1.2", - "zetacomponents/cache": "~1.6", - "zetacomponents/configuration": "~1.4", - "zetacomponents/console-tools": "~1.7", - "zetacomponents/database": "~1.5", - "zetacomponents/debug": "~1.3", - "zetacomponents/event-log": "~1.5", - "zetacomponents/feed": "~1.4", - "zetacomponents/image-conversion": "~1.4", - "zetacomponents/mail": "~1.8", - "zetacomponents/mvc-tools": "~1.2", - "zetacomponents/mvc-authentication-tiein": "~1.1", - "zetacomponents/persistent-object": "~1.8", - "zetacomponents/signal-slot": "~1.2", - "zetacomponents/system-information": "~1.1", - "zetacomponents/webdav": "~1.1" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*", - "zetacomponents/php-generator": "~1.1" - } -} diff --git a/config.php-RECOMMENDED b/config.php-RECOMMENDED index d4070d20c04..3ec36cc1450 100644 --- a/config.php-RECOMMENDED +++ b/config.php-RECOMMENDED @@ -12,46 +12,6 @@ *uncomment* the proposed settings. */ - -/* - PATH TO THE EZCOMPONENTS - ------------------------ - config.php can set the components path like: -*/ -//ini_set( 'include_path', ini_get( 'include_path' ). PATH_SEPARATOR . '../ezcomponents/trunk' ); - -/* - USING COMPONENTS VIA COMPOSER - ----------------------------- - If installation is in a eZ Publish 5/Symfony context, composer will be attempted to be used - if the following file is found: '../EZP_APP_FOLDER_NAME/autoload.php' - Default EZP_APP_FOLDER_NAME value is "app" and this constant gives you possibility to change it. - In eZ Publish 5.x, default value of EZP_APP_FOLDER_NAME was "ezpublish". -*/ -//define( 'EZP_APP_FOLDER_NAME', 'my_app' ); - -/* - USING BUNDLED COMPONENTS - ------------------------ - If you are using a distribution of eZ Publish with which the necessary - eZ Components are bundled (in lib/ezc), then you can use this setting to - control if the bundled eZ Components should be used (true) or not (false). - By default, when this setting is not present and the bundled eZ Components are - present, they will be used. If you're using the bundled eZ Components it's recommended - to define EZP_USE_BUNDLED_COMPONENTS as a boolean true anyway, for optimal speed. -*/ -//define( 'EZP_USE_BUNDLED_COMPONENTS', true ); - - -/* - If you are not using the bundled eZ Components, then for optimal speed it is - recommended to set EZC_BASE_PATH to either ezc/Base/base.php or Base/src/base.php, - depending on how you installed the eZ Components. By default, if this setting - is not present, eZ Publish first tries to include ezc/Base/base.php in the standard - php include path. If that fails Base/src/base.php is included. -*/ -//define( 'EZC_BASE_PATH', '/usr/lib/ezc/Base/base.php' ); - /* TIMEZONES --------- diff --git a/cronjobs/hide.php b/cronjobs/hide.php index b4f71be915f..2cd85d28baf 100644 --- a/cronjobs/hide.php +++ b/cronjobs/hide.php @@ -49,6 +49,9 @@ { $cli->output( 'Hiding node: "' . $node->attribute( 'name' ) . '" (' . $node->attribute( 'node_id' ) . ')' ); eZContentObjectTreeNode::hideSubTree( $node ); + + //call appropriate method from search engine + eZSearch::updateNodeVisibility( $node->attribute( 'node_id' ), 'hide' ); } // clear memory after every batch eZContentObject::clearCache(); diff --git a/cronjobs/indexcontent.php b/cronjobs/indexcontent.php index 0c0d84a0589..16db1b52af0 100644 --- a/cronjobs/indexcontent.php +++ b/cronjobs/indexcontent.php @@ -114,6 +114,7 @@ if ( $removeFromPendingActions ) { $db->query( "DELETE FROM ezpending_actions WHERE action = '$action' AND param = '$objectID'" ); + eZContentCacheManager::clearContentCacheIfNeeded( $objectID ); } else { diff --git a/cronjobs/linkcheck.php b/cronjobs/linkcheck.php index 5364f85fc8b..1f57e92d5da 100644 --- a/cronjobs/linkcheck.php +++ b/cronjobs/linkcheck.php @@ -79,7 +79,7 @@ // Check if it is a valid internal link. foreach ( $siteURLs as $siteURL ) { - $siteURL = preg_replace("/\/$/e", "", $siteURL ); + $siteURL = preg_replace("/\/$/", "", $siteURL ); $fp = @fopen( $siteURL . "/". $url, "r" ); if ( !$fp ) { diff --git a/design/admin/javascript/admin2pp_dragndrop_children.js b/design/admin/javascript/admin2pp_dragndrop_children.js new file mode 100644 index 00000000000..e02ae38d5bd --- /dev/null +++ b/design/admin/javascript/admin2pp_dragndrop_children.js @@ -0,0 +1,94 @@ +/** + * $Id: admin2pp_dragndrop_children.js 79 2010-03-14 11:19:58Z dpobel $ + * $HeadURL: http://svn.projects.ez.no/admin2pp/trunk/extension/admin2pp/design/admin2/javascript/admin2pp_dragndrop_children.js $ + * + */ + +function admin2ppDragNDropChildren() { + this.sortOrder = 1; +} + +admin2ppDragNDropChildren.PRIORITY_OFFSET = 2; +admin2ppDragNDropChildren.TABLE_ID = 'content-sub-items-list > table'; + +admin2ppDragNDropChildren.prototype = { + init:function() { + var instance = this; + this.sortOrder = subItemsTable.get('sortedBy').dir === 'yui-dt-asc' ? 1 : -1; + jQuery('#' + admin2ppDragNDropChildren.TABLE_ID + ' .yui-dt-data').sortable( { + placeholder: { + /** + * Function to create the placeholder + */ + element: function(currentItem) { + var tr = $('