示例#1
0
 /**
  *
  * @param <type> $includeCache
  * @return UPDATE_LanguageService
  */
 public static function getInstance()
 {
     if (!isset(self::$classInstance)) {
         self::$classInstance = new self();
     }
     return self::$classInstance;
 }
示例#2
0
文件: update.php 项目: ZyXelP/oxwall
 * 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.
 */
UPDATE_LanguageService::getInstance()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'mobile');
$logger = Updater::getLogger();
try {
    OW::getNavigation()->deleteMenuItem('mobile', 'mobile_pages_dashboard');
} catch (Exception $e) {
    $logger->addEntry(json_encode($e));
}
try {
    OW::getNavigation()->addMenuItem(OW_Navigation::MOBILE_TOP, 'base_member_dashboard', 'mobile', 'mobile_pages_dashboard', OW_Navigation::VISIBLE_FOR_MEMBER);
} catch (Exception $e) {
    $logger->addEntry(json_encode($e));
}
示例#3
0
文件: update.php 项目: vazahat/dudex
<?php

$tblPrefix = OW_DB_PREFIX;
$db = Updater::getDbo();
$simpleQueryList = array("CREATE TABLE IF NOT EXISTS `{$tblPrefix}base_question_config` (\n        id INT(11) NOT NULL AUTO_INCREMENT,\n        questionPresentation ENUM('text','textarea','select','date','location','checkbox','multicheckbox','radio','url','password','age','birthdate') NOT NULL DEFAULT 'text',\n        name VARCHAR(255) NOT NULL,\n        description VARCHAR(1024) DEFAULT NULL,\n        presentationClass VARCHAR(255) DEFAULT NULL,\n        PRIMARY KEY (id)\n    )\n    ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci", "CREATE TABLE IF NOT EXISTS `{$tblPrefix}base_restricted_usernames` (\n        id INT(11) NOT NULL AUTO_INCREMENT,\n        username VARCHAR(32) NOT NULL,\n        PRIMARY KEY (id)\n    )\n    ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci", "ALTER TABLE `{$tblPrefix}activity_action` CHANGE COLUMN status status ENUM('active','inactive') NOT NULL", "ALTER TABLE `{$tblPrefix}base_log` CHANGE COLUMN type type VARCHAR(100) NOT NULL, CHANGE COLUMN `key` `key` VARCHAR(100) NOT NULL", "ALTER TABLE `{$tblPrefix}base_plugin` ADD COLUMN installRoute VARCHAR(255) DEFAULT NULL AFTER adminSettingsRoute", "ALTER TABLE `{$tblPrefix}base_question` ADD COLUMN custom VARCHAR(2048) DEFAULT NULL AFTER sortOrder", "DROP TABLE IF EXISTS `{$tblPrefix}base_banner`", "DROP TABLE IF EXISTS `{$tblPrefix}base_banner_location`", "DROP TABLE IF EXISTS `{$tblPrefix}base_banner_position`", "UPDATE `{$tblPrefix}base_authorization_group` SET `moderated`='1' WHERE `name`='admin'", "DELETE FROM `{$tblPrefix}base_menu_item` WHERE `prefix` = 'admin' AND `key` = 'sidebar_menu_item_ads'", "INSERT INTO `{$tblPrefix}base_config` SET\n        `key`='base',\n        `name`='check_mupdates_ts',\n        `value`='0',\n        `description`='Last manual updates check timestamp.'", "INSERT INTO `{$tblPrefix}base_menu_item` SET\n        `prefix`='admin',\n        `key`='sidebar_menu_item_dashboard_finance',\n        `documentKey`='',\n        `type`='admin',\n        `order`=2,\n        `routePath`='admin_finance',\n        `newWindow`='0',\n        `visibleFor`='3'", "INSERT INTO `{$tblPrefix}base_menu_item` SET\n        `prefix`='admin',\n        `key`='sidebar_menu_item_restricted_usernames',\n        `documentKey`='',\n        `type`='admin_users',\n        `order`=6,\n        `routePath`='admin_restrictedusernames',\n        `newWindow`='0',\n        `visibleFor`='3'", "UPDATE `{$tblPrefix}base_plugin` SET `build` = 1");
$sqlErrors = array();
foreach ($simpleQueryList as $query) {
    try {
        $db->query($query);
    } catch (Exception $e) {
        $sqlErrors[] = $e;
    }
}
UPDATE_LanguageService::getInstance()->importPrefixFromZip(dirname(__FILE__) . DS . 'admin_langs.zip', 'update');
UPDATE_LanguageService::getInstance()->importPrefixFromZip(dirname(__FILE__) . DS . 'base_langs.zip', 'update');
$dirArray = array(OW_DIR_PLUGINFILES . 'admin' . DS . 'languages' . DS, OW_DIR_PLUGINFILES . 'admin' . DS . 'languages' . DS . 'export' . DS, OW_DIR_PLUGINFILES . 'admin' . DS . 'languages' . DS . 'import' . DS, OW_DIR_PLUGINFILES . 'admin' . DS . 'languages' . DS . 'tmp' . DS, OW_DIR_PLUGINFILES . 'ow' . DS, OW_DIR_PLUGINFILES . 'plugin' . DS);
foreach ($dirArray as $dir) {
    if (!file_exists($dir)) {
        mkdir($dir);
        chmod($dir, 0777);
    }
}
try {
    $widgetService = UPDATE_WidgetService::getInstance();
    $widgetService->deleteWidget('BASE_CMP_SidebarAds');
    $newWidget = $widgetService->addWidget('BASE_CMP_MyAvatarWidget');
    $newWidgetPlace = $widgetService->addWidgetToPlace($newWidget, UPDATE_WidgetService::PLACE_INDEX);
    $widgetService->addWidgetToPosition($newWidgetPlace, UPDATE_WidgetService::SECTION_SIDEBAR);
} catch (Exception $e) {
    printVar($e);
}
示例#4
0
<?php

UPDATE_LanguageService::getInstance()->deleteLangKey('admin', 'input_settings_allow_photo_upload_label');
UPDATE_ConfigService::getInstance()->deleteConfig('base', 'tf_allow_pic_upload');
示例#5
0
文件: update.php 项目: vazahat/dudex
<?php

/**
 * 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.
 */
UPDATE_LanguageService::getInstance()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'google_analytics');
示例#6
0
文件: updater.php 项目: ZyXelP/oxwall
 /**
  * @return UPDATE_LanguageService
  */
 public static function getLanguageService()
 {
     return UPDATE_LanguageService::getInstance();
 }
示例#7
0
<?php

/**
 * Copyright (c) 2014, Skalfa LLC
 * All rights reserved.
 *
 * ATTENTION: This commercial software is intended for exclusive use with SkaDate Dating Software (http://www.skadate.com) and is licensed under SkaDate Exclusive License by Skalfa LLC.
 *
 * Full text of this license can be found at http://www.skadate.com/sel.pdf
 */
UPDATE_LanguageService::getInstance()->deleteLangKey('mailbox', 'disable_sounds');
UPDATE_LanguageService::getInstance()->deleteLangKey('mailbox', 'enable_sounds');
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'mailbox');