Файловый менеджер - Редактировать - /home/poliximo/public_html/home_/administrator/components/com_rsseo/install.rsseo.php
Назад
<?php defined( '_JEXEC' ) or die( 'Restricted access' ); $status = new JObject(); $status->modules = array(); $status->plugins = array(); //PLUGIN INSTALLATION SECTION $plugins = &$this->manifest->getElementByPath('plugins'); if (is_a($plugins, 'JSimpleXMLElement') && count($plugins->children())) { foreach ($plugins->children() as $plugin) { $pname = $plugin->attributes('plugin'); $pgroup = $plugin->attributes('group'); $porder = $plugin->attributes('order'); // Set the installation path if (!empty($pname) && !empty($pgroup)) { $this->parent->setPath('extension_root', JPATH_ROOT.DS.'plugins'.DS.$pgroup); } else { $this->parent->abort(JText::_('Plugin').' '.JText::_('Install').': '.JText::_('No plugin file specified')); return false; } //Filesystem Processing Section // If the plugin directory does not exist, lets create it $created = false; if (!file_exists($this->parent->getPath('extension_root'))) { if (!$created = JFolder::create($this->parent->getPath('extension_root'))) { $this->parent->abort(JText::_('Plugin').' '.JText::_('Install').': '.JText::_('Failed to create directory').': "'.$this->parent->getPath('extension_root').'"'); return false; } } /* * If we created the plugin directory and will want to remove it if we * have to roll back the installation, lets add it to the installation * step stack */ if ($created) { $this->parent->pushStep(array ('type' => 'folder', 'path' => $this->parent->getPath('extension_root'))); } // Copy all necessary files $element = &$plugin->getElementByPath('files'); if ($this->parent->parseFiles($element, -1) === false) { // Install failed, roll back changes $this->parent->abort(); return false; } // Copy all necessary files $element = &$plugin->getElementByPath('languages'); if ($this->parent->parseLanguages($element, 1) === false) { // Install failed, roll back changes $this->parent->abort(); return false; } // Copy media files $element = &$plugin->getElementByPath('media'); if ($this->parent->parseMedia($element, 1) === false) { // Install failed, roll back changes $this->parent->abort(); return false; } //Database Processing Section $db = &JFactory::getDBO(); // Check to see if a plugin by the same name is already installed $query = 'SELECT `id`' . ' FROM `#__plugins`' . ' WHERE folder = '.$db->Quote($pgroup) . ' AND element = '.$db->Quote($pname); $db->setQuery($query); if (!$db->Query()) { // Install failed, roll back changes $this->parent->abort(JText::_('Plugin').' '.JText::_('Install').': '.$db->stderr(true)); return false; } $id = $db->loadResult(); // Was there a plugin already installed with the same name? if ($id) { if (!$this->parent->getOverwrite()) { // Install failed, roll back changes $this->parent->abort(JText::_('Plugin').' '.JText::_('Install').': '.JText::_('Plugin').' "'.$pname.'" '.JText::_('already exists!')); return false; } } else { $row =& JTable::getInstance('plugin'); $row->name = JText::_(ucfirst($pgroup)).' - '.JText::_(ucfirst($pname)); $row->ordering = $porder; $row->folder = $pgroup; $row->iscore = 0; $row->access = 0; $row->client_id = 0; $row->element = $pname; $row->published = 1; $row->params = ''; if (!$row->store()) { // Install failed, roll back changes $this->parent->abort(JText::_('Plugin').' '.JText::_('Install').': '.$db->stderr(true)); return false; } } $status->plugins[] = array('name'=>$pname,'group'=>$pgroup); } } //UPDATE PROCEDURE $db = &JFactory::getDBO(); $db->setQuery("DESCRIBE `#__rsseo_pages`"); $pages_table = $db->loadObjectList(); foreach($pages_table as $row) { if(!($row->Field == 'PageModified')) { $db->setQuery("ALTER TABLE `#__rsseo_pages` ADD `PageModified` INT( 2 ) NOT NULL"); $db->query(); } } $db->setQuery("DESCRIBE `#__rsseo_competitors`"); $competitors_table = $db->loadObjectList(); foreach($competitors_table as $row) { if(!($row->Field == 'LastTehnoratiRank')) { $db->setQuery("ALTER TABLE `#__rsseo_competitors` ADD `LastTehnoratiRank` INT( 11 ) NOT NULL DEFAULT '-1'"); $db->query(); } if(!($row->Field == 'Dmoz')) { $db->setQuery("ALTER TABLE `#__rsseo_competitors` ADD `Dmoz` INT( 1 ) NOT NULL DEFAULT '-1'"); $db->query(); } } $db->setQuery("DESCRIBE `#__rsseo_competitors_history`"); $competitors_history_table = $db->loadObjectList(); foreach($competitors_history_table as $row) { if(!($row->Field == 'TehnoratiRank')) { $db->setQuery("ALTER TABLE `#__rsseo_competitors_history` ADD `TehnoratiRank` INT( 11 ) NOT NULL"); $db->query(); } } ?> <div align="left" width="100%"> <img src="../administrator/components/com_rsseo/images/rsseo.jpg" alt="RSSeo! Logo"/> </div> <br/> <table class="adminform"> <tr> <td align="left"> <strong>RSSeo 1.0.0 Component for Joomla!</strong><br/> © 2007-2009 by <a href="http://www.rsjoomla.com" target="_blank">http://www.rsjoomla.com</a><br/> All rights reserved. <br/><br/> This Joomla! Component has been released under <a href="http://www.rsjoomla.com/terms-and-conditions.html" target="_blank">GPL</a>.<br/> <br/><br/> <button onclick="document.location='index.php?option=com_rsseo&task=checkconnections';">Test connectivity</button> <-- Click this button in order to test your remote connections <br/><br/> <b>Visit <a href="http://www.rsjoomla.com/" target="_blank">http://www.rsjoomla.com/</a> - for common issues, tech support, user manual, additional downloads and up to date knowledge base articles related to RSSeo!.</b><br/><br/> Thank you for using RSSeo!. <br/><br/> The rsjoomla.com team. <br/><br/> </td> </tr> </table><br/> <br/><br/> <div align="left" width="100%"><b>RSSeo! 1.0.0 Installed</b></div>
| ver. 1.4 |
Github
|
.
| PHP 8.3.31 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка