本文整理汇总了PHP中KunenaForum::isSVN方法的典型用法代码示例。如果您正苦于以下问题:PHP KunenaForum::isSVN方法的具体用法?PHP KunenaForum::isSVN怎么用?PHP KunenaForum::isSVN使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KunenaForum
的用法示例。
在下文中一共展示了KunenaForum::isSVN方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: kunena_upgrade_161_delfiles
function kunena_upgrade_161_delfiles($parent) {
if (KunenaForum::isSVN()) return;
//Import filesystem libraries.
jimport ( 'joomla.filesystem.folder' );
$path = JPATH_COMPONENT.'/views/article';
if(JFolder::exists($path)) JFolder::delete($path);
return array('action'=>'', 'name'=>JText::_ ( 'COM_KUNENA_INSTALL_161_DELFILES' ), 'success'=>true);
}
示例2: stepFinish
public function stepFinish() {
kimport ('kunena.factory');
$entryfiles = array(
array(KPATH_ADMIN, 'api', 'php'),
array(KPATH_ADMIN, 'admin.kunena', 'php'),
array(KPATH_SITE, 'router', 'php'),
array(KPATH_SITE, 'kunena', 'php'),
);
$lang = JFactory::getLanguage();
$lang->load('com_kunena',JPATH_SITE);
$this->createMenu(false);
foreach ($entryfiles as $fileparts) {
list($path, $filename, $ext) = $fileparts;
if (is_file("{$path}/{$filename}.new.{$ext}")) {
$success = JFile::delete("{$path}/{$filename}.{$ext}");
if (!$success) $this->addStatus ( JText::_('COM_KUNENA_INSTALL_DELETE_STATUS_FAIL')." {$filename}.{$ext}", false, '' );
$success = JFile::move("{$path}/{$filename}.new.{$ext}", "{$path}/{$filename}.{$ext}");
if (!$success) $this->addStatus ( JText::_('COM_KUNENA_INSTALL_RENAMING_FAIL')." {$filename}.new.{$ext}", false, '' );
}
}
// Cleanup directory structure
if (!KunenaForum::isSVN()) {
if( JFolder::exists(KPATH_ADMIN . '/language') ) JFolder::delete(KPATH_ADMIN . '/language');
if( JFolder::exists(KPATH_SITE . '/language') ) JFolder::delete(KPATH_SITE . '/language');
}
if (! $this->getError ()) {
$this->updateVersionState ( '' );
$this->addStatus ( JText::_('COM_KUNENA_INSTALL_SUCCESS'), true, '' );
$this->setStep ( $this->getStep()+1 );
}
}