• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP JoomlapackHelperUtils类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: init

 /**
  * Implements the init method of JoomlapackFilter
  *
  */
 function init()
 {
     $jreg =& JFactory::getConfig();
     $configuration =& JoomlapackModelRegistry::getInstance();
     $this->_skipContainedDirectoriesFilter = array();
     $temp = $this->_loadFilters();
     if (DS == '\\') {
         if (is_array($temp)) {
             foreach ($temp as $filter) {
                 $this->_skipContainedDirectoriesFilter[] = JoomlapackHelperUtils::TranslateWinPath(JPATH_SITE . DS . $filter);
             }
         }
     } else {
         if (is_array($temp)) {
             foreach ($temp as $filter) {
                 $this->_skipContainedDirectoriesFilter[] = JPATH_SITE . DS . $filter;
             }
         }
     }
     // Add temporary and output directories
     $this->_skipContainedDirectoriesFilter[] = JoomlapackHelperUtils::TrimTrailingSlash(JoomlapackHelperUtils::TranslateWinPath($configuration->get('OutputDirectory')));
     $this->_skipContainedDirectoriesFilter[] = JoomlapackHelperUtils::TrimTrailingSlash(JoomlapackHelperUtils::TranslateWinPath($configuration->getTemporaryDirectory()));
     $this->_skipContainedDirectoriesFilter[] = JoomlapackHelperUtils::TrimTrailingSlash(JoomlapackHelperUtils::TranslateWinPath($jreg->getValue('config.tmp_path')));
     $this->_skipContainedDirectoriesFilter[] = JoomlapackHelperUtils::TrimTrailingSlash(JoomlapackHelperUtils::TranslateWinPath(JPATH_CACHE));
     $this->_skipContainedDirectoriesFilter[] = JoomlapackHelperUtils::TrimTrailingSlash(JoomlapackHelperUtils::TranslateWinPath(JPATH_ADMINISTRATOR . DS . 'cache'));
     $this->_skipContainedDirectoriesFilter[] = JoomlapackHelperUtils::TrimTrailingSlash(JoomlapackHelperUtils::TranslateWinPath(JPATH_ROOT . DS . 'cache'));
     // Hack: add the same paths untranslated
     $this->_skipContainedDirectoriesFilter[] = JoomlapackHelperUtils::TrimTrailingSlash($configuration->get('OutputDirectory'));
     $this->_skipContainedDirectoriesFilter[] = JoomlapackHelperUtils::TrimTrailingSlash($configuration->getTemporaryDirectory());
     $this->_skipContainedDirectoriesFilter[] = JoomlapackHelperUtils::TrimTrailingSlash($jreg->getValue('config.tmp_path'));
     $this->_skipContainedDirectoriesFilter[] = JoomlapackHelperUtils::TrimTrailingSlash(JPATH_CACHE);
     $this->_skipContainedDirectoriesFilter[] = JoomlapackHelperUtils::TrimTrailingSlash(JPATH_ADMINISTRATOR . DS . 'cache');
     $this->_skipContainedDirectoriesFilter[] = JoomlapackHelperUtils::TrimTrailingSlash(JPATH_ROOT . DS . 'cache');
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:38,代码来源:skipdirs.php


示例2: display

 function display()
 {
     // Decide what to do; delegate data loading to private methods
     $task = JRequest::getCmd('task', 'display');
     $layout = JRequest::getCmd('layout', 'default');
     switch ($layout) {
         case 'default_edit':
             switch ($task) {
                 case 'add':
                     $helpfile = 'eff';
                     JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('EFF_PAGETITLE_NEW') . '</small></small>');
                     $this->_add();
                     break;
                 case 'edit':
                     $helpfile = 'eff';
                     JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('EFF_PAGETITLE_EDIT') . '</small></small>');
                     $this->_edit();
                     break;
             }
             break;
         default:
             $helpfile = 'eff';
             JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('EXTRADIRS') . '</small></small>');
             $this->_default();
             break;
     }
     // Load the util helper
     $this->loadHelper('utils');
     $document =& JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
     // Add a spacer, a help button and show the template
     JToolBarHelper::spacer();
     JoomlapackHelperUtils::addLiveHelp('$helpfile');
     parent::display();
 }
开发者ID:Ratmir15,项目名称:Joomla---formula-of-success,代码行数:35,代码来源:view.html.php


示例3: display

 function display()
 {
     $task = JRequest::getCmd('task', 'default');
     switch ($task) {
         case 'showcomment':
             JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('BUADMIN') . '</small></small>');
             JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option') . '&view=buadmin');
             JoomlapackHelperUtils::addLiveHelp('buadmin');
             $document =& JFactory::getDocument();
             $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
             jpimport('models.statistics', true);
             $model =& JoomlapackModelStatistics::getInstance('Statistics', 'JoomlapackModel');
             $model->setId(JRequest::getInt('id'));
             $record =& $model->getStatistic();
             $this->assignRef('record', $record);
             JRequest::setVar('tpl', 'comment');
             break;
         case 'restore':
             JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('BUADMIN') . '</small></small>');
             JRequest::setVar('tpl', 'restore');
             $this->assign('password', JRequest::getVar('password'));
             $this->assign('link', JRequest::getVar('linktarget'));
             break;
         default:
             $registry =& JoomlapackModelRegistry::getInstance();
             $easy = $registry->get('easymode', false);
             if (!$easy) {
                 JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('BUADMIN') . '</small></small>');
             } else {
                 JToolBarHelper::title(JText::_('JOOMLAPACKEASY') . ': <small><small>' . JText::_('BUADMIN') . '</small></small>');
             }
             JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
             JToolBarHelper::spacer();
             JToolBarHelper::deleteList();
             JToolBarHelper::custom('deletefiles', 'delete.png', 'delete_f2.png', JText::_('STATS_LABEL_DELETEFILES'), true);
             JToolBarHelper::save('download', JText::_('STATS_LOG_DOWNLOAD'));
             if (!$easy) {
                 JToolBarHelper::editList('showcomment', JText::_('STATS_LOG_VIEWCOMMENT'));
                 if (JPSPECIALEDITION) {
                     JToolBarHelper::publish('restore', JText::_('STATS_LOG_RESTORE'));
                 }
             }
             JToolBarHelper::spacer();
             if (!$easy) {
                 JoomlapackHelperUtils::addLiveHelp('buadmin');
             } else {
                 JoomlapackHelperUtils::addLiveHelp('buadmineasy');
             }
             $document =& JFactory::getDocument();
             $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
             jpimport('models.statistics', true);
             $model =& JoomlapackModelStatistics::getInstance('Statistics', 'JoomlapackModel');
             $list =& $model->getStatisticsListWithMeta();
             $this->assignRef('list', $list);
             $this->assignRef('pagination', $model->getPagination());
             $this->assign('easy', $easy);
             break;
     }
     parent::display(JRequest::getVar('tpl'));
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:60,代码来源:view.html.php


示例4: display

 function display()
 {
     // Set the toolbar title; add a help button
     JToolBarHelper::title(JText::_('JOOMLAPACKEASY') . ':: <small><small>' . JText::_('CONFIGURATION') . '</small></small>');
     JToolBarHelper::apply();
     JToolBarHelper::save();
     JToolBarHelper::cancel();
     JoomlapackHelperUtils::addLiveHelp('configeasy');
     $document =& JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
     // Load the util helper
     $this->loadHelper('utils');
     // Load the model
     $model =& $this->getModel();
     // Pass on the lists
     $this->assign('actionlogginglist', $model->getActionLoggingList());
     $this->assign('settingsmodelist', $model->getSettingsModeList());
     // Let's pass the data
     $this->assign('OutputDirectory', $model->getVar('OutputDirectoryConfig'));
     $this->assign('TarNameTemplate', $model->getVar('TarNameTemplate'));
     $this->assign('settingsmode', $model->getVar('settingsmode'));
     $this->assign('logLevel', $model->getVar('logLevel'));
     // Also load the Configuration HTML helper
     $this->loadHelper('config');
     parent::display();
 }
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:26,代码来源:view.html.php


