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


PHP JoomlapackHelperUtils类代码示例

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


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


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