namespace wcf\data;
use wcf\system\WCF;
-use wcf\util\StringUtil;
/**
* Abstract class for a list of database objects with better sorting of i18n-based columns.
throw new \DomainException("Array keys and values of '" . $this->className . "::\$i18nFields' must start with a small letter and consist of letters and number only.");
}
- $matchTable = 'i18n_' . StringUtil::getHash($key);
+ $matchTable = 'i18n_' . \sha1($key);
$this->sqlSelects .= (!empty($this->sqlSelects) ? ', ' : '') . "COALESCE(" . $matchTable . ".languageItemValue, " . $this->getDatabaseTableAlias() . "." . $key . ") AS " . $value;
$this->sqlJoins .= "
}
// build search hash
- $this->searchHash = StringUtil::getHash(\serialize([
+ $this->searchHash = \sha1(\serialize([
$this->query,
$this->selectedObjectTypes,
!$this->subjectOnly,
$i = -1;
// find an unused codeID
do {
- $codeID = $prefix . \mb_substr(StringUtil::getHash($code), 0, 6) . (++$i ? '_' . $i : '');
+ $codeID = $prefix . \mb_substr(\sha1($code), 0, 6) . (++$i ? '_' . $i : '');
} while (isset(self::$codeIDs[$codeID]));
// mark codeID as used
use wcf\system\exporter\IExporter;
use wcf\system\importer\ImportHandler;
use wcf\system\WCF;
-use wcf\util\StringUtil;
/**
* Worker implementation for data import.
ImportHandler::getInstance()->setUserMergeMode($this->importData['userMergeMode']);
ImportHandler::getInstance()->setImportHash(\substr(
- StringUtil::getHash(
+ \sha1(
$this->importData['dbHost'] . $this->importData['dbName'] . $this->importData['dbPrefix']
),
0,
const MINUS = "\u{2212}";
/**
- * Alias to php sha1() function.
- *
- * @param string $value
- * @return string
+ * @deprecated 5.5 - Use \sha1() directly.
*/
public static function getHash($value)
{