当前位置: 首页>>代码示例>>PHP>>正文


PHP RSMembershipHelper::isJ25方法代码示例

本文整理汇总了PHP中RSMembershipHelper::isJ25方法的典型用法代码示例。如果您正苦于以下问题:PHP RSMembershipHelper::isJ25方法的具体用法?PHP RSMembershipHelper::isJ25怎么用?PHP RSMembershipHelper::isJ25使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RSMembershipHelper的用法示例。


在下文中一共展示了RSMembershipHelper::isJ25方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: unpatchmenu

 function unpatchmenu()
 {
     // Check for request forgeries
     JRequest::checkToken() or jexit('Invalid Token');
     jimport('joomla.filesystem.file');
     $menu = RSMembershipHelper::getPatchFile('menu');
     $buffer = JFile::read($menu);
     if (strpos($buffer, 'RSMembershipHelper') === false) {
         return $this->setRedirect('index.php?option=com_rsmembership&view=configuration&tabposition=1', JText::_('RSM_PATCH_NOT_APPLIED'));
     }
     if (!is_writable($menu)) {
         JError::raiseWarning(500, JText::_('RSM_PATCH_NOT_WRITABLE'));
         return $this->setRedirect('index.php?option=com_rsmembership&view=configuration&tabposition=1');
     }
     if (RSMembershipHelper::isJ16()) {
         if (RSMembershipHelper::isJ25()) {
             $with = "\$items \t\t= \$menu->getItems('menutype', \$params->get('menutype'));";
         } else {
             $with = "\$items \t\t= \$menu->getItems('menutype',\$params->get('menutype'));";
         }
         $replace = $with . "\n" . "\t\t" . "if (file_exists(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_rsmembership'.DS.'helpers'.DS.'rsmembership.php')) {" . "\n" . "\t\t\t" . "include_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_rsmembership'.DS.'helpers'.DS.'rsmembership.php');" . "\n" . "\t\t\t" . "RSMembershipHelper::checkMenuShared(\$items);" . "\n" . "\t\t" . "}" . "\n";
         $buffer = str_replace($replace, $with, $buffer);
     } else {
         $possibles = array("\n" . "\t\t\t" . "RSMembershipHelper::checkMenuShared(&\$rows);", "\n" . "\t\t\t" . "RSMembershipHelper::checkMenuShared(\$rows);");
         foreach ($possibles as $possible) {
             $with = "\$rows = \$items->getItems('menutype', \$params->get('menutype'));";
             $replace = $with . "\n" . "\t\t" . "if (file_exists(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_rsmembership'.DS.'helpers'.DS.'rsmembership.php')) {" . "\n" . "\t\t\t" . "include_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_rsmembership'.DS.'helpers'.DS.'rsmembership.php');" . $possible . "\n" . "\t\t" . "}" . "\n";
             $buffer = str_replace($replace, $with, $buffer);
         }
     }
     if (JFile::write($menu, $buffer)) {
         return $this->setRedirect('index.php?option=com_rsmembership&view=configuration', JText::_('RSM_PATCH_REMOVED_SUCCESS'));
     }
     JError::raiseWarning(500, JText::_('RSM_PATCH_NOT_WRITABLE'));
     $this->setRedirect('index.php?option=com_rsmembership&view=configuration&tabposition=1');
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:36,代码来源:configuration.php


注:本文中的RSMembershipHelper::isJ25方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。