/content/code/trunk/modules/mod_artofcontent_add/mod_artofcontent_add.php
PHP | 38 lines | 19 code | 7 blank | 12 comment | 10 complexity | d46f66383138a11f2884c89004746806 MD5 | raw file
- <?php
- /**
- * @version $Id:combolayout.php 2547 2007-11-10 04:37:15Z masterchief $
- * @package NewLifeInIT
- * @subpackage mod_artofcontent_add
- * @copyright Copyright 2005 - 2010 New Life in IT Pty Ltd. All rights reserved.
- * @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
- * @author Andrew Eddie <andrew.eddie@newlifeinit.com>
- * @link http://www.theartofjoomla.com/extensions/artof-content.html
- */
- // No direct access.
- defined('JPATH_BASE') or die();
- // Include dependancies.
- if (!class_exists('modArtofContentAddHelper')) {
- require dirname(__FILE__).'/helper.php';
- }
- // Load the attributes in the JDOC tag into the parameters.
- $temp = new JParameter(null);
- $temp->loadArray($attribs);
- $params->merge($temp);
- $option = JRequest::getCmd('option');
- $view = JRequest::getCmd('view');
- $task = JRequest::getCmd('task');
- if ($option == 'com_content' && $view == 'article' && ($task == 'new' || $task == 'edit')) {
- return false;
- }
- if (modArtofContentAddHelper::canAdd()) {
- $categoryId = modArtofContentAddHelper::getCategoryId();
- $sectionId = modArtofContentAddHelper::getSectionId();
- require JModuleHelper::getLayoutPath($module->module, $params->get('layout', 'default'));
- }