本文整理匯總了PHP中plugin::processFileChanges方法的典型用法代碼示例。如果您正苦於以下問題:PHP plugin::processFileChanges方法的具體用法?PHP plugin::processFileChanges怎麽用?PHP plugin::processFileChanges使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類plugin
的用法示例。
在下文中一共展示了plugin::processFileChanges方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: processFileChanges
public function processFileChanges($install = true, $files = null)
{
global $messageStack;
$success = parent::processFileChanges($install, $files);
// Handle the case where query_factory has not been patched to fix the
// handling of Zen Cart's SQL Cache and Zen Cart's SQL Cache is enabled.
// Note: the patches are now included with Zen Cart >= 1.5.2
$zcversion = PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR;
if (version_compare($zcversion, '1.5.2', '<') && defined('SQL_CACHE_METHOD') && SQL_CACHE_METHOD != 'none') {
$file = @file_get_contents(DIR_FS_CATALOG . DIR_WS_CLASSES . 'db/mysql/query_factory.php');
if ($file === false) {
$success = false;
$messageStack->add(sprintf(USU_PLUGIN_INSTALL_ERROR_CORE_FILE_NOT_FOUND, DIR_FS_CATALOG . DIR_WS_CLASSES . 'db/mysql/query_factory.php', 'DIR_FS_CATALOG . DIR_WS_CLASSES'), 'warning');
} else {
if (!preg_match('~function\\sRecordCount\\(\\)\\s?\\{\\s+if\\s?\\(\\$this->is_cached\\).+?\\}~s', $file)) {
if ($install) {
$success = false;
}
$messageStack->add(sprintf(USU_PLUGIN_INSTALL_ERROR_QUERY_FACTORY, DIR_FS_CATALOG . DIR_WS_CLASSES . 'db/mysql/query_factory.php', 'DIR_FS_CATALOG . DIR_WS_CLASSES'), 'warning');
}
}
}
return $success;
}