Are there any documentation for eZ publish on the ezurl-table(urgent)

Author Message

K259

Friday 01 April 2005 12:24:43 am

We're going to change all our email-addresses on our ez-site.We want to replace all @x.x.de addresses with @x.de.

I'm thinking of doing a replace in the mysql prompt in the ezurl table..where I replace all istances of @x.x.de with @x.de in the url field.

BUT, I see that there is a field in the ezurl table called original_url_md5 which is a hashed value. In which way is this field beeing used? Do I have to update this as well?

The original_url_md5 is a hashed value of $url-field, but I don't find any documentation on where this is beeing used, or which function this field has.

Does anyone know where there is documentation on this? The docs. I've found about the ezurl table are just a few lines and don't describe the original_url_md5 field.

Paul Forsyth

Friday 01 April 2005 12:29:50 am

You should update this. I quickly 'grep'ed around and found that value being used in a few places, and in the class:

kernel/common/ezurloperator.php

So to be safe update it :)

paul

K259

Friday 01 April 2005 12:38:47 am

Yup, I've seen it, but still don't know why this field is necessary.

In our eZ publish installation, this original_url_md5 field-value is registered in just 50% of the cases, <b>therefore I wondered...why do we need this original_url_md5 field?</b>

 function &create( $url )
00097     {
00098         $dateTime = time();
00099         $row = array(
00100             'id' => null,
00101             'url' => $url,
00102             'original_url_md5' => md5( $url ),
00103             'is_valid' => true,
00104             'last_checked' => 0,
00105             'created' => $dateTime,
00106             'modified' => $dateTime );
00107         return new eZURL( $row );
00108     }

and

function &urlByMD5( $urlMD5 )
00404     {
00405         $db =& eZDB::instance();
00406 
00407         $url = false;
00408         $checkURLQuery = "SELECT url FROM ezurl WHERE original_url_md5='$urlMD5'";
00409         $urlArray =& $db->arrayQuery( $checkURLQuery );
00410 
00411         if ( count( $urlArray ) == 1 )
00412         {
00413             $url =& $urlArray[0]['url'];
00414         }
00415         return $url;
00416     }

I will update the docs as soon as I get some more information about why we need this field. Why is it necessary to hash an url-value ;) hmm..

Kåre Køhler Høvik

Friday 01 April 2005 4:27:01 am

Hi

It's used by the the exturl operator ( registering extenral url's in templates ): http://www.ez.no/ez_publish/documentation/reference/template_operators/urls/exturl

Kåre Høvik

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.