* Copyright (c) 2011, Oxwall Foundation * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this list of conditions and * the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and * the following disclaimer in the documentation and/or other materials provided with the distribution. * * - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'blogs'); $exArr = array(); try { $groupId = Updater::getAuthorizationService()->findGroupIdByName('blogs'); if ($groupId) { Updater::getDbo()->update("UPDATE `" . OW_DB_PREFIX . "base_authorization_action` SET `availableForGuest`=0 WHERE `name`='delete_comment_by_content_owner' AND `groupId`={$groupId}"); } } catch (Exception $e) { $exArr[] = $e; }
<?php /** * Copyright (c) 2011 Sardar Madumarov * All rights reserved. * ATTENTION: This commercial software is intended for use with Oxwall Free Community Software http://www.oxwall.org/ * and is licensed under Oxwall Store Commercial License. * Full text of this license can be found at http://www.oxwall.org/store/oscl */ /** * @author Sardar Madumarov <*****@*****.**> * @package oaseo * @since 1.0 */ $dbo = Updater::getDbo(); $sqlErrors = array(); $queries = array("ALTER TABLE `" . OW_DB_PREFIX . "oaseo_meta` ADD `dispatchAttrs` TEXT NULL DEFAULT NULL", "CREATE TABLE IF NOT EXISTS `" . OW_DB_PREFIX . "oaseo_data` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `key` varchar(100) NOT NULL,\n `data` mediumtext NOT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1", "CREATE TABLE IF NOT EXISTS `" . OW_DB_PREFIX . "oaseo_sitemap_item` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `type` int(11) NOT NULL,\n `value` text NOT NULL,\n `addTs` int(11) NOT NULL DEFAULT '0',\n PRIMARY KEY (`id`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1", "CREATE TABLE IF NOT EXISTS `" . OW_DB_PREFIX . "oaseo_sitemap_page` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `url` varchar(255) NOT NULL,\n `title` text,\n `meta` text,\n `status` tinyint(1) NOT NULL DEFAULT '0',\n `processTs` int(11) NOT NULL DEFAULT '0',\n `broken` tinyint(1) NOT NULL DEFAULT '0',\n PRIMARY KEY (`id`),\n UNIQUE KEY `url_index` (`url`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1", "CREATE TABLE IF NOT EXISTS `" . OW_DB_PREFIX . "oaseo_sitemap_page_item` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `pageId` int(11) NOT NULL,\n `itemId` int(11) NOT NULL,\n `type` int(11) NOT NULL,\n PRIMARY KEY (`id`),\n KEY `pageId` (`pageId`),\n KEY `itemId` (`itemId`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1"); foreach ($queries as $query) { try { $dbo->query($query); } catch (Exception $e) { $sqlErrors[] = $e; } } $config = Updater::getConfigService(); if (!$config->configExists('oaseo', 'crawler_lock')) { $config->addConfig('oaseo', 'crawler_lock', 0); } if (!$config->configExists('oaseo', 'update_info')) { $config->addConfig('oaseo', 'update_info', 0); }
try { $sql = "ALTER TABLE `" . OW_DB_PREFIX . "googlelocation_data` ADD `entityType` ENUM( 'user', 'event' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `entityId` "; Updater::getDbo()->query($sql); } catch (Exception $e) { } try { $sql = "UPDATE `" . OW_DB_PREFIX . "googlelocation_data` SET `entityType` = 'user' "; Updater::getDbo()->query($sql); } catch (Exception $e) { } try { $sql = "ALTER TABLE `" . OW_DB_PREFIX . "googlelocation_data` DROP INDEX `entityId` "; Updater::getDbo()->query($sql); } catch (Exception $e) { } try { $sql = "ALTER IGNORE TABLE `" . OW_DB_PREFIX . "googlelocation_data` ADD INDEX `entityId` ( `entityId` , `entityType` ) "; Updater::getDbo()->query($sql); } catch (Exception $e) { } try { $sql = " DELETE FROM g `" . OW_DB_PREFIX . "googlelocation_data` g\n LEFT JOIN `" . OW_DB_PREFIX . "base_user` u ON u.id = g.entityId\n WHERE g.entityType = 'user' AND u.id IS NULL "; Updater::getDbo()->query($sql); } catch (Exception $e) { } try { $sql = " ALTER TABLE `" . OW_DB_PREFIX . "googlelocation_data` CHANGE `json` `json` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL "; Updater::getDbo()->query($sql); } catch (Exception $e) { } Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'googlelocation');
<?php $tblPrefix = OW_DB_PREFIX; $db = Updater::getDbo(); $queryList = array("ALTER TABLE `{$tblPrefix}base_comment_entity` ADD `pluginKey` VARCHAR( 100 ) NOT NULL AFTER `entityId`", "ALTER TABLE `{$tblPrefix}base_comment_entity` ADD INDEX ( `pluginKey` )", "ALTER TABLE `{$tblPrefix}base_plugin` DROP COLUMN `adsEnabled`"); $sqlErrors = array(); foreach ($queryList as $query) { try { $db->query($query); } catch (Exception $e) { $sqlErrors[] = $e; } } $config = OW::getConfig(); if (!$config->configExists('base', 'default_avatar')) { $config->addConfig('base', 'default_avatar', '', 'Default avatar'); } UPDATE_LanguageService::getInstance()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'base'); if (!empty($sqlErrors)) { //printVar($sqlErrors); }
* licensed under The BSD license. * --- * Copyright (c) 2011, Oxwall Foundation * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this list of conditions and * the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and * the following disclaimer in the documentation and/or other materials provided with the distribution. * * - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ $exArr = array(); $sql = "UPDATE `" . OW_DB_PREFIX . "base_comment_entity` \n SET `pluginKey` = :pluginKey \n WHERE `entityType` = :entityType"; try { Updater::getDbo()->query($sql, array('pluginKey' => 'photo', 'entityType' => 'photo_comments')); } catch (Exception $e) { $exArr[] = $e; } Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'photo');
} try { $sql = "CREATE TABLE IF NOT EXISTS `" . OW_DB_PREFIX . "skadate_current_location` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `userId` int(11) NOT NULL,\n `latitude` decimal(12,8) NOT NULL,\n `longitude` decimal(12,8) NOT NULL,\n `updateTimestamp` int(11) NOT NULL,\n PRIMARY KEY (`id`),\n KEY `userId` (`userId`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8;"; Updater::getDbo()->query($sql); } catch (Exception $e) { print_r($e); } try { $sql = "CREATE TABLE IF NOT EXISTS `" . OW_DB_PREFIX . "skadate_avatar` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `avatarId` int(11) NOT NULL,\n `userId` int(11) NOT NULL,\n `hash` int(11) NOT NULL DEFAULT '0',\n PRIMARY KEY (`id`),\n UNIQUE KEY `avatarId` (`avatarId`,`userId`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8;"; Updater::getDbo()->query($sql); } catch (Exception $e) { print_r($e); } try { $sql = "UPDATE `" . OW_DB_PREFIX . "base_plugin` SET developerKey=:dk WHERE `key`=:k"; Updater::getDbo()->query($sql, array("dk" => "99d6bdd5bb6468beaf118c4664dd92ff", "k" => "pcgallery")); } catch (Exception $e) { print_r($e); } if (!OW::getConfig()->configExists('skadate', 'update_gender_values')) { OW::getConfig()->addConfig('skadate', 'update_gender_values', true); } else { OW::getConfig()->saveConfig('skadate', 'update_gender_values', true); } if (!Updater::getConfigService()->configExists('skadate', 'photo_filter_setting_matching')) { Updater::getConfigService()->addConfig('skadate', 'photo_filter_setting_matching', false); } @mkdir(OW_DIR_USERFILES . 'plugins' . DS . 'skadate' . DS . 'avatars' . DS); @chmod(OW_DIR_USERFILES . 'plugins' . DS . 'skadate' . DS . 'avatars' . DS, 0777); @mkdir(OW_DIR_PLUGINFILES . 'skadate' . DS . 'avatars' . DS); @chmod(OW_DIR_PLUGINFILES . 'skadate' . DS . 'avatars' . DS, 0777);
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ $exArr = array(); Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'ajaxim'); $moduleName = OW::getPluginManager()->getPlugin('ajaxim')->getModuleName(); try { if (!Updater::getConfigService()->configExists('ajaxim', 'friends_only')) { Updater::getConfigService()->addConfig('ajaxim', 'friends_only', 0); } } catch (Exception $e) { $exArr[] = $e; } try { Updater::getDbo()->update("REPLACE INTO `" . OW_DB_PREFIX . "base_preference_section` ( `name`, `sortOrder`) VALUES ('ajaxim', 0)"); } catch (Exception $e) { $exArr[] = $e; } try { Updater::getDbo()->update("REPLACE INTO `" . OW_DB_PREFIX . "base_preference` ( `key`, `defaultValue`, `sectionName`, `sortOrder`) VALUES ( 'ajaxim_user_settings_enable_sound', '1', 'ajaxim', 0 )"); } catch (Exception $e) { $exArr[] = $e; } try { OW::getPluginManager()->addPluginSettingsRouteName('ajaxim', 'ajaxim_settings'); } catch (Exception $e) { $exArr[] = $e; }
* --- * Copyright (c) 2011, Oxwall Foundation * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this list of conditions and * the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and * the following disclaimer in the documentation and/or other materials provided with the distribution. * * - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ $exArr = array(); try { $groupId = Updater::getAuthorizationService()->findGroupIdByName('blogs'); if ($groupId) { Updater::getDbo()->update("UPDATE `" . OW_DB_PREFIX . "base_authorization_action` SET `availableForGuest`=1 WHERE `name`='view' AND `groupId`={$groupId}"); } } catch (Exception $e) { $exArr[] = $e; }
* Copyright (c) 2011, Oxwall Foundation * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this list of conditions and * the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and * the following disclaimer in the documentation and/or other materials provided with the distribution. * * - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'blogs'); $exArr = array(); try { $groupId = Updater::getAuthorizationService()->findGroupIdByName('blogs'); if ($groupId) { Updater::getDbo()->update("ALTER TABLE `" . OW_DB_PREFIX . "blogs_post` ADD `privacy` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'everybody'"); } } catch (Exception $e) { $exArr[] = $e; }
* This software is intended for use with Oxwall Free Community Software http://www.oxwall.org/ and is * licensed under The BSD license. * --- * Copyright (c) 2011, Oxwall Foundation * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this list of conditions and * the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and * the following disclaimer in the documentation and/or other materials provided with the distribution. * * - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ $exArr = array(); $sql = "UPDATE `" . OW_DB_PREFIX . "base_comment_entity` \n SET `pluginKey` = :pluginKey \n WHERE `entityType` = :entityType"; try { Updater::getDbo()->query($sql, array('pluginKey' => 'links', 'entityType' => 'link')); } catch (Exception $e) { $exArr[] = $e; }
<?php /** * Copyright (c) 2009, Skalfa LLC * All rights reserved. * ATTENTION: This commercial software is intended for use with Oxwall Free Community Software http://www.oxwall.org/ * and is licensed under Oxwall Store Commercial License. * Full text of this license can be found at http://www.oxwall.org/store/oscl */ $sql = "SELECT `id` FROM `" . OW_DB_PREFIX . "base_billing_gateway` WHERE `gatewayKey` = 'billingccbill';"; try { $id = Updater::getDbo()->queryForColumn($sql); if ($id) { $sql = "INSERT INTO `" . OW_DB_PREFIX . "base_billing_gateway_config` \n SET `gatewayId` = :id, `name` = :name, `value` = '';"; try { Updater::getDbo()->insert($sql, array('gatewayId' => $id, 'name' => 'dpFormName')); } catch (Exception $e) { $exArr[] = $e; } try { Updater::getDbo()->insert($sql, array('gatewayId' => $id, 'name' => 'edFormName')); } catch (Exception $e) { $exArr[] = $e; } } } catch (Exception $e) { $exArr[] = $e; } Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'billingccbill');
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ $errors = array(); try { Updater::getDbo()->query("ALTER TABLE `" . OW_DB_PREFIX . "event_item` ADD `endDateFlag` BOOL NOT NULL DEFAULT '1'"); } catch (Exception $e) { $errors[] = $e; } try { Updater::getDbo()->query("ALTER TABLE `" . OW_DB_PREFIX . "event_item` ADD `startTimeDisabled` BOOL NOT NULL DEFAULT '0'"); } catch (Exception $e) { $errors[] = $e; } try { Updater::getDbo()->query("ALTER TABLE `" . OW_DB_PREFIX . "event_item` ADD `endTimeDisabled` BOOL NOT NULL DEFAULT '0'"); } catch (Exception $e) { $errors[] = $e; } $sql = "UPDATE `" . OW_DB_PREFIX . "base_comment_entity` SET `pluginKey` = :pluginKey WHERE `entityType` = :entityType"; try { Updater::getDbo()->query($sql, array('pluginKey' => 'event', 'entityType' => 'event')); } catch (Exception $e) { $errors[] = $e; } Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'event'); @mkdir(OW_DIR_STATIC_PLUGIN . 'event' . DS, 0777); @mkdir(OW_DIR_STATIC_PLUGIN . 'event' . DS . 'js' . DS, 0777); @copy(OW_DIR_PLUGIN . 'event' . DS . 'static' . DS . 'js' . DS . 'event.js', OW_DIR_STATIC_PLUGIN . 'event' . DS . 'js' . DS . 'event.js');
* All rights reserved. * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this list of conditions and * the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and * the following disclaimer in the documentation and/or other materials provided with the distribution. * * - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ $errors = array(); try { Updater::getDbo()->query("ALTER TABLE `" . OW_DB_PREFIX . "event_item` CHANGE `image` `image` VARCHAR( 32 ) NULL DEFAULT NULL"); } catch (Exception $e) { $errors[] = $e; } try { Updater::getDbo()->query("UPDATE `" . OW_DB_PREFIX . "event_item` SET image = id WHERE image = 1 "); } catch (Exception $e) { $errors[] = $e; }
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ $exArr = array(); $start = 0; $count = 100; while (true) { $postList = array(); $sql = "SELECT * FROM `" . OW_DB_PREFIX . "links_link` \n ORDER BY `timestamp` ASC LIMIT :start, :count"; try { $postList = Updater::getDbo()->queryForList($sql, array('start' => $start, 'count' => $count)); } catch (Exception $e) { $exArr[] = $e; } if (empty($postList)) { break; } foreach ($postList as $post) { $sql = "UPDATE `" . OW_DB_PREFIX . "links_link` \n SET `description` = :description \n WHERE `id` = :id"; try { Updater::getDbo()->query($sql, array('description' => nl2br($post['description']), 'id' => $post['id'])); } catch (Exception $e) { $exArr[] = $e; } } $start += $count; }
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this list of conditions and * the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and * the following disclaimer in the documentation and/or other materials provided with the distribution. * * - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ $errors = array(); try { Updater::getDbo()->query("ALTER TABLE `" . OW_DB_PREFIX . "event_user` ADD INDEX `userId` ( `userId` )"); } catch (Exception $e) { $errors[] = $e; } try { Updater::getDbo()->query("ALTER TABLE `" . OW_DB_PREFIX . "event_invite` DROP INDEX `userId`"); } catch (Exception $e) { $errors[] = $e; } Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'event');
<?php /** * EXHIBIT A. Common Public Attribution License Version 1.0 * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); * you may not use this file except in compliance with the License. You may obtain a copy of the License at * http://www.oxwall.org/license. The License is based on the Mozilla Public License Version 1.1 * but Sections 14 and 15 have been added to cover use of software over a computer network and provide for * limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent * with Exhibit B. Software distributed under the License is distributed on an “AS IS” basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language * governing rights and limitations under the License. The Original Code is Oxwall software. * The Initial Developer of the Original Code is Oxwall Foundation (http://www.oxwall.org/foundation). * All portions of the code written by Oxwall Foundation are Copyright (c) 2011. All Rights Reserved. * EXHIBIT B. Attribution Information * Attribution Copyright Notice: Copyright 2011 Oxwall Foundation. All rights reserved. * Attribution Phrase (not exceeding 10 words): Powered by Oxwall community software * Attribution URL: http://www.oxwall.org/ * Graphic Image as provided in the Covered Code. * Display of Attribution Information is required in Larger Works which are defined in the CPAL as a work * which combines Covered Code or portions thereof with code not governed by the terms of the CPAL. */ BOL_MobileWidgetService::getInstance()->deleteWidget('BASE_MCMP_JoinNowWidget'); $widget = BOL_MobileWidgetService::getInstance()->addWidget('BASE_MCMP_JoinNowWidget', false); $placeWidget = BOL_MobileWidgetService::getInstance()->addWidgetToPlace($widget, BOL_MobileWidgetService::PLACE_MOBILE_INDEX); BOL_MobileWidgetService::getInstance()->addWidgetToPosition($placeWidget, BOL_MobileWidgetService::SECTION_MOBILE_MAIN); try { Updater::getDbo()->query(" ALTER TABLE `" . OW_DB_PREFIX . "base_user` ADD KEY `activityStamp` (`activityStamp`); "); } catch (Exception $e) { Updater::getLogger()->addEntry(json_encode($e)); }
<?php $P = OW_DB_PREFIX; try { Updater::getDbo()->query("DELETE FROM `{$P}usercredits_action` WHERE actionKey='import_friend' AND pluginKey='contactimporter'"); } catch (Exception $e) { } Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'contactimporter');
* following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this list of conditions and * the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and * the following disclaimer in the documentation and/or other materials provided with the distribution. * * - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ $errors = array(); try { Updater::getDbo()->query("ALTER TABLE `" . OW_DB_PREFIX . "event_item` ADD `image` BOOL NOT NULL DEFAULT '0'"); } catch (Exception $e) { $errors[] = $e; } try { Updater::getDbo()->query("UPDATE `" . OW_DB_PREFIX . "event_item` SET `image` = 1"); } catch (Exception $e) { $errors[] = $e; } Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'event'); //printVar($errors);
* use this file except in compliance with the License. You may obtain a copy * of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ try { $sql = "SHOW COLUMNS FROM `" . OW_DB_PREFIX . "video_clip` LIKE 'plugin';"; $cols = Updater::getDbo()->queryForList($sql); if (!count($cols)) { $sql = "ALTER TABLE `" . OW_DB_PREFIX . "video_clip` ADD `plugin` VARCHAR(255) NULL DEFAULT 'video' ; "; Updater::getDbo()->queryForList($sql); } } catch (Exception $e) { } @Updater::getLanguageService()->importPrefixFromZip(dirname(dirname(dirname(__FILE__))) . DS . 'langs.zip', 'spvideolite'); // refresh static cache $plugin = OW::getPluginManager()->getPlugin('spvideolite'); $staticDir = OW_DIR_STATIC_PLUGIN . $plugin->getModuleName() . DS; $pluginStaticDir = OW_DIR_PLUGIN . $plugin->getModuleName() . DS . 'static' . DS; if (file_exists($staticDir)) { UTIL_File::removeDir($staticDir); } mkdir($staticDir); chmod($staticDir, 0777); UTIL_File::copyDir($pluginStaticDir, $staticDir);
/** * This software is intended for use with Oxwall Free Community Software http://www.oxwall.org/ and is * licensed under The BSD license. * --- * Copyright (c) 2011, Oxwall Foundation * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this list of conditions and * the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and * the following disclaimer in the documentation and/or other materials provided with the distribution. * * - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ $errors = array(); try { Updater::getDbo()->query("ALTER TABLE `" . OW_DB_PREFIX . "event_invite` ADD `displayInvitation` BOOL NOT NULL DEFAULT '1'"); } catch (Exception $e) { $errors[] = $e; }
try { $sql = "CREATE TABLE IF NOT EXISTS `" . OW_DB_PREFIX . "membership_user_trial` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `planId` int(11) NOT NULL,\n `userId` int(11) NOT NULL,\n `startStamp` int(11) NOT NULL,\n `expirationStamp` int(11) DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `userId` (`userId`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8;"; Updater::getDbo()->query($sql); } catch (Exception $e) { } try { $sql = "ALTER TABLE `" . OW_DB_PREFIX . "membership_user` ADD `trial` TINYINT( 1 ) NULL DEFAULT '0'"; Updater::getDbo()->query($sql); } catch (Exception $e) { } try { $sql = "SELECT * FROM `" . OW_DB_PREFIX . "membership_type` WHERE `accountTypeId` IS NULL"; $msList = Updater::getDbo()->queryForList($sql); if ($msList) { $sql = "SELECT * FROM `" . OW_DB_PREFIX . "base_question_account_type` ORDER BY `sortOrder`"; $accTypes = Updater::getDbo()->queryForList($sql); $acc = array_shift($accTypes); $sql = "UPDATE `" . OW_DB_PREFIX . "membership_type`\n SET `accountTypeId` = :accId"; Updater::getDbo()->query($sql, array('accId' => $acc['id'])); if (count($accTypes)) { foreach ($accTypes as $acc) { $sql = "INSERT INTO `" . OW_DB_PREFIX . "membership_type`\n SET roleId = :roleId, `accountTypeId` = :accId"; foreach ($msList as $ms) { Updater::getDbo()->query($sql, array('roleId' => $ms['roleId'], 'accId' => $acc['id'])); } } } } } catch (Exception $e) { } Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'membership');
<?php try { Updater::getDbo()->query("ALTER TABLE `" . OW_DB_PREFIX . "equestions_notification` ADD `special` TINYINT NULL ,ADD INDEX ( `special` )"); } catch (Exception $e) { } Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'equestions');
public function __construct() { $this->db = Updater::getDbo(); $this->dbPrefix = OW_DB_PREFIX; }
* following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this list of conditions and * the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and * the following disclaimer in the documentation and/or other materials provided with the distribution. * * - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ try { Updater::getDbo()->query("ALTER TABLE `" . OW_DB_PREFIX . "forum_group` ADD `entityId` INT( 11 ) NULL DEFAULT NULL "); } catch (Exception $e) { } try { Updater::getDbo()->query("ALTER TABLE `" . OW_DB_PREFIX . "forum_section` ADD `entity` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL"); } catch (Exception $e) { } try { Updater::getDbo()->query("ALTER TABLE `" . OW_DB_PREFIX . "forum_section` ADD `isHidden` TINYINT( 1 ) NOT NULL DEFAULT '0'"); } catch (Exception $e) { } Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'forum');
<?php /** * EXHIBIT A. Common Public Attribution License Version 1.0 * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); * you may not use this file except in compliance with the License. You may obtain a copy of the License at * http://www.oxwall.org/license. The License is based on the Mozilla Public License Version 1.1 * but Sections 14 and 15 have been added to cover use of software over a computer network and provide for * limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent * with Exhibit B. Software distributed under the License is distributed on an “AS IS” basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language * governing rights and limitations under the License. The Original Code is Oxwall software. * The Initial Developer of the Original Code is Oxwall Foundation (http://www.oxwall.org/foundation). * All portions of the code written by Oxwall Foundation are Copyright (c) 2011. All Rights Reserved. * EXHIBIT B. Attribution Information * Attribution Copyright Notice: Copyright 2011 Oxwall Foundation. All rights reserved. * Attribution Phrase (not exceeding 10 words): Powered by Oxwall community software * Attribution URL: http://www.oxwall.org/ * Graphic Image as provided in the Covered Code. * Display of Attribution Information is required in Larger Works which are defined in the CPAL as a work * which combines Covered Code or portions thereof with code not governed by the terms of the CPAL. */ $queryList = array("ALTER TABLE `" . OW_DB_PREFIX . "base_plugin` ADD `licenseCheckTimestamp` INT UNSIGNED NULL DEFAULT NULL AFTER `licenseKey`, ADD INDEX `licenseCheckTimestamp` (`licenseCheckTimestamp`)", "ALTER TABLE `" . OW_DB_PREFIX . "base_theme` ADD `licenseCheckTimestamp` INT UNSIGNED NULL DEFAULT NULL AFTER `sidebarPosition`, ADD INDEX `licenseCheckTimestamp` (`licenseCheckTimestamp`)", "ALTER TABLE `" . OW_DB_PREFIX . "base_theme` CHANGE `name` `key` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL", "ALTER TABLE `" . OW_DB_PREFIX . "base_theme` DROP `isActive`"); foreach ($queryList as $query) { try { Updater::getDbo()->query($query); } catch (Exception $e) { Updater::getLogger()->addEntry(json_encode($e)); } } Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . "langs.zip", "admin");
$count = 100; while (true) { $postList = array(); $sql = "SELECT * FROM `" . OW_DB_PREFIX . "forum_post` \n ORDER BY `createStamp` ASC LIMIT :start, :count"; try { $postList = Updater::getDbo()->queryForList($sql, array('start' => $start, 'count' => $count)); } catch (Exception $e) { $exArr[] = $e; } if (empty($postList)) { break; } foreach ($postList as $post) { $sql = "UPDATE `" . OW_DB_PREFIX . "forum_post` \n SET `text` = :text \n WHERE `id` = :id"; try { Updater::getDbo()->query($sql, array('text' => nl2br(fromBBtoHtml($post['text'])), 'id' => $post['id'])); } catch (Exception $e) { $exArr[] = $e; } } $start += $count; } function fromBBtoHtml($txt) { $tagList = array(array('tag' => 'a', 'pair' => true, 'attributes' => array('href')), array('tag' => 'img', 'pair' => false, 'attributes' => array('src', 'class', 'style')), array('tag' => 'strong', 'pair' => true, 'attributes' => array()), array('tag' => 'u', 'pair' => true, 'attributes' => array()), array('tag' => 'i', 'pair' => true, 'attributes' => array())); $result = $txt; foreach ($tagList as $tag) { if (empty($tag['tag']) || !isset($tag['pair'])) { continue; } $tagName = $tag['tag'];
* Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy * of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ try { $sql = "SHOW COLUMNS FROM `" . OW_DB_PREFIX . "video_clip` LIKE 'plugin';"; $cols = Updater::getDbo()->queryForList($sql); if (!count($cols)) { $sql = "ALTER TABLE `" . OW_DB_PREFIX . "video_clip` ADD `plugin` VARCHAR(255) NULL DEFAULT 'video' ; "; Updater::getDbo()->update($sql); } } catch (Exception $e) { } // refresh static cache $plugin = OW::getPluginManager()->getPlugin('spvideolite'); $staticDir = OW_DIR_STATIC_PLUGIN . $plugin->getModuleName() . DS; $pluginStaticDir = OW_DIR_PLUGIN . $plugin->getModuleName() . DS . 'static' . DS; if (file_exists($staticDir)) { UTIL_File::removeDir($staticDir); } mkdir($staticDir); chmod($staticDir, 0777); UTIL_File::copyDir($pluginStaticDir, $staticDir);
* This software is intended for use with Oxwall Free Community Software http://www.oxwall.org/ and is * licensed under The BSD license. * --- * Copyright (c) 2011, Oxwall Foundation * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this list of conditions and * the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and * the following disclaimer in the documentation and/or other materials provided with the distribution. * * - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ $exArr = array(); $sql = "UPDATE `" . OW_DB_PREFIX . "base_comment_entity` \n SET `pluginKey` = :pluginKey \n WHERE `entityType` = :entityType"; try { Updater::getDbo()->query($sql, array('pluginKey' => 'blogs', 'entityType' => 'blog-post')); } catch (Exception $e) { $exArr[] = $e; }
$matchSection->name = 'about_my_match'; $matchSection->sortOrder = 1; $matchSection->isHidden = 0; BOL_QuestionSectionDao::getInstance()->save($matchSection); } $dbPrefix = OW_DB_PREFIX; try { $sql = "UPDATE `{$dbPrefix}base_question` SET `onJoin` = '1', `required` = '1' WHERE `name` = 'match_age' OR `name`='birthdate'"; Updater::getDbo()->query($sql); } catch (Exception $e) { } try { $sql = "UPDATE `{$dbPrefix}base_question` SET `sectionName` = 'about_my_match', `onEdit` = 0, `onJoin` = 0 WHERE `name` <> 'match_age' AND `name`<>'match_sex' AND `parent` <> '' AND `parent` IS NOT NULL"; Updater::getDbo()->query($sql); } catch (Exception $e) { } try { $sql = "SELECT * FROM `{$dbPrefix}base_question_section` WHERE `sortOrder` = 0"; $sectionData = Updater::getDbo()->queryForRow($sql); } catch (Exception $e) { } try { $sql = "UPDATE `{$dbPrefix}base_question` SET `sectionName` = :sectionName WHERE `sectionName` = 'about_my_match' AND (`parent` = '' OR `parent` IS NULL)"; Updater::getDbo()->query($sql, array('sectionName' => $sectionData['name'])); } catch (Exception $e) { } try { $sql = "UPDATE `{$dbPrefix}base_question_section` SET `isDeletable` = 0 WHERE `name` = 'about_my_match' "; Updater::getDbo()->query($sql, array('sectionName' => $sectionData['name'])); } catch (Exception $e) { }
try { $entityTypeId = PHOTO_BOL_SearchService::getInstance()->getEntityTypeId(PHOTO_BOL_SearchService::ENTITY_TYPE_PHOTO); Updater::getDbo()->query('INSERT INTO `' . PHOTO_BOL_SearchDataDao::getInstance()->getTableName() . '` (`entityTypeId`, `entityId`, `content`) SELECT ' . $entityTypeId . ', `id`, `description` FROM `' . PHOTO_BOL_PhotoDao::getInstance()->getTableName() . '`'); } catch (Exception $e) { Updater::getLogger()->addEntry(json_encode($e)); } $config = Updater::getConfigService(); if (!$config->configExists('photo', 'photo_list_view_classic')) { $config->addConfig('photo', 'photo_list_view_classic', FALSE); } if (!$config->configExists('photo', 'album_list_view_classic')) { $config->addConfig('photo', 'album_list_view_classic', FALSE); } if (!$config->configExists('photo', 'photo_view_classic')) { $config->addConfig('photo', 'photo_view_classic', FALSE); } if (!$config->configExists('photo', 'download_accept')) { $config->addConfig('photo', 'download_accept', TRUE); } Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'photo'); Updater::getDbo()->query('DROP TABLE IF EXISTS `' . OW_DB_PREFIX . 'photo_update_tag`; CREATE TABLE `' . OW_DB_PREFIX . 'photo_update_tag` ( `entityTagId` int(10) unsigned NOT NULL, UNIQUE KEY `entityTagId` (`entityTagId`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;'); if (!$config->configExists('photo', 'update_tag_process')) { $config->addConfig('photo', 'update_tag_process', TRUE); } $config->saveConfig('photo', 'update_tag_process', TRUE);