Add possibility to specify delimiter in StringStack::pushToStringStack()
authorTim Düsterhus <duesterhus@woltlab.com>
Sat, 13 Apr 2013 21:27:02 +0000 (23:27 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Sat, 13 Apr 2013 21:27:58 +0000 (23:27 +0200)
wcfsetup/install/files/lib/util/StringStack.class.php

index f57861e3eeab7d5b0a0f6e210f291bfa52d856d4..cd52da0bedb4d00f3013aca7294a96134fc5e0bf 100644 (file)
@@ -25,8 +25,8 @@ final class StringStack {
         * @param       string          $type
         * @return      string          $hash
         */
-       public static function pushToStringStack($string, $type = 'default') {
-               $hash = '@@'.StringUtil::getHash(uniqid(microtime()).$string).'@@';
+       public static function pushToStringStack($string, $type = 'default', $delimiter = '@@') {
+               $hash = $delimiter.StringUtil::getHash(uniqid(microtime()).$string).$delimiter;
                
                if (!isset(self::$stringStack[$type])) {
                        self::$stringStack[$type] = array();