Index: kernel/classes/ezcontentlanguage.php
===================================================================
--- kernel/classes/ezcontentlanguage.php	(revision 23817)
+++ kernel/classes/ezcontentlanguage.php	(working copy)
@@ -686,14 +686,7 @@
         }
 
         $db = eZDB::instance();
-        if ( $db->databaseName() == 'oracle' )
-        {
-            return "\n bitand( $languageListTable.$languageListAttributeName, $mask ) > 0 \n";
-        }
-        else
-        {
-            return "\n $languageListTable.$languageListAttributeName & $mask > 0 \n";
-        }
+        return "\n " . $db->bitAnd( "$languageListTable.$languageListAttributeName", $mask ) . " > 0 \n";
     }
 
     /**
@@ -718,31 +711,15 @@
         }
 
         $prioritizedLanguages = eZContentLanguage::prioritizedLanguages();
-        if ( $db->databaseName() == 'oracle' )
-        {
-            $leftSide = "bitand( $languageListTable.$languageListAttributeName - bitand( $languageListTable.$languageListAttributeName, $languageTable.$languageAttributeName ), 1 )\n";
-            $rightSide = "bitand( $languageTable.$languageAttributeName, 1 )\n";
-        }
-        else
-        {
-            $leftSide = "    ( (   $languageListTable.$languageListAttributeName - ( $languageListTable.$languageListAttributeName & $languageTable.$languageAttributeName ) ) & 1 )\n";
-            $rightSide = "  ( $languageTable.$languageAttributeName & 1 )\n";
-        }
+        $leftSide = ' ' . $db->bitAnd( "$languageListTable.$languageListAttributeName - " . $db->bitAnd( "$languageListTable.$languageListAttributeName", "$languageTable.$languageAttributeName" ), 1 ) . "\n";
+        $rightSide = ' ' . $db->bitAnd( "$languageTable.$languageAttributeName", 1 ) . "\n";
 
         for ( $index = count( $prioritizedLanguages ) - 1, $multiplier = 2; $index >= 0; $index--, $multiplier *= 2 )
         {
             $id = $prioritizedLanguages[$index]->attribute( 'id' );
 
-            if ( $db->databaseName() == 'oracle' )
-            {
-                $leftSide .= "   + bitand( $languageListTable.$languageListAttributeName - bitand( $languageListTable.$languageListAttributeName, $languageTable.$languageAttributeName ), $id )";
-                $rightSide .= "   + bitand( $languageTable.$languageAttributeName, $id )";
-            }
-            else
-            {
-                $leftSide .= "   + ( ( ( $languageListTable.$languageListAttributeName - ( $languageListTable.$languageListAttributeName & $languageTable.$languageAttributeName ) ) & $id )";
-                $rightSide .= "   + ( ( $languageTable.$languageAttributeName & $id )";
-            }
+            $leftSide .= '   + ( ' . $db->bitAnd( "$languageListTable.$languageListAttributeName - " . $db->bitAnd( "$languageListTable.$languageListAttributeName", "$languageTable.$languageAttributeName" ), $id );
+            $rightSide .= '   + ( ' . $db->bitAnd( "$languageTable.$languageAttributeName", $id );
 
             if ( $multiplier > $id )
             {
@@ -774,21 +751,11 @@
                 $leftSide .= $factorTerm;
                 $rightSide .= $factorTerm;
             }
-            if ( $db->databaseName() != 'oracle' )
-            {
-                $leftSide .= " )\n";
-                $rightSide .= " )\n";
-            }
+            $leftSide .= " )\n";
+            $rightSide .= " )\n";
         }
 
-        if ( $db->databaseName() == 'oracle' )
-        {
-            $sql = "bitand( $languageTable.$languageAttributeName, $languageListTable.$languageListAttributeName ) > 0";
-        }
-        else
-        {
-            $sql = "$languageTable.$languageAttributeName & $languageListTable.$languageListAttributeName > 0";
-        }
+        $sql = $db->bitAnd( "$languageTable.$languageAttributeName", "$languageListTable.$languageListAttributeName" ) . ' > 0';
 
         return "\n ( $sql AND\n $leftSide   <\n   $rightSide ) \n";
     }
@@ -801,17 +768,12 @@
         $db = eZDB::instance();
 
         $languageID = $this->ID;
-        if ( $db->databaseName() == 'oracle' )
-        {
-            $whereSQL = "bitand( language_mask, $languageID ) > 0";
-        }
-        else
-        {
-            $whereSQL = "language_mask & $languageID > 0";
-        }
+        $whereSQL = $db->bitAnd( 'language_mask', $languageID ) . ' > 0';
 
         $count = $db->arrayQuery( "SELECT COUNT(*) AS count FROM ezcontentobject WHERE $whereSQL" );
-        return $count[0]['count'];
+        $count = $count[0]['count'];
+
+        return $count;
     }
 
     /**
@@ -822,14 +784,7 @@
         $db = eZDB::instance();
 
         $languageID = $this->ID;
-        if ( $db->databaseName() == 'oracle' )
-        {
-            $whereSQL = "bitand( language_mask, $languageID ) > 0";
-        }
-        else
-        {
-            $whereSQL = "language_mask & $languageID > 0";
-        }
+        $whereSQL = $db->bitAnd( 'language_mask', $languageID ) . ' > 0';
 
         $count = $db->arrayQuery( "SELECT COUNT(*) AS count FROM ezcontentclass WHERE $whereSQL" );
         $count = $count[0]['count'];
Index: kernel/classes/ezurlaliasml.php
===================================================================
--- kernel/classes/ezurlaliasml.php	(revision 23817)
+++ kernel/classes/ezurlaliasml.php	(working copy)
@@ -2262,15 +2262,9 @@
      Wraps a database md5 call around the string $text and returns the new SQL for it.
 
      \param $escape If true it will lowercase the text and escape it.
-     \note If the database is Oracle and the text is empty the MD5 is computed by PHP
-           and returned.
      */
     static private function md5( $db, $text, $escape = true )
     {
-        // Special case for Oracle since it cannot calculate MD5 for empty strings
-        if ( strlen( $text ) == 0 && $db->databaseName() == 'oracle' )
-            return "'" . $db->escapeString( md5( $text ) ) . "'";
-
         if ( $escape )
             $text = $db->escapeString( eZURLAliasML::strtolower( $text ) );
         return $db->md5( "'" . $text . "'" );
Index: kernel/classes/ezcontentobject.php
===================================================================
--- kernel/classes/ezcontentobject.php	(revision 23817)
+++ kernel/classes/ezcontentobject.php	(working copy)
@@ -2877,16 +2877,8 @@
         {
             $relationTypeMask = eZContentObject::relationTypeMask( $relationTypeMask );
         }
+        $relationTypeMasking .= ' AND ' . $db->bitAnd( 'relation_type', $relationTypeMask ) . ' <> 0 ';
 
-        if ( $db->databaseName() == 'oracle' )
-        {
-            $relationTypeMasking .= " AND bitand( relation_type, $relationTypeMask ) <> 0 ";
-        }
-        else
-        {
-            $relationTypeMasking .= " AND ( relation_type & $relationTypeMask ) <> 0 ";
-        }
-
         // Create SQL
         $versionNameTables = ', ezcontentobject_name ';
         $versionNameTargets = ', ezcontentobject_name.name as name,  ezcontentobject_name.real_translation ';
@@ -3217,16 +3209,8 @@
         {
             $relationTypeMask = eZContentObject::relationTypeMask( $relationTypeMask );
         }
+        $relationTypeMasking .= ' AND ' . $db->bitAnd( 'relation_type', $relationTypeMask ) . ' <> 0 ';
 
-        if ( $db->databaseName() == 'oracle' )
-        {
-            $relationTypeMasking .= " AND bitand( relation_type, $relationTypeMask ) <> 0 ";
-        }
-        else
-        {
-            $relationTypeMasking .= " AND ( relation_type & $relationTypeMask ) <> 0 ";
-        }
-
         if ( $reverseRelatedObjects )
         {
             if ( is_array( $objectID ) )
@@ -5678,18 +5662,9 @@
 
         // Update masks of the objects
         $mask = eZContentLanguage::maskForRealLanguages() - (int) $languageID;
+        $db->query( 'UPDATE ezcontentobject_version SET language_mask = ' . $db->bitAnd( 'language_mask', $mask ) .
+                    " WHERE contentobject_id='$objectID'" );
 
-        if ( $db->databaseName() == 'oracle' )
-        {
-            $db->query( "UPDATE ezcontentobject_version SET language_mask = bitand( language_mask, $mask )
-                         WHERE contentobject_id='$objectID'" );
-        }
-        else
-        {
-            $db->query( "UPDATE ezcontentobject_version SET language_mask = language_mask & $mask
-                         WHERE contentobject_id='$objectID'" );
-        }
-
         $urlElementfilter = new eZURLAliasQuery();
         $urlElementfilter->type = 'name';
         // We want all languages present here, so we are turning off
Index: kernel/setup/steps/ezstep_create_sites.php
===================================================================
--- kernel/setup/steps/ezstep_create_sites.php	(revision 23817)
+++ kernel/setup/steps/ezstep_create_sites.php	(working copy)
@@ -685,22 +685,11 @@
             $primaryLanguageID = (int)$primaryLanguageObj->attribute( 'id' );
 
             // Find objects which are always available
-            if ( $db->databaseName() == 'oracle' )
-            {
-                $sql = "SELECT id
+            $sql = 'SELECT id
 FROM
 ezcontentobject
 WHERE
-bitand( language_mask, 1 ) = 1";
-            }
-            else
-            {
-                $sql = "SELECT id
-FROM
-ezcontentobject
-WHERE
-language_mask & 1 = 1";
-            }
+' . $db->bitAnd( 'language_mask', 1 ) . ' = 1';
             $objectList = array();
             $list = $db->arrayQuery( $sql );
             foreach ( $list as $row )