示例5: WriteLog

 /**
  * Writes a line to the log, if the log level is high enough
  *
  * @param int|bool $level The log level (_JP_LOG_XX constants). Use FALSE to pause logging, TRUE to resume logging
  * @param string $message The message to write to the log
  */
 function WriteLog($level, $message)
 {
     static $configuredLoglevel;
     static $site_root;
     if (empty($site_root)) {
         if (!class_exists('JoomlapackHelperUtils')) {
             jpimport('helpers.utils', true);
         }
         $site_root = JoomlapackHelperUtils::TranslateWinPath(JPATH_SITE);
     }
     if (empty($configuredLoglevel) or $level === true) {
         // Load the registry
         if (!class_exists('JoomlapackModelRegistry')) {
             jpimport('models.registry', true);
         }
         $registry =& JoomlapackModelRegistry::getInstance();
         // Fetch log level
         $configuredLoglevel = $registry->get('logLevel');
     }
     if ($level === false) {
         // Pause logging
         $configuredLogLevel = false;
         return;
     }
     // Catch paused logging
     if ($configuredLoglevel === false) {
         return;
     }
     if ($configuredLoglevel >= $level && $configuredLoglevel != 0) {
         $logName = JoomlapackLogger::logName();
         $message = str_replace(JPATH_SITE, "<root>", $message);
         $message = str_replace($site_root, "<root>", $message);
         // Fix 2.4 - Also replace the translated path on Windows machines
         $message = str_replace("\n", ' \\n ', $message);
         // Fix 1.1.1 - Handle (error) messages containing newlines (by nicholas)
         switch ($level) {
             case _JP_LOG_ERROR:
                 $string = "ERROR   |";
                 break;
             case _JP_LOG_WARNING:
                 $string = "WARNING |";
                 break;
             case _JP_LOG_INFO:
                 $string = "INFO    |";
                 break;
             default:
                 $string = "DEBUG   |";
                 break;
         }
         $string .= @strftime("%y%m%d %T") . "|{$message}\r\n";
         $fp = @fopen($logName, "at");
         if (!($fp === FALSE)) {
             @fwrite($fp, $string);
             @fclose($fp);
         }
     }
 }
开发者ID:joomla-example,项目名称:joomla-repo,代码行数:63,代码来源:logger.php


示例6: getIconDefinitions

 /**
  * Get an array of icon definitions for the Control Panel
  *
  * @return array
  */
 function getIconDefinitions()
 {
     jpimport('helpers.utils', true);
     JoomlapackHelperUtils::getJoomlaPackVersion();
     $ret = array();
     $registry =& JoomlapackModelRegistry::getInstance();
     if ($registry->get('easymode', false)) {
         $ret[] = $this->_makeIconDefinition('reset.png', JText::_('SWITCHTOPRO'), 'switch');
         $ret[] = $this->_makeIconDefinition('config.png', JText::_('CONFIGURATION'), 'configeasy');
         $ret[] = $this->_makeIconDefinition('backup.png', JText::_('BACKUP'), 'backup');
         $ret[] = $this->_makeIconDefinition('bufa.png', JText::_('BUADMIN'), 'buadmin');
         $ret[] = $this->_makeIconDefinition('log.png', JText::_('VIEWLOG'), 'log');
     } else {
         $ret[] = $this->_makeIconDefinition('reset.png', JText::_('SWITCHTOEASY'), 'switch');
         if (JPSPECIALEDITION) {
             $ret[] = $this->_makeIconDefinition('profiles.png', JText::_('PROFILES'), 'profiles');
         }
         $ret[] = $this->_makeIconDefinition('config.png', JText::_('CONFIGURATION'), 'config');
         $ret[] = $this->_makeIconDefinition('backup.png', JText::_('BACKUP'), 'backup');
         $ret[] = $this->_makeIconDefinition('bufa.png', JText::_('BUADMIN'), 'buadmin');
         $ret[] = $this->_makeIconDefinition('log.png', JText::_('VIEWLOG'), 'log');
         if (JPSPECIALEDITION) {
             $ret[] = $this->_makeIconDefinition('multidb.png', $this->_labelInclusion(JText::_('MULTIDB'), 'multidb'), 'multidb');
         }
         if (JPSPECIALEDITION) {
             $ret[] = $this->_makeIconDefinition('dif.png', $this->_labelInclusion(JText::_('EXTRADIRS'), 'eff'), 'eff');
         }
         $ret[] = $this->_makeIconDefinition('sff.png', $this->_labelExclusion(JText::_('SFF'), 'sff'), 'sff');
         $ret[] = $this->_makeIconDefinition('def.png', $this->_labelExclusion(JText::_('DEF'), 'def'), 'def');
         if (JPSPECIALEDITION) {
             $ret[] = $this->_makeIconDefinition('full.png', $this->_labelExclusion(JText::_('DCS'), array('Skipfiles', 'Skipdirs')), 'skip');
         }
         if (JPSPECIALEDITION) {
             $ret[] = $this->_makeIconDefinition('dbef.png', $this->_labelExclusion(JText::_('DBEF'), 'dbef'), 'dbef');
         }
         if (JPSPECIALEDITION) {
             $ret[] = $this->_makeIconDefinition('extfilter.png', $this->_labelExclusion(JText::_('EXTFILTER'), array('components', 'modules', 'plugins', 'languages', 'templates')), 'extfilter');
         }
         if (JPSPECIALEDITION) {
             $ret[] = $this->_makeIconDefinition('cronman.png', JText::_('CRONMAN'), 'cronman');
         }
         //$ret[] = $this->_makeIconDefinition( 'ftp.png', JText::_('FTPXFERWIZARD'), 'ftpx' );
     }
     // Add Live Update button if it is supported on this server
     jpimport('models.update', true);
     $updatemodel =& JoomlapackModelUpdate::getInstance('update', 'JoomlapackModel');
     if ($updatemodel->isLiveUpdateSupported()) {
         $updates =& $updatemodel->getUpdates();
         if ($updates->update_available) {
             $ret[] = $this->_makeIconDefinition('error_big.png', JText::_('CPANEL_UPGRADE_NOW'), 'update');
         } else {
             $ret[] = $this->_makeIconDefinition('ok_big.png', JText::_('CPANEL_UPGRADE_UPTODATE'), 'update');
         }
     }
     return $ret;
 }
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:61,代码来源:cpanel.php


