eZPublish  3.8
convertxmllinks.php File Reference

Functions

 findLinkTags (&$text, &$pos, &$isTextModified)
 

Variables

 $cli =& eZCLI::instance()
 
 $dbHost = $options['db-host']
 
 $dbImpl = $options['db-type']
 
 $dbName = $options['db-database']
 
 $dbPassword = $options['db-password']
 
 $dbUser = $options['db-user']
 
 $isQuiet = $script->isQuiet()
 
 $options
 
 $pass = 1
 
 $script
 
if(!$db->isConnected()) $totalCount = 0
 
 $xmlFieldsArray = $db->arrayQuery( $xmlFieldsQuery, array( "limit" => QUERY_LIMIT ) )
 
 $xmlFieldsQuery
 
if($dbHost or $dbName or
$dbUser or $dbImpl) 
else
 
 if (!file_exists( 'update/common/scripts')||!is_dir( 'update/common/scripts'))
 
const QUERY_LIMIT 100
 

Detailed Description

Database converter for eZ publish 3.6. Updates <link> tags in 'ezxmltext' type attributes: replaces 'id' attribute with 'url_id'. You should run this script before using database created with eZ publish version 3.5.* or lower.

Database converter for eZ publish 3.6. Don't forget to update database structute before running this script.

Updates 'ezcontentobject_link' table by adding related objects links made with attributes of 'ezobjectrelation' and 'ezobjectrelationlist' types.

You should run this script before using a database created with eZ publish version 3.5.* or lower.

Function Documentation

findLinkTags ( $text,
$pos,
$isTextModified 
)

Finds all link tags in text $text and replaces the attribute id with url_id.

Parameters
$posThe current position to start looking for tags in $text.
$isTextModifiedThe global flag which tells if a link was modified or not
Returns
true if it has found a link tag, false otherwise.

Variable Documentation

$cli =& eZCLI::instance()
$dbHost = $options['db-host']
$dbImpl = $options['db-type']
$dbName = $options['db-database']
$dbPassword = $options['db-password']
$dbUser = $options['db-user']
$isQuiet = $script->isQuiet()
$options
Initial value:
= $script->getOptions( "[db-host:][db-user:][db-password:][db-database:][db-type:]",
"",
array( 'db-host' => "Database host",
'db-user' => "Database user",
'db-password' => "Database password",
'db-database' => "Database name",
'db-type' => "Database type, e.g. mysql or postgresql"
) )
$script
Definition: clusterize.php:132
$pass = 1
$script
Initial value:
=& eZScript::instance( array( 'description' => ( "\nDatabase converter for eZ publish 3.6.\n" .
"Updates <link> tags in 'ezxmltext' type attributes.\n" .
"Run this script before using database created with eZ publish version 3.5.* or lower." ),
'use-session' => false,
'use-modules' => false,
'use-extensions' => false ) )
& instance($settings=array())
Definition: ezscript.php:1011
if (!$db->isConnected()) $totalCount = 0
$xmlFieldsArray = $db->arrayQuery( $xmlFieldsQuery, array( "limit" => QUERY_LIMIT ) )
$xmlFieldsQuery
Initial value:
= "SELECT id, version, contentobject_id, data_text
FROM ezcontentobject_attribute
WHERE data_type_string = 'ezxmltext'"
if ($dbHost or $dbName or $dbUser or $dbImpl) else
Initial value:
{
& instance($databaseImplementation=false, $databaseParameters=false, $forceNewInstance=false)
Definition: ezdb.php:148
$db
Definition: convertprice2multiprice.php:80
if(!file_exists( 'update/common/scripts')||!is_dir( 'update/common/scripts'))
const QUERY_LIMIT 100