| 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 Exponential 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.. |