示例7: display

 function display()
 {
     // Add toolbar buttons
     JToolBarHelper::title(JText::_('JOOMLAPACK') . ': <small><small>' . JText::_('VIEWLOG') . '</small></small>');
     JToolBarHelper::back('Back', 'index.php?option=' . JRequest::getCmd('option'));
     JToolBarHelper::spacer();
     $document =& JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . 'components/com_joomlapack/assets/css/joomlapack.css');
     JoomlapackHelperUtils::addLiveHelp('log');
     parent::display();
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:11,代码来源:view.html.php


示例8: jimport

 function &getFolders($folder)
 {
     //JoomlapackLogger::WriteLog(_JP_LOG_DEBUG,'Getting folder list for '.($folder));
     jimport('joomla.filesystem.folder');
     $temp = JFolder::folders($folder, '.', false, true, array('.', '..'));
     $ret = array();
     if (!empty($temp)) {
         foreach ($temp as $file) {
             $ret[] = JPISWINDOWS ? JoomlapackHelperUtils::TranslateWinPath($file) : $file;
         }
     }
     return $ret;
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:13,代码来源:joomla.php


示例9: getStatusCell

 /**
  * Returns the HTML for the backup status cell
  *
  * @return string HTML
  */
 function getStatusCell()
 {
     if ($this->status && empty($this->quirks)) {
         $imageURL = JURI::base() . 'components/com_joomlapack/assets/images/ok_small.png';
         $html = '<p class="ok"><img src="' . $imageURL . '" border="0" width="16" height="16" />' . JText::_('JPSTATUSOK') . '</p>';
     } elseif ($this->status && !empty($this->quirks)) {
         $imageURL = JURI::base() . 'components/com_joomlapack/assets/images/ok_small.png';
         $html = '<p class="statuswarning"><img src="' . $imageURL . '" border="0" width="16" height="16" />' . JText::_('JPSTATUSWARN') . '</p>';
     } else {
         $imageURL = JURI::base() . 'components/com_joomlapack/assets/images/error_small.png';
         $html = '<p class="notok"><img src="' . $imageURL . '" border="0" width="16" height="16" />' . JText::_('JPSTATUSNOTOK') . '</p>';
     }
     jpimport('helpers.utils', true);
     JoomlapackHelperUtils::getJoomlaPackVersion();
     $html .= '<p><span style="font-size: small; color: #666666">' . JText::_('JOOMLAPACK') . ' ' . _JP_VERSION . ' (' . _JP_DATE . ')</span></p>';
     return $html;
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:22,代码来源:status.php


示例10: init

 /**
  * Loads the file filters off the database and stores them in the _singleFileFilters array
  *
  */
 function init()
 {
     $configuration =& JoomlapackModelRegistry::getInstance();
     $temp = $this->_loadFilters();
     $this->_singleFileFilters = array();
     if (DS == '\\') {
         if (is_array($temp)) {
             foreach ($temp as $filter) {
                 $this->_singleFileFilters[] = JoomlapackHelperUtils::TranslateWinPath(JPATH_SITE . DS . $filter);
             }
         }
     } else {
         if (is_array($temp)) {
             foreach ($temp as $filter) {
                 $this->_singleFileFilters[] = JPATH_SITE . DS . $filter;
             }
         }
     }
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:23,代码来源:sff.php


示例11: getIconDefinitions

 /**
  * Get an array of icon definitions for the Control Panel
  *
  * @return array
  */
 function getIconDefinitions()
 {
     jpimport('helpers.utils', true);
     JoomlapackHelperUtils::getJoomlaPackVersion();
     $ret = array();
     $registry =& JoomlapackModelRegistry::getInstance();
     if ($registry->get('easymode', false)) {
         $ret[] = $this->_makeIconDefinition('reset.png', JText::_('SWITCHTOPRO'), 'switch');
         $ret[] = $this->_makeIconDefinition('config.png', JText::_('CONFIGURATION'), 'configeasy');
         $ret[] = $this->_makeIconDefinition('backup.png', JText::_('BACKUP'), 'backup');
         $ret[] = $this->_makeIconDefinition('bufa.png', JText::_('BUADMIN'), 'buadmin');
         $ret[] = $this->_makeIconDefinition('log.png', JText::_('VIEWLOG'), 'log');
     } else {
         $ret[] = $this->_makeIconDefinition('reset.png', JText::_('SWITCHTOEASY'), 'switch');
         if (JPSPECIALEDITION) {
             $ret[] = $this->_makeIconDefinition('profiles.png', JText::_('PROFILES'), 'profiles');
         }
         $ret[] = $this->_makeIconDefinition('config.png', JText::_('CONFIGURATION'), 'config');
         $ret[] = $this->_makeIconDefinition('backup.png', JText::_('BACKUP'), 'backup');
         $ret[] = $this->_makeIconDefinition('bufa.png', JText::_('BUADMIN'), 'buadmin');
         $ret[] = $this->_makeIconDefinition('log.png', JText::_('VIEWLOG'), 'log');
         if (JPSPECIALEDITION) {
             $ret[] = $this->_makeIconDefinition('multidb.png', $this->_labelInclusion(JText::_('MULTIDB'), 'multidb'), 'multidb');
         }
         if (JPSPECIALEDITION) {
             $ret[] = $this->_makeIconDefinition('dif.png', $this->_labelInclusion(JText::_('EXTRADIRS'), 'eff'), 'eff');
         }
         $ret[] = $this->_makeIconDefinition('sff.png', $this->_labelExclusion(JText::_('SFF'), 'sff'), 'sff');
         $ret[] = $this->_makeIconDefinition('def.png', $this->_labelExclusion(JText::_('DEF'), 'def'), 'def');
         if (JPSPECIALEDITION) {
             $ret[] = $this->_makeIconDefinition('full.png', $this->_labelExclusion(JText::_('DCS'), array('Skipfiles', 'Skipdirs')), 'skip');
         }
         if (JPSPECIALEDITION) {
             $ret[] = $this->_makeIconDefinition('dbef.png', $this->_labelExclusion(JText::_('DBEF'), 'dbef'), 'dbef');
         }
         if (JPSPECIALEDITION) {
             $ret[] = $this->_makeIconDefinition('extfilter.png', $this->_labelExclusion(JText::_('EXTFILTER'), array('components', 'modules', 'plugins', 'languages', 'templates')), 'extfilter');
         }
         //$ret[] = $this->_makeIconDefinition( 'ftp.png', JText::_('FTPXFERWIZARD'), 'ftpx' );
     }
     return $ret;
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:47,代码来源:cpanel.php


示例12: init

 /**
  * Implements the init method of JoomlapackFilter
  *
  */
 function init()
 {
     $configuration =& JoomlapackModelRegistry::getInstance();
     $temp = $this->_loadFilters();
     $this->_folderFilters = array();
     if (DS == '\\') {
         if (is_array($temp)) {
             foreach ($temp as $filter) {
                 $this->_folderFilters[] = JoomlapackHelperUtils::TranslateWinPath(JPATH_SITE . DS . $filter);
             }
         }
     } else {
         if (is_array($temp)) {
             foreach ($temp as $filter) {
                 $this->_folderFilters[] = JPATH_SITE . DS . $filter;
             }
         }
     }
     // Add any leftover installation directory to exclusion filters. THIS SHOULD NEVER BE NECESSARY ON A REAL SITE!
     $this->_folderFilters[] = JoomlapackHelperUtils::TranslateWinPath(JPATH_SITE . DS . 'installation');
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:25,代码来源:def.php


示例13: array

 function &getFolders($folder)
 {
     // Initialize variables
     $arr = array();
     $false = false;
     if (!is_dir($folder)) {
         return $false;
     }
     $counter = 0;
     $registry =& JoomlapackModelRegistry::getInstance();
     $maxCounter = $registry->get('mnMaxFragmentFiles', 50) * 2;
     $cube =& JoomlapackCUBE::getInstance();
     $allowBreakflag = $cube->operationCounter != 0;
     $handle = @opendir($folder);
     // If directory is not accessible, just return FALSE
     if ($handle === FALSE) {
         JoomlapackLogger::WriteLog(_JP_LOG_WARNING, 'Unreadable directory ' . $dirName);
         return $false;
     }
     while (($file = @readdir($handle)) !== false && !$this->BREAKFLAG) {
         $dir = $folder . DS . $file;
         $isDir = is_dir($dir);
         if ($isDir && $file != '.' && $file != '..') {
             $data = JPISWINDOWS ? JoomlapackHelperUtils::TranslateWinPath($dir) : $dir;
             if ($data) {
                 $arr[] = $data;
             }
         }
         $counter++;
         if ($counter >= $maxCounter) {
             $this->BREAKFLAG = true && $allowBreakflag;
         }
     }
     @closedir($handle);
     return $arr;
 }
开发者ID:jnvilo,项目名称:tomasinasanctuary.org,代码行数:36,代码来源:smart.php


示例14: sanitizeFilePath

 /**
  * Converts a potential Windows-style path to UNIX-style
  *
  * @param string $filePath The filepath
  * @return string The sanitized filepath
  */
 function sanitizeFilePath($filePath)
 {
     if (!class_exists('JoomlapackHelperUtils')) {
         jpimport('helpers.utils', true);
     }
     return JoomlapackHelperUtils::TranslateWinPath($filePath);
 }
开发者ID:jnvilo,项目名称:tomasinasanctuary.org,代码行数:13,代码来源:skip.php


示例15: jimport

 /**
  * Retrieves an object for the specified engine. It reads the engine.ini in order to do that.
  * It will also call the _addEngineInclude to make sure the included file persists during
  * the backup session.
  *
  * @param string $engine The engine type (lister, dumper, packer)
  * @param string $item The engine class file name (e.g. deafault, jpa, etc)
  */
 function &_getAnEngine($engine, $item)
 {
     // Load engine definitions
     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "Creating {$engine} engine of type {$item}");
     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "Trying to read engine setup data for {$engine}");
     // Find and parse all ini files in the given directory
     $ini_path = JPATH_COMPONENT_ADMINISTRATOR . DS . 'classes' . DS . 'engine' . DS . $engine;
     jimport('joomla.filesystem.folder');
     $ini_files = JFolder::files($ini_path, '\\.ini$');
     $engineArray = array();
     if (count($ini_files)) {
         foreach ($ini_files as $sourceINI) {
             $myData = JoomlapackHelperUtils::parse_ini_file($ini_path . DS . $sourceINI, true);
             foreach ($myData as $key => $value) {
                 $engineArray[$key] = $value;
             }
         }
     }
     if (isset($engineArray[$item])) {
         $engineDescriptor = $engineArray[$item];
         $dotted = 'engine.' . $engine . '.' . $engineDescriptor['include'];
         JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "Trying to include engine file {$dotted}");
         $this->_addEngineInclude($dotted);
         jpimport($dotted);
         JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "Instanciating " . $engineDescriptor['class']);
         $instance = new $engineDescriptor['class']();
         // If we are getting an archiver class, also populate the _archiveExtension field
         if ($engine == 'packer') {
             $this->archiveExtension = $engineDescriptor['extension'];
         }
         return $instance;
     } else {
         $this->setError(JText::sprintf('CUBE_PROVISIONING_ENGINENOTFOUND', $engine . '.' . $item));
         return false;
     }
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:44,代码来源:provisioning.php


示例16: jimport

 /**
  * Searches for updates and returns an object containing update information
  * @return JObject An object with members: supported, update_available,
  * 				   current_version, current_date, latest_version, latest_date,
  * 				   package_url
  */
 function &getUpdates($force = false)
 {
     jimport('joomla.utilities.date');
     $ret = new JObject();
     if (!$this->isLiveUpdateSupported()) {
         $ret->supported = false;
         $ret->update_available = false;
         return $ret;
     } else {
         $ret->supported = true;
         $update = $this->_getLatestVersion($force);
         // Check if we need to upgrade, by release date
         jimport('joomla.utilities.date');
         jpimport('helpers.utils', true);
         JoomlapackHelperUtils::getJoomlaPackVersion();
         $curdate = new JDate(_JP_DATE);
         $curdate = $curdate->toUnix(false);
         if (is_object($update->reldate)) {
             $reldate = $update->reldate->toUnix(false);
             $ret->latest_date = $update->reldate->toFormat('%Y-%m-%d');
         } else {
             $ret->latest_date = @date('Y-m-d', $update->reldate);
         }
         $ret->update_available = $reldate > $curdate;
         $ret->current_version = _JP_VERSION;
         $ret->current_date = _JP_DATE;
         $ret->latest_version = $update->version;
         $ret->status = $update->status;
         $ret->package_url = JPSPECIALEDITION ? $update->special : $update->free;
         return $ret;
     }
 }
开发者ID:jnvilo,项目名称:tomasinasanctuary.org,代码行数:38,代码来源:update.php


示例17: save

 /**
  * Saves or updates an EFF entry
  *
  * @param object $fromObject If set, use data from this object, instead of the request
  * @access public
  * @return bool True on success
  */
 function save($fromObject = null)
 {
     jpimport('helpers.utils', true);
     // Get active profile
     $session =& JFactory::getSession();
     $profile = $session->get('profile', null, 'joomlapack');
     if (!is_object($fromObject)) {
         // Map from $_REQUEST
         $id = JRequest::getVar('id', null);
         // Create a table
         $fromObject = array('id' => $id, 'profile' => $profile, 'class' => 'eff', 'value' => JoomlapackHelperUtils::TranslateWinPath(JRequest::getVar('fsdir')));
     }
     // Load table class
     $table =& $this->getTable('Inclusion');
     // Assign from data and save the inclusion filter record
     if (!$table->save($fromObject)) {
         $this->setError($table->getError());
         return false;
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:28,代码来源:eff.php


示例18: _prepare

 /**
  * Implements the _prepare() abstract method
  *
  */
 function _prepare()
 {
     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackCUBEDomainPack :: Starting _prepare()");
     $cube =& JoomlapackCUBE::getInstance();
     // Grab the EFF filters
     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackCUBEDomainPack :: Getting off-site directory inclusion filters (EFF)");
     jpimport('models.eff', true);
     $effModel = new JoomlapackModelEff();
     $this->_extraDirs =& $effModel->getMapping();
     // Add the mapping text file if there are EFFs defined!
     if (count($this->_extraDirs) > 0) {
         // We add a README.txt file in our virtual directory...
         JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "Creating README.txt in the EFF virtual folder");
         $virtualContents = JText::_('EFF_MAPTEXT_INTRO') . "\n\n";
         foreach ($this->_extraDirs as $dir) {
             $virtualContents .= JText::sprintf('EFF_MAPTEXT_LINE', $dir['vdir'], $dir['fsdir']) . "\n";
         }
         // Add the file to our archive
         $registry =& JoomlapackModelRegistry::getInstance();
         $provisioning =& $cube->getProvisioning();
         $archiver =& $provisioning->getArchiverEngine();
         $archiver->addVirtualFile('README.txt', $registry->get('effvfolder'), $virtualContents);
     }
     // Get the directory exclusion filters - this only needs to be done once
     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackCUBEDomainPack :: Getting exclusion filters");
     $this->_loadAndCacheFilters();
     if ($this->getError()) {
         return false;
     }
     // FIX 1.1.0 $mosConfig_absolute_path may contain trailing slashes or backslashes incompatible with exclusion filters
     // FIX 1.2.2 Some hosts yield an empty string on realpath(JPATH_SITE)
     // FIX 2.2 On Windows, realpath might fail
     jpimport('helpers.utils', true);
     // FIX 2.4: Make an assumption (wild guess...)
     if (JPATH_BASE == '/administrator') {
         $cube->addWarning("Your site's root is an empty string. I am trying a workaround.");
         $jpath_site_real = '/';
     } else {
         // Fix 2.4: Make sure that $jpath_site_real contains something even if realpath fails
         $jpath_site_real = @realpath(trim(JPATH_SITE));
         $jpath_site_real = $jpath_site_real === false ? trim(JPATH_SITE) : $jpath_site_real;
         $jpath_site_real = JoomlapackHelperUtils::TranslateWinPath($jpath_site_real);
     }
     if ($jpath_site_real == '') {
         // The JPATH_SITE is resolved to an empty string; attempt a workaround
         // Windows hosts
         if (DIRECTORY_SEPARATOR == '\\') {
             if (trim(JPATH_SITE) != '' && trim(JPATH_SITE) != '\\' && trim(JPATH_SITE) != '/') {
                 $cube->addWarning("The site's root couldn't be normalized on a Windows host. Attempting workaround (filters might not work)");
                 $jpath_site_real = JPATH_SITE;
                 // Forcibly use the configured JPATH_SITE
             } else {
                 $cube->addWarning("The normalized path to your site's root seems to be an empty string; I will attempt a workaround (Windows host)");
                 $jpath_site_real = '/';
                 // Start scanning from filesystem root (workaround mode)
             }
         } else {
             $cube->addWarning("The normalized path to your site's root seems to be an empty string; I will attempt a workaround (*NIX host)");
             # Fix 2.1 Since JPATH_SITE is an empty string, shouldn't I begin scanning from the FS root, for crying out loud? What was I thinking putting JPATH_SITE there?
             $jpath_site_real = '/';
             // Start scanning from filesystem root (workaround mode)
         }
     }
     // Fix 2.4.b1 : Add the trailing slash
     if (substr($jpath_site_real, -1) != '/' && !empty($jpath_site_real)) {
         $jpath_site_real .= '/';
     }
     $this->_directoryList[] = $jpath_site_real;
     // Start scanning from Joomla! root, as decided above
     $this->_doneScanning = false;
     // Instruct the class to scan for files and directories
     $this->_doneSubdirectoryScanning = true;
     $this->_doneFileScanning = true;
     $this->_addPath = '';
     // No added path for main site
     // Fix 2.4.b1 -- Since JPATH_SITE might have been post-processed, used the post-processed variable instead
     $this->_removePath = $jpath_site_real;
     // Remove absolute path to site's root for main site
     $this->setState('prepared');
     JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, "JoomlapackCUBEDomainPack :: prepared");
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:85,代码来源:pack.php


示例19: htmlentities

<br/>
<?php 
        echo JText::_('UPDATE_LABEL_PACKAGELOCATION');
        ?>
 <a href="<?php 
        echo $this->updates->package_url;
        ?>
">
<?php 
        echo htmlentities($this->updates->package_url);
        ?>
</a>
</p>
<?php 
        jpimport('helpers.utils', true);
        JoomlapackHelperUtils::getJoomlaPackVersion();
        if (substr(_JP_VERSION, 0, 3) == 'svn') {
            ?>
<p><?php 
            echo JText::_('UPDATE_LABEL_NOUPGRADESFOUND_INFO_SVN');
            ?>
</p>
<?php 
        } else {
            ?>
<p><?php 
            echo JText::_('UPDATE_LABEL_NOUPGRADESFOUND_INFO');
            ?>
</p>
<?php 
        }
开发者ID:jnvilo,项目名称:tomasinasanctuary.org,代码行数:31,代码来源:default.php


示例20: init

 /**
  * Initializes the array of filters. Reads the data of the filter.ini in the
  * classes/filter directory.
  */
 function init()
 {
     // Load the filter.ini
     jpimport('helpers.utils', true);
     // Find and parse all ini files in the given directory
     $ini_path = JPATH_COMPONENT_ADMINISTRATOR . DS . 'classes' . DS . 'filter';
     jimport('joomla.filesystem.folder');
     $ini_files = JFolder::files($ini_path, '\\.ini$');
     $filterArray = array();
     if (count($ini_files)) {
         foreach ($ini_files as $sourceINI) {
             $myData = JoomlapackHelperUtils::parse_ini_file($ini_path . DS . $sourceINI, true);
             foreach ($myData as $key => $value) {
                 $filterArray[$key] = $value;
             }
         }
     }
     // Walk through INI file entries and add them to the filter list
     foreach ($filterArray as $filter) {
         $this->addFilter('filter.' . $filter['include'], $filter['class']);
     }
 }
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:26,代码来源:filtermanager.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP JoomlapackModelRegistry类代码示例发布时间:2022-05-23
下一篇:
PHP JoomlaWebdriverTestCase类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap