AAAAPK@B\Uff access.xmlnuW+A
PK@B\)tables/.htaccessnuW+A Order allow,deny Deny from all PK@B\Vtables/index.htmlnuW+A PK@B\U++tables/weblink.phpnuW+AloadArray($array['params']); $array['params'] = (string)$registry; } if (isset($array['metadata']) && is_array($array['metadata'])) { $registry = new JRegistry(); $registry->loadArray($array['metadata']); $array['metadata'] = (string)$registry; } return parent::bind($array, $ignore); } /** * Overload the store method for the Weblinks table. * * @param boolean Toggle whether null values should be updated. * @return boolean True on success, false on failure. * @since 1.6 */ public function store($updateNulls = false) { $date = JFactory::getDate(); $user = JFactory::getUser(); if ($this->id) { // Existing item $this->modified = $date->toSql(); $this->modified_by = $user->get('id'); } else { // New weblink. A weblink created and created_by field can be set by the user, // so we don't touch either of these if they are set. if (!intval($this->created)) { $this->created = $date->toSql(); } if (empty($this->created_by)) { $this->created_by = $user->get('id'); } } // Verify that the alias is unique $table = JTable::getInstance('Weblink', 'WeblinksTable'); if ($table->load(array('alias'=>$this->alias, 'catid'=>$this->catid)) && ($table->id != $this->id || $this->id==0)) { $this->setError(JText::_('COM_WEBLINKS_ERROR_UNIQUE_ALIAS')); return false; } // Attempt to store the user data. return parent::store($updateNulls); } /** * Overloaded check method to ensure data integrity. * * @return boolean True on success. */ public function check() { if (JFilterInput::checkAttribute(array ('href', $this->url))) { $this->setError(JText::_('COM_WEBLINKS_ERR_TABLES_PROVIDE_URL')); return false; } // check for valid name if (trim($this->title) == '') { $this->setError(JText::_('COM_WEBLINKS_ERR_TABLES_TITLE')); return false; } // check for existing name $query = 'SELECT id FROM #__weblinks WHERE title = '.$this->_db->Quote($this->title).' AND catid = '.(int) $this->catid; $this->_db->setQuery($query); $xid = intval($this->_db->loadResult()); if ($xid && $xid != intval($this->id)) { $this->setError(JText::_('COM_WEBLINKS_ERR_TABLES_NAME')); return false; } if (empty($this->alias)) { $this->alias = $this->title; } $this->alias = JApplication::stringURLSafe($this->alias); if (trim(str_replace('-', '', $this->alias)) == '') { $this->alias = JFactory::getDate()->format("Y-m-d-H-i-s"); } // Check the publish down date is not earlier than publish up. if ($this->publish_down > $this->_db->getNullDate() && $this->publish_down < $this->publish_up) { $this->setError(JText::_('JGLOBAL_START_PUBLISH_AFTER_FINISH')); return false; } // clean up keywords -- eliminate extra spaces between phrases // and cr (\r) and lf (\n) characters from string if (!empty($this->metakey)) { // only process if not empty $bad_characters = array("\n", "\r", "\"", "<", ">"); // array of characters to remove $after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); // remove bad characters $keys = explode(',', $after_clean); // create array using commas as delimiter $clean_keys = array(); foreach($keys as $key) { if (trim($key)) { // ignore blank keywords $clean_keys[] = trim($key); } } $this->metakey = implode(", ", $clean_keys); // put array back together delimited by ", " } return true; } /** * Method to set the publishing state for a row or list of rows in the database * table. The method respects checked out rows by other users and will attempt * to checkin rows that it can after adjustments are made. * * @param mixed An optional array of primary key values to update. If not * set the instance property value is used. * @param integer The publishing state. eg. [0 = unpublished, 1 = published] * @param integer The user id of the user performing the operation. * @return boolean True on success. * @since 1.0.4 */ public function publish($pks = null, $state = 1, $userId = 0) { // Initialise variables. $k = $this->_tbl_key; // Sanitize input. JArrayHelper::toInteger($pks); $userId = (int) $userId; $state = (int) $state; // If there are no primary keys set check to see if the instance key is set. if (empty($pks)) { if ($this->$k) { $pks = array($this->$k); } // Nothing to set publishing state on, return false. else { $this->setError(JText::_('JLIB_DATABASE_ERROR_NO_ROWS_SELECTED')); return false; } } // Build the WHERE clause for the primary keys. $where = $k.'='.implode(' OR '.$k.'=', $pks); // Determine if there is checkin support for the table. if (!property_exists($this, 'checked_out') || !property_exists($this, 'checked_out_time')) { $checkin = ''; } else { $checkin = ' AND (checked_out = 0 OR checked_out = '.(int) $userId.')'; } // Update the publishing state for rows with the given primary keys. $this->_db->setQuery( 'UPDATE '.$this->_db->quoteName($this->_tbl) . ' SET '.$this->_db->quoteName('state').' = '.(int) $state . ' WHERE ('.$where.')' . $checkin ); $this->_db->query(); // Check for a database error. if ($this->_db->getErrorNum()) { $this->setError($this->_db->getErrorMsg()); return false; } // If checkin is supported and all rows were adjusted, check them in. if ($checkin && (count($pks) == $this->_db->getAffectedRows())) { // Checkin the rows. foreach($pks as $pk) { $this->checkin($pk); } } // If the JTable instance value is in the list of primary keys that were set, set the instance. if (in_array($this->$k, $pks)) { $this->state = $state; } $this->setError(''); return true; } } PK@B\Khh config.xmlnuW+A
PK@B\V index.htmlnuW+A PK@B\Oн-- weblinks.phpnuW+Aauthorise('core.manage', 'com_weblinks')) { return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } $controller = JControllerLegacy::getInstance('Weblinks'); $controller->execute(JRequest::getCmd('task')); $controller->redirect(); PK@B\j~Q Q weblinks.xmlnuW+A com_weblinks Joomla! Project April 2006 (C) 2005 - 2014 Open Source Matters. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt admin@joomla.org www.joomla.org 2.5.0 COM_WEBLINKS_XML_DESCRIPTION sql/install.mysql.utf8.sql sql/uninstall.mysql.utf8.sql index.html weblinks.php controller.php router.php metadata.xml views models controllers helpers language/en-GB.com_weblinks.ini com_weblinks com_weblinks_links com_weblinks_categories access.xml config.xml controller.php index.html weblinks.php controllers helpers models sql tables views language/en-GB.com_weblinks.ini language/en-GB.com_weblinks.sys.ini PK@B\) .htaccessnuW+A Order allow,deny Deny from all PK@B\.fPPmodels/weblink.phpnuW+Aid)) { if ($record->state != -2) { return ; } $user = JFactory::getUser(); if ($record->catid) { return $user->authorise('core.delete', 'com_weblinks.category.'.(int) $record->catid); } else { return parent::canDelete($record); } } } /** * Method to test whether a record can have its state changed. * * @param object A record object. * @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component. * @since 1.6 */ protected function canEditState($record) { $user = JFactory::getUser(); if (!empty($record->catid)) { return $user->authorise('core.edit.state', 'com_weblinks.category.'.(int) $record->catid); } else { return parent::canEditState($record); } } /** * Returns a reference to the a Table object, always creating it. * * @param type The table type to instantiate * @param string A prefix for the table class name. Optional. * @param array Configuration array for model. Optional. * @return JTable A database object * @since 1.6 */ public function getTable($type = 'Weblink', $prefix = 'WeblinksTable', $config = array()) { return JTable::getInstance($type, $prefix, $config); } /** * Method to get the record form. * * @param array $data An optional array of data for the form to interogate. * @param boolean $loadData True if the form is to load its own data (default case), false if not. * @return JForm A JForm object on success, false on failure * @since 1.6 */ public function getForm($data = array(), $loadData = true) { // Initialise variables. $app = JFactory::getApplication(); // Get the form. $form = $this->loadForm('com_weblinks.weblink', 'weblink', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) { return false; } // Determine correct permissions to check. if ($this->getState('weblink.id')) { // Existing record. Can only edit in selected categories. $form->setFieldAttribute('catid', 'action', 'core.edit'); } else { // New record. Can only create in selected categories. $form->setFieldAttribute('catid', 'action', 'core.create'); } // Modify the form based on access controls. if (!$this->canEditState((object) $data)) { // Disable fields for display. $form->setFieldAttribute('ordering', 'disabled', 'true'); $form->setFieldAttribute('state', 'disabled', 'true'); $form->setFieldAttribute('publish_up', 'disabled', 'true'); $form->setFieldAttribute('publish_down', 'disabled', 'true'); // Disable fields while saving. // The controller has already verified this is a record you can edit. $form->setFieldAttribute('ordering', 'filter', 'unset'); $form->setFieldAttribute('state', 'filter', 'unset'); $form->setFieldAttribute('publish_up', 'filter', 'unset'); $form->setFieldAttribute('publish_down', 'filter', 'unset'); } return $form; } /** * Method to get the data that should be injected in the form. * * @return mixed The data for the form. * @since 1.6 */ protected function loadFormData() { // Check the session for previously entered form data. $data = JFactory::getApplication()->getUserState('com_weblinks.edit.weblink.data', array()); if (empty($data)) { $data = $this->getItem(); // Prime some default values. if ($this->getState('weblink.id') == 0) { $app = JFactory::getApplication(); $data->set('catid', JRequest::getInt('catid', $app->getUserState('com_weblinks.weblinks.filter.category_id'))); } } return $data; } /** * Method to get a single record. * * @param integer The id of the primary key. * * @return mixed Object on success, false on failure. * @since 1.6 */ public function getItem($pk = null) { if ($item = parent::getItem($pk)) { // Convert the params field to an array. $registry = new JRegistry; $registry->loadString($item->metadata); $item->metadata = $registry->toArray(); } return $item; } /** * Prepare and sanitise the table prior to saving. * * @since 1.6 */ protected function prepareTable(&$table) { $date = JFactory::getDate(); $user = JFactory::getUser(); $table->title = htmlspecialchars_decode($table->title, ENT_QUOTES); $table->alias = JApplication::stringURLSafe($table->alias); if (empty($table->alias)) { $table->alias = JApplication::stringURLSafe($table->title); } if (empty($table->id)) { // Set the values // Set ordering to the last item if not set if (empty($table->ordering)) { $db = JFactory::getDbo(); $db->setQuery('SELECT MAX(ordering) FROM #__weblinks'); $max = $db->loadResult(); $table->ordering = $max+1; } } else { // Set the values } } /** * A protected method to get a set of ordering conditions. * * @param object A record object. * @return array An array of conditions to add to add to ordering queries. * @since 1.6 */ protected function getReorderConditions($table) { $condition = array(); $condition[] = 'catid = '.(int) $table->catid; return $condition; } } PK@B\Vmodels/index.htmlnuW+A PK@B\)models/fields/.htaccessnuW+A Order allow,deny Deny from all PK@B\Vmodels/fields/index.htmlnuW+A PK@B\7models/fields/ordering.phpnuW+Aelement['class'] ? ' class="'.(string) $this->element['class'].'"' : ''; $attr .= ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : ''; $attr .= $this->element['size'] ? ' size="'.(int) $this->element['size'].'"' : ''; // Initialize JavaScript field attributes. $attr .= $this->element['onchange'] ? ' onchange="'.(string) $this->element['onchange'].'"' : ''; // Get some field values from the form. $weblinkId = (int) $this->form->getValue('id'); $categoryId = (int) $this->form->getValue('catid'); // Build the query for the ordering list. $query = 'SELECT ordering AS value, title AS text' . ' FROM #__weblinks' . ' WHERE catid = ' . (int) $categoryId . ' ORDER BY ordering'; // Create a read-only list (no name) with a hidden input to store the value. if ((string) $this->element['readonly'] == 'true') { $html[] = JHtml::_('list.ordering', '', $query, trim($attr), $this->value, $weblinkId ? 0 : 1); $html[] = ''; } // Create a regular list. else { $html[] = JHtml::_('list.ordering', $this->name, $query, trim($attr), $this->value, $weblinkId ? 0 : 1); } return implode($html); } } PK@B\)models/.htaccessnuW+A Order allow,deny Deny from all PK@B\Vmodels/forms/index.htmlnuW+A PK@B\)models/forms/.htaccessnuW+A Order allow,deny Deny from all PK@B\4 models/forms/weblink.xmlnuW+A
PK@B\.models/weblinks.phpnuW+AgetUserStateFromRequest($this->context.'.filter.search', 'filter_search'); $this->setState('filter.search', $search); $accessId = $this->getUserStateFromRequest($this->context.'.filter.access', 'filter_access', null, 'int'); $this->setState('filter.access', $accessId); $published = $this->getUserStateFromRequest($this->context.'.filter.state', 'filter_published', '', 'string'); $this->setState('filter.state', $published); $categoryId = $this->getUserStateFromRequest($this->context.'.filter.category_id', 'filter_category_id', ''); $this->setState('filter.category_id', $categoryId); $language = $this->getUserStateFromRequest($this->context.'.filter.language', 'filter_language', ''); $this->setState('filter.language', $language); // Load the parameters. $params = JComponentHelper::getParams('com_weblinks'); $this->setState('params', $params); // List state information. parent::populateState('a.title', 'asc'); } /** * Method to get a store id based on model configuration state. * * This is necessary because the model is used by the component and * different modules that might need different sets of data or different * ordering requirements. * * @param string $id A prefix for the store id. * @return string A store id. * @since 1.6 */ protected function getStoreId($id = '') { // Compile the store id. $id.= ':' . $this->getState('filter.search'); $id.= ':' . $this->getState('filter.access'); $id.= ':' . $this->getState('filter.state'); $id.= ':' . $this->getState('filter.category_id'); $id.= ':' . $this->getState('filter.language'); return parent::getStoreId($id); } /** * Build an SQL query to load the list data. * * @return JDatabaseQuery * @since 1.6 */ protected function getListQuery() { // Create a new query object. $db = $this->getDbo(); $query = $db->getQuery(true); $user = JFactory::getUser(); // Select the required fields from the table. $query->select( $this->getState( 'list.select', 'a.id, a.title, a.alias, a.checked_out, a.checked_out_time, a.catid,' . 'a.hits,' . 'a.state, a.access, a.ordering,'. 'a.language, a.publish_up, a.publish_down' ) ); $query->from($db->quoteName('#__weblinks').' AS a'); // Join over the language $query->select('l.title AS language_title'); $query->join('LEFT', $db->quoteName('#__languages').' AS l ON l.lang_code = a.language'); // Join over the users for the checked out user. $query->select('uc.name AS editor'); $query->join('LEFT', '#__users AS uc ON uc.id=a.checked_out'); // Join over the asset groups. $query->select('ag.title AS access_level'); $query->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); // Join over the categories. $query->select('c.title AS category_title'); $query->join('LEFT', '#__categories AS c ON c.id = a.catid'); // Filter by access level. if ($access = $this->getState('filter.access')) { $query->where('a.access = '.(int) $access); } // Implement View Level Access if (!$user->authorise('core.admin')) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->where('a.access IN ('.$groups.')'); } // Filter by published state $published = $this->getState('filter.state'); if (is_numeric($published)) { $query->where('a.state = '.(int) $published); } elseif ($published === '') { $query->where('(a.state IN (0, 1))'); } // Filter by category. $categoryId = $this->getState('filter.category_id'); if (is_numeric($categoryId)) { $query->where('a.catid = '.(int) $categoryId); } // Filter by search in title $search = $this->getState('filter.search'); if (!empty($search)) { if (stripos($search, 'id:') === 0) { $query->where('a.id = '.(int) substr($search, 3)); } else { $search = $db->Quote('%'.$db->escape($search, true).'%'); $query->where('(a.title LIKE '.$search.' OR a.alias LIKE '.$search.')'); } } // Filter on the language. if ($language = $this->getState('filter.language')) { $query->where('a.language = ' . $db->quote($language)); } // Add the list ordering clause. $orderCol = $this->state->get('list.ordering'); $orderDirn = $this->state->get('list.direction'); if ($orderCol == 'a.ordering' || $orderCol == 'category_title') { $orderCol = 'c.title '.$orderDirn.', a.ordering'; } $query->order($db->escape($orderCol.' '.$orderDirn)); //echo nl2br(str_replace('#__','jos_',$query)); return $query; } } PK@B\ nFFcontroller.phpnuW+AcheckEditId('com_weblinks.edit.weblink', $id)) { // Somehow the person just went to the form - we don't allow that. $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id)); $this->setMessage($this->getError(), 'error'); $this->setRedirect(JRoute::_('index.php?option=com_weblinks&view=weblinks', false)); return false; } parent::display(); return $this; } } PK@B\আviews/weblinks/view.html.phpnuW+Astate = $this->get('State'); $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { require_once JPATH_COMPONENT.'/helpers/weblinks.php'; $state = $this->get('State'); $canDo = WeblinksHelper::getActions($state->get('filter.category_id')); $user = JFactory::getUser(); JToolBarHelper::title(JText::_('COM_WEBLINKS_MANAGER_WEBLINKS'), 'weblinks.png'); if (count($user->getAuthorisedCategories('com_weblinks', 'core.create')) > 0) { JToolBarHelper::addNew('weblink.add'); } if ($canDo->get('core.edit')) { JToolBarHelper::editList('weblink.edit'); } if ($canDo->get('core.edit.state')) { JToolBarHelper::divider(); JToolBarHelper::publish('weblinks.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublish('weblinks.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::divider(); JToolBarHelper::archiveList('weblinks.archive'); JToolBarHelper::checkin('weblinks.checkin'); } if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) { JToolBarHelper::deleteList('', 'weblinks.delete', 'JTOOLBAR_EMPTY_TRASH'); JToolBarHelper::divider(); } elseif ($canDo->get('core.edit.state')) { JToolBarHelper::trash('weblinks.trash'); JToolBarHelper::divider(); } if ($canDo->get('core.admin')) { JToolBarHelper::preferences('com_weblinks'); JToolBarHelper::divider(); } JToolBarHelper::help('JHELP_COMPONENTS_WEBLINKS_LINKS'); } } PK@B\)views/weblinks/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK@B\Vviews/weblinks/tmpl/index.htmlnuW+A PK@B\e%views/weblinks/tmpl/default_batch.phpnuW+Astate->get('filter.published'); ?>

= 0) : ?>
PK@B\4!!views/weblinks/tmpl/default.phpnuW+Aget('id'); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $canOrder = $user->authorise('core.edit.state', 'com_weblinks.category'); $saveOrder = $listOrder == 'a.ordering'; ?>
items as $i => $item) : $ordering = ($listOrder == 'a.ordering'); $item->cat_link = JRoute::_('index.php?option=com_categories&extension=com_weblinks&task=edit&type=other&cid[]='. $item->catid); $canCreate = $user->authorise('core.create', 'com_weblinks.category.'.$item->catid); $canEdit = $user->authorise('core.edit', 'com_weblinks.category.'.$item->catid); $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out==$user->get('id') || $item->checked_out==0; $canChange = $user->authorise('core.edit.state', 'com_weblinks.category.'.$item->catid) && $canCheckin; ?>
items, 'filesave.png', 'weblinks.saveorder'); ?>
pagination->getListFooter(); ?>
id); ?> checked_out) : ?> editor, $item->checked_out_time, 'weblinks.', $canCheckin); ?> escape($item->title); ?> escape($item->title); ?>

escape($item->alias));?>

state, $i, 'weblinks.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?> escape($item->category_title); ?> pagination->orderUpIcon($i, ($item->catid == @$this->items[$i-1]->catid), 'weblinks.orderup', 'JLIB_HTML_MOVE_UP', $ordering); ?> pagination->orderDownIcon($i, $this->pagination->total, ($item->catid == @$this->items[$i+1]->catid), 'weblinks.orderdown', 'JLIB_HTML_MOVE_DOWN', $ordering); ?> pagination->orderUpIcon($i, ($item->catid == @$this->items[$i-1]->catid), 'weblinks.orderdown', 'JLIB_HTML_MOVE_UP', $ordering); ?> pagination->orderDownIcon($i, $this->pagination->total, ($item->catid == @$this->items[$i+1]->catid), 'weblinks.orderup', 'JLIB_HTML_MOVE_DOWN', $ordering); ?> class="text-area-order" /> ordering; ?> escape($item->access_level); ?> hits; ?> language=='*'):?> language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> id; ?>
authorize('core.create', 'com_weblinks') && $user->authorize('core.edit', 'com_weblinks') && $user->authorize('core.edit.state', 'com_weblinks')) : ?> loadTemplate('batch'); ?>
PK@B\Vviews/weblinks/index.htmlnuW+A PK@B\)views/weblinks/.htaccessnuW+A Order allow,deny Deny from all PK@B\Jvv"views/weblink/tmpl/edit_params.phpnuW+Aform->getFieldsets('params'); foreach ($fieldSets as $name => $fieldSet) : echo JHtml::_('sliders.panel', JText::_($fieldSet->label), $name.'-params'); if (isset($fieldSet->description) && trim($fieldSet->description)) : echo '

