Skip to content

Commit

Permalink
[jan] Fix setting key prefixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Feb 17, 2015
1 parent 53a8675 commit 3b25124
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion framework/HashTable/lib/Horde/HashTable/Predis.php
Expand Up @@ -170,7 +170,7 @@ public function hkey($key)
{
/* Key is MD5 encoded. But don't MD5 encode the prefix part, or else
* clear() won't work properly. */
return $this->_prefix . hash('md5', $key);
return $this->_params['prefix'] . hash('md5', $key);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion framework/HashTable/lib/Horde/HashTable/Vfs.php
Expand Up @@ -134,7 +134,7 @@ public function hkey($key)
{
/* Key is SHA-1 encoded (can't use FNV1-32 here, since key must be
* the same if upgrading from PHP 5.3 -> 5.4+). */
return hash('sha1', $this->_prefix . $key);
return hash('sha1', $this->_params['prefix'] . $key);
}

}
4 changes: 2 additions & 2 deletions framework/HashTable/package.xml
Expand Up @@ -21,7 +21,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [jan] Fix setting key prefixes.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -304,7 +304,7 @@
<date>2015-02-10</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [jan] Fix setting key prefixes.
</notes>
</release>
</changelog>
Expand Down

0 comments on commit 3b25124

Please sign in to comment.