本文整理汇总了PHP中ShopFunctions::tested方法的典型用法代码示例。如果您正苦于以下问题:PHP ShopFunctions::tested方法的具体用法?PHP ShopFunctions::tested怎么用?PHP ShopFunctions::tested使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShopFunctions
的用法示例。
在下文中一共展示了ShopFunctions::tested方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkSafePath
static function checkSafePath($safePath = 0)
{
if ($safePath == 0) {
$safePath = VmConfig::get('forSale_path', 0);
if (self::$tested) {
return $safePath;
}
}
$warn = FALSE;
$uri = JFactory::getURI();
$configlink = $uri->root() . 'administrator/index.php?option=com_virtuemart&view=config';
VmConfig::loadJLang('com_virtuemart');
if (empty($safePath)) {
$warn = 'COM_VIRTUEMART_WARN_NO_SAFE_PATH_SET';
} else {
$exists = JFolder::exists($safePath);
if (!$exists) {
$warn = 'COM_VIRTUEMART_WARN_SAFE_PATH_WRONG';
} else {
if (!is_writable($safePath)) {
VmConfig::loadJLang('com_virtuemart_config');
VmWarn('COM_VIRTUEMART_WARN_SAFE_PATH_NOT_WRITEABLE', JText::_('COM_VIRTUEMART_ADMIN_CFG_MEDIA_FORSALE_PATH'), $safePath, $configlink);
} else {
if (!is_writable(self::getInvoicePath($safePath))) {
VmConfig::loadJLang('com_virtuemart_config');
VmWarn('COM_VIRTUEMART_WARN_SAFE_PATH_INV_NOT_WRITEABLE', JText::_('COM_VIRTUEMART_ADMIN_CFG_MEDIA_FORSALE_PATH'), $safePath, $configlink);
}
}
}
}
if ($warn) {
self::$tested = true;
$suggestedPath = shopFunctions::getSuggestedSafePath();
VmConfig::loadJLang('com_virtuemart_config');
VmWarn($warn, JText::_('COM_VIRTUEMART_ADMIN_CFG_MEDIA_FORSALE_PATH'), $suggestedPath, $configlink);
return FALSE;
}
return $safePath;
}