'.$this->escape(JText::_($fieldSet->description)).'

'; endif; ?>
PK@B\Vviews/weblink/tmpl/index.htmlnuW+A PK@B\h!!views/weblink/tmpl/edit.phpnuW+A PK@B\V??$views/weblink/tmpl/edit_metadata.phpnuW+Aform->getFieldsets('metadata'); foreach ($fieldSets as $name => $fieldSet) : echo JHtml::_('sliders.panel', JText::_($fieldSet->label), $name.'-options'); if (isset($fieldSet->description) && trim($fieldSet->description)) : echo '

'.$this->escape(JText::_($fieldSet->description)).'

'; endif; ?>
PK@B\)views/weblink/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK@B\Vviews/weblink/index.htmlnuW+A PK@B\)views/weblink/.htaccessnuW+A Order allow,deny Deny from all PK@B\Aaviews/weblink/view.html.phpnuW+Astate = $this->get('State'); $this->item = $this->get('Item'); $this->form = $this->get('Form'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); } /** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $userId = $user->get('id'); $isNew = ($this->item->id == 0); $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id')); // Since we don't track these assets at the item level, use the category id. $canDo = WeblinksHelper::getActions($this->item->catid, 0); JToolBarHelper::title(JText::_('COM_WEBLINKS_MANAGER_WEBLINK'), 'weblinks.png'); // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit')||(count($user->getAuthorisedCategories('com_weblinks', 'core.create'))))) { JToolBarHelper::apply('weblink.apply'); JToolBarHelper::save('weblink.save'); } if (!$checkedOut && (count($user->getAuthorisedCategories('com_weblinks', 'core.create')))){ JToolBarHelper::save2new('weblink.save2new'); } // If an existing item, can save to a copy. if (!$isNew && (count($user->getAuthorisedCategories('com_weblinks', 'core.create')) > 0)) { JToolBarHelper::save2copy('weblink.save2copy'); } if (empty($this->item->id)) { JToolBarHelper::cancel('weblink.cancel'); } else { JToolBarHelper::cancel('weblink.cancel', 'JTOOLBAR_CLOSE'); } JToolBarHelper::divider(); JToolBarHelper::help('JHELP_COMPONENTS_WEBLINKS_LINKS_EDIT'); } } PK@B\)views/.htaccessnuW+A Order allow,deny Deny from all PK@B\Vviews/index.htmlnuW+A PK@B\Vhelpers/index.htmlnuW+A PK@B\@kkhelpers/weblinks.phpnuW+Aset($action->name, $user->authorise($action->name, $assetName)); } return $result; } } PK@B\)helpers/.htaccessnuW+A Order allow,deny Deny from all PK@B\<8l l controllers/weblink.phpnuW+Aauthorise('core.create', $this->option . '.category.' . $categoryId); } if ($allow === null) { // In the absense of better information, revert to the component permissions. return parent::allowAdd($data); } else { return $allow; } } /** * Method to check if you can add a new record. * * @param array $data An array of input data. * @param string $key The name of the key for the primary key. * * @return boolean * @since 1.6 */ protected function allowEdit($data = array(), $key = 'id') { // Initialise variables. $recordId = (int) isset($data[$key]) ? $data[$key] : 0; $categoryId = 0; if ($recordId) { $categoryId = (int) $this->getModel()->getItem($recordId)->catid; } if ($categoryId) { // The category has been set. Check the category permissions. return JFactory::getUser()->authorise('core.edit', $this->option . '.category.' . $categoryId); } else { // Since there is no asset tracking, revert to the component permissions. return parent::allowEdit($data, $key); } } /** * Method to run batch operations. * * @param object $model The model. * * @return boolean True if successful, false otherwise and internal error is set. * * @since 1.7 */ public function batch($model = null) { JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); // Set the model $model = $this->getModel('Weblink', '', array()); // Preset the redirect $this->setRedirect(JRoute::_('index.php?option=com_weblinks&view=weblinks' . $this->getRedirectToListAppend(), false)); return parent::batch($model); } } PK@B\Vcontrollers/index.htmlnuW+A PK@B\)controllers/.htaccessnuW+A Order allow,deny Deny from all PK@B\(controllers/weblinks.phpnuW+A true)) { $model = parent::getModel($name, $prefix, $config); return $model; } } PK@B\Œ##sql/uninstall.mysql.utf8.sqlnuW+ADROP TABLE IF EXISTS `#__weblinks`;PK@B\ygsql/install.mysql.utf8.sqlnuW+ACREATE TABLE IF NOT EXISTS `#__weblinks` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `catid` int(11) NOT NULL DEFAULT '0', `sid` int(11) NOT NULL DEFAULT '0', `title` varchar(250) NOT NULL DEFAULT '', `alias` varchar(255) NOT NULL DEFAULT '', `url` varchar(250) NOT NULL DEFAULT '', `description` text NOT NULL, `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `hits` int(11) NOT NULL DEFAULT '0', `state` tinyint(1) NOT NULL DEFAULT '0', `checked_out` int(11) NOT NULL DEFAULT '0', `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `ordering` int(11) NOT NULL DEFAULT '0', `archived` tinyint(1) NOT NULL DEFAULT '0', `approved` tinyint(1) NOT NULL DEFAULT '1', `access` int(11) NOT NULL DEFAULT '1', `params` text NOT NULL, `language` char(7) NOT NULL DEFAULT '', `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `created_by` int(10) unsigned NOT NULL DEFAULT '0', `created_by_alias` varchar(255) NOT NULL DEFAULT '', `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(10) unsigned NOT NULL DEFAULT '0', `metakey` text NOT NULL, `metadesc` text NOT NULL, `metadata` text NOT NULL, `featured` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Set if link is featured.', `xreference` varchar(50) NOT NULL COMMENT 'A reference to enable linkages to external data sets.', `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), KEY `idx_access` (`access`), KEY `idx_checkout` (`checked_out`), KEY `idx_state` (`state`), KEY `idx_catid` (`catid`), KEY `idx_createdby` (`created_by`), KEY `idx_featured_catid` (`featured`,`catid`), KEY `idx_language` (`language`), KEY `idx_xreference` (`xreference`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; PK@B\Vsql/index.htmlnuW+A PK@B\) sql/.htaccessnuW+A Order allow,deny Deny from all PK@B\Uff access.xmlnuW+APK@B\)tables/.htaccessnuW+APK@B\V_tables/index.htmlnuW+APK@B\U++tables/weblink.phpnuW+APK@B\Khh ,!config.xmlnuW+APK@B\V >index.htmlnuW+APK@B\Oн-- '?weblinks.phpnuW+APK@B\j~Q Q Aweblinks.xmlnuW+APK@B\) K.htaccessnuW+APK@B\.fPPKmodels/weblink.phpnuW+APK@B\Vgcmodels/index.htmlnuW+APK@B\)cmodels/fields/.htaccessnuW+APK@B\Vdmodels/fields/index.htmlnuW+APK@B\7dmodels/fields/ordering.phpnuW+APK@B\)Lmmodels/.htaccessnuW+APK@B\V nmodels/forms/index.htmlnuW+APK@B\)qnmodels/forms/.htaccessnuW+APK@B\4 6omodels/forms/weblink.xmlnuW+APK@B\.wmodels/weblinks.phpnuW+APK@B\ nFFcontroller.phpnuW+APK@B\আDviews/weblinks/view.html.phpnuW+APK@B\)uviews/weblinks/tmpl/.htaccessnuW+APK@B\VAviews/weblinks/tmpl/index.htmlnuW+APK@B\e%views/weblinks/tmpl/default_batch.phpnuW+APK@B\4!!views/weblinks/tmpl/default.phpnuW+APK@B\Vviews/weblinks/index.htmlnuW+APK@B\)views/weblinks/.htaccessnuW+APK@B\Jvv"views/weblink/tmpl/edit_params.phpnuW+APK@B\V{views/weblink/tmpl/index.htmlnuW+APK@B\h!!views/weblink/tmpl/edit.phpnuW+APK@B\V??$Sviews/weblink/tmpl/edit_metadata.phpnuW+APK@B\)views/weblink/tmpl/.htaccessnuW+APK@B\Vviews/weblink/index.htmlnuW+APK@B\)views/weblink/.htaccessnuW+APK@B\Aaviews/weblink/view.html.phpnuW+APK@B\)views/.htaccessnuW+APK@B\Vviews/index.htmlnuW+APK@B\Vhelpers/index.htmlnuW+APK@B\@kk^helpers/weblinks.phpnuW+APK@B\) helpers/.htaccessnuW+APK@B\<8l l controllers/weblink.phpnuW+APK@B\Vcontrollers/index.htmlnuW+APK@B\)controllers/.htaccessnuW+APK@B\(controllers/weblinks.phpnuW+APK@B\Œ##sql/uninstall.mysql.utf8.sqlnuW+APK@B\yg&sql/install.mysql.utf8.sqlnuW+APK@B\Vsql/index.htmlnuW+APK@B\) Wsql/.htaccessnuW+APK00