summaryrefslogtreecommitdiffstats
path: root/apps/accessibility/lib/Migration/RepairUserConfig.php
blob: 0f80927839d049b74e6dde7e796fd94aafa25792 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
declare (strict_types = 1);
/**
 * @copyright Copyright (c) 2019 Janis Köhr <janiskoehr@icloud.com>
 *
 * @license GNU AGPL version 3 or any later version
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

namespace OCA\Accessibility\Migration;

use OCP\IConfig;
use OCP\IUser;
use OCP\IUserManager;
use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;

class RepairUserConfig implements IRepairStep {

	/** @var string */
	private const APP_NAME = 'accessibility';

	/** @var IUserManager */
	protected $userManager;

	/** @var IConfig */
	protected $config;

	/**
	 * MigrateUserConfig constructor.
	 *
	 * @param IConfig $config
	 * @param IUserManager $userManager
	 */
	public function __construct(IConfig $config,
								IUserManager $userManager) {
		$this->config = $config;
		$this->userManager = $userManager;
	}

	/**
	 * Returns the step's name
	 *
	 * @return string
	 * @since 9.1.0
	 */
	public function getName() {
		return 'Migrate old user config';
	}

	/**
	 * Run repair step.
	 * Must throw exception on error.
	 *
	 * @param IOutput $output
	 * @throws \Exception in case of failure
	 * @since 9.1.0
	 */
	public function run(IOutput $output) {
		$output->startProgress();
		$this->userManager->callForSeenUsers(function(IUser $user) use ($output) {
			$theme = $this->config->getUserValue($user->getUID(), self::APP_NAME, 'theme', false);
			if ($theme === 'themedark') {
				$this->config->setUserValue($user->getUID(), self::APP_NAME, 'theme', 'dark');
			}
			if ($theme === 'themehighcontrast') {
				$this->config->setUserValue($user->getUID(), self::APP_NAME, 'highcontrast', 'highcontrast');
				$this->config->deleteUserValue($user->getUID(), self::APP_NAME, 'theme');
			}
			$output->advance();
		});
		$output->finishProgress();
	}

}
pan>"วินาที ก่อนหน้านี้", "File name is a reserved word" : "ชื่อแฟ้มเป็นคำสงวน", "File name contains at least one invalid character" : "ชื่อแฟ้มมีหนึ่งตัวอักษรที่ไม่ถูกต้อง", "File name is too long" : "ชื่อแฟ้มยาวเกินไป", "Dot files are not allowed" : "ชื่อไฟล์ห้ามมีจุด", "Empty filename is not allowed" : "ชื่อไฟล์ห้ามว่างเปล่า", "App \"%s\" cannot be installed because appinfo file cannot be read." : "แอพฯ \"%s\" ไม่สามารถติดตั้งได้เพราะไฟล์ appInfo ไม่สามารถอ่านได้", "__language_name__" : "ภาษาไทย - Thai languages", "Apps" : "แอปฯ", "Users" : "ผู้ใช้งาน", "Unknown user" : "ไม่รู้จักผู้ใช้", "%s enter the database username and name." : "%s ป้อนชื่อผู้ใช้ฐานข้อมูล และชื่อ", "%s enter the database username." : "%s ใส่ชื่อผู้ใช้ฐานข้อมูล", "%s enter the database name." : "%s ใส่ชื่อฐานข้อมูล", "%s you may not use dots in the database name" : "%s บางที่คุณไม่ควรมีจุดในชื่อฐานข้อมูล", "Oracle connection could not be established" : "ไม่สามารถสร้างการเชื่อมต่อกับ Oracle ", "Oracle username and/or password not valid" : "Oracle ชื่อผู้ใช้ และ/หรือ รหัสผ่านไม่ถูกต้อง", "PostgreSQL username and/or password not valid" : "PostgreSQL ชื่อผู้ใช้ และ/หรือ รหัสผ่านไม่ถูกต้อง", "Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "ระบบปฏิบัติการ Mac OS X ไม่ได้รับการสนับสนุนและ %s จะไม่ทำงานบนแพลตฟอร์มนี้ ใช้มันบนความเสี่ยงของคุณเอง!", "For the best results, please consider using a GNU/Linux server instead." : "เพื่อให้ได้ผลลัพธ์ที่ดีที่สุดโปรดพิจารณาใช้เซิร์ฟเวอร์ GNU/Linux แทน", "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4 GB and is highly discouraged." : "ดูเหมือนว่า %s ทำงานบน PHP 32 บิต และ open_basedir ได้ถูกกำหนดค่าใน php.ini ซึ่งจะมีปัญหาหากไฟล์มีขนาดกว่า 4 GB กิกะไบต์", "Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "กรุณาลบการตั้งค่า open_basedir ภายใน php.ini ของหรือเปลี่ยนไปใช้ PHP รุ่น 64 บิตแทน", "Set an admin username." : "ตั้งค่าชื่อผู้ดูแลระบบ", "Set an admin password." : "ตั้งค่ารหัสผ่านผู้ดูแลระบบ", "Can't create or write into the data directory %s" : "ไม่สามารถสร้างหรือเขียนลงในข้อมูลไดเรกทอรี %s", "Invalid Federated Cloud ID" : "ไอดีคลาวด์ในเครือไม่ถูกต้อง", "Sharing %s failed, because the backend does not allow shares from type %i" : "การแชร์ %s ล้มเหลวเพราะแบ็กเอนด์ไม่อนุญาตให้แชร์จากไฟล์ประเภท %i", "Sharing %s failed, because the file does not exist" : "การแชร์ %s ล้มเหลวเพราะไม่มีไฟล์นี้อยู่", "You are not allowed to share %s" : "คุณยังไม่ได้รับอนุญาตให้แชร์ %s", "Sharing %s failed, because you can not share with yourself" : "การแขร์ %s ล้มเหลวเพราะคุณไม่สามารถแชร์ให้กับตัวเอง", "You need to provide a password to create a public link, only protected links are allowed" : "คุณจำเป็นต้องระบุรหัสผ่านเพื่อสร้างลิงค์สาธารณะ, ลิงค์ที่มีการป้องกันเท่านั้นที่ได้รับอนุญาต", "Sharing %s failed, because sharing with links is not allowed" : "การแชร์ %s ล้มเหลวเพราะมีการแชร์ลิงค์ไม่ได้รับอนุญาต", "Not allowed to create a federated share with the same user" : "ไม่อนุญาตให้สร้างแชร์สหพันธ์กับผู้ใช้เดียวกัน", "Cannot set expiration date. Shares cannot expire later than %s after they have been shared" : "ไม่สามารถตั้งค่าวันหมดอายุ การแชร์ไม่สามารถหมดอายุน้อยกว่า %s หลังจากที่พวกเขาได้รับการแชร์", "Cannot set expiration date. Expiration date is in the past" : "ไม่สามารถตั้งค่าวันหมดอายุ เพราะวันหมดอายุผ่านไปแล้ว", "Sharing backend %s must implement the interface OCP\\Share_Backend" : "การแชร์แบ็กเอนด์ %s ต้องใช้อินเตอร์เฟซ OCP\\Share_Backend", "Sharing backend %s not found" : "ไม่พบการแชร์แบ็กเอนด์ %s", "Sharing backend for %s not found" : "ไม่พบการแชร์แบ็กเอนด์สำหรับ %s", "Sharing failed, because the user %s is the original sharer" : "การแชร์ล้มเหลวเพราะผู้ใช้ %s เป็นต้นฉบับการแชร์นี้", "Sharing %s failed, because resharing is not allowed" : "การแชร์ %s ล้มเหลวเพราะการแชร์ต่อไม่ได้รับอนุญาต", "Sharing %s failed, because the file could not be found in the file cache" : "การแชร์ %s ล้มเหลวเพราะไม่พบไฟล์ในแคชไฟล์", "Expiration date is in the past" : "วันหมดอายุอยู่ในอดีตที่ผ่านมา", "Could not find category \"%s\"" : "ไม่พบหมวดหมู่ \"%s\"", "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-'\"" : "ชื่อผู้ใช้จะใช้ได้แค่อักษรดังต่อไปนี้: \"a-z\", \"A-Z\", \"0-9\" และ \"_.@-'\"", "A valid username must be provided" : "จะต้องระบุชื่อผู้ใช้ที่ถูกต้อง", "A valid password must be provided" : "รหัสผ่านที่ถูกต้องจะต้องให้", "The username is already being used" : "มีคนใช้ชื่อผู้ใช้นี้ไปแล้ว", "File is currently busy, please try again later" : "ขณะนี้ไฟล์กำลังใช้งานอยู่ โปรดลองอีกครั้งในภายหลัง", "Can't read file" : "ไม่สามารถอ่านไฟล์", "Application is not enabled" : "แอพพลิเคชั่นดังกล่าวยังไม่ได้เปิดใช้งาน", "Authentication error" : "เกิดข้อผิดพลาดในสิทธิ์การเข้าใช้งาน", "Token expired. Please reload page." : "รหัสยืนยันความถูกต้องหมดอายุแล้ว กรุณาโหลดหน้าเว็บใหม่อีกครั้ง", "No database drivers (sqlite, mysql, or postgresql) installed." : "ไม่มีไดรเวอร์ฐานข้อมูล (sqlite, mysql, or postgresql) ที่ถูกติดตั้ง", "Cannot write into \"config\" directory" : "ไม่สามารถเขียนลงในไดเรกทอรี \"การตั้งค่า\"", "Cannot write into \"apps\" directory" : "ไม่สามารถเขียนลงในไดเรกทอรี \"แอพฯ\"", "Setting locale to %s failed" : "ตั้งค่าต้นทาง %s ล้มเหลว", "Please install one of these locales on your system and restart your webserver." : "กรุณาติดตั้งหนึ่งในต้นทางเหล่านี้บนระบบของคุณและเริ่มต้นเว็บเซิร์ฟเวอร์ของคุณ", "Please ask your server administrator to install the module." : "โปรดสอบถามผู้ดูแลระบบเซิร์ฟเวอร์ของคุณเพื่อติดตั้งโมดูล", "PHP module %s not installed." : "โมดูล PHP %s ไม่ได้ถูกติดตั้ง", "PHP setting \"%s\" is not set to \"%s\"." : "การตั้งค่า PHP \"%s\" ไม่ได้ตั้งค่าเป็น \"%s\"", "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload ถูกตั้งเป็น \"%s\" แทนที่จะเป็น \"0\"", "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "หากต้องการแก้ไขปัญหานี้กรุณาแก้ <code>mbstring.func_overload</code> เป็น <code>0</code> ในไฟล์ php.ini ของคุณ", "To fix this issue update your libxml2 version and restart your web server." : "เพื่อแก้ไขปัญหานี้ กรุณาอัพเดทรุ่นของ libxml2 และรีสตาร์ทเว็บเซิร์ฟเวอร์ของคุณ", "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "เห็นได้ชัดว่า PHP มีการตั้งค่าเพื่อดึงบล็อกเอกสารแบบอินไลน์ ซึ่งจะทำให้แอพพลิเคชันไม่สามารถเข้าถึงได้", "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "นี้อาจเกิดจาก cache/accelerator อย่างเช่น Zend OPcache หรือ eAccelerator", "PHP modules have been installed, but they are still listed as missing?" : "โมดูล PHP ได้รับการติดตั้ง แต่พวกเขาไม่ได้ระบุไว้หรือมันอาจหายไป?", "Please ask your server administrator to restart the web server." : "โปรดสอบถามผู้ดูแลระบบเซิร์ฟเวอร์ของคุณเพื่อเริ่มการทำงานของเว็บเซิร์ฟเวอร์", "PostgreSQL >= 9 required" : "จำเป็นต้องใช้ PostgreSQL รุ่น >= 9", "Please upgrade your database version" : "กรุณาอัพเดทฐานข้อมูลของคุณ", "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "กรุณาเปลี่ยนสิทธิ์การเข้าถึงเป็น 0770 เพื่อให้ไดเรกทอรีไม่สามารถแก้ไขโดยผู้ใช้อื่น", "Check the value of \"datadirectory\" in your configuration" : "ตรวจสอบค่าของ \"datadirectory\" ในการกำหนดค่าของคุณ", "Could not obtain lock type %d on \"%s\"." : "ไม่สามารถรับล็อคชนิด %d บน \"%s\"", "Storage unauthorized. %s" : "การจัดเก็บข้อมูลไม่ได้รับอนุญาต %s", "Storage incomplete configuration. %s" : "การตั้งค่าการจัดเก็บข้อมูลไม่สำเร็จ %s", "Storage connection error. %s" : "ข้อผิดพลาดการเชื่อมต่อพื้นที่จัดเก็บข้อมูล %s", "Storage connection timeout. %s" : "หมดเวลาการเชื่อมต่อพื้นที่จัดเก็บข้อมูล %s", "Library %s with a version higher than %s is required - available version %s." : "จำเป็นต้องมีไลบรารีรุ่น %s หรือรุ่นที่สูงกว่า %s - รุ่นที่ใช้ได้คือ %s", "Library %s with a version lower than %s is required - available version %s." : "จำเป็นต้องมีไลบรารีรุ่น %s หรือรุ่นที่ต่ำกว่า %s - รุ่นที่ใช้ได้คือ %s", "Sharing %s failed, because the user %s does not exist" : "การแชร์ %s ล้มเหลวเนื่องจากไม่ได้มีผู้ใช้ %s อยู่", "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "การแชร์ %s ล้มเหลวเนื่องจากผู้ใช้ %s ไม่ได้เป็นสมาชิกของกลุ่มใดๆ %s เป็นสมาชิกของ", "Sharing %s failed, because this item is already shared with %s" : "การแชร์ %s ล้มเหลวเพราะรายการนี้ถูกแชร์กับ %s", "Sharing %s failed, because this item is already shared with user %s" : "%s ที่กำลังแชร์ล้มเหลว เพราะรายการนี้ได้ถูกแชร์กับผู้ใช้ %s", "Sharing %s failed, because the group %s does not exist" : "การแชร์ %s ล้มเหลวเพราะไม่มีกลุ่ม %s อยู่", "Sharing %s failed, because %s is not a member of the group %s" : "การแชร์ %s ล้มเหลวเพราะ %s ไม่ได้เป็นสมาชิกของกลุ่ม %s", "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "การแชร์ %s ล้มเหลวไม่สามารถหา %s, บางทีอาจจะยังไม่สามารถเข้าถึงเซิร์ฟเวอร์ปัจจุบัน", "Share type %s is not valid for %s" : "ประเภท %s ที่แชร์ไม่ถูกต้องสำหรับ %s", "Sharing %s failed, because the permissions exceed permissions granted to %s" : "การแชร์ %s ล้มเหลวเพราะใช้สิทธิ์เกินที่อนุญาตให้ %s", "Sharing %s failed, because the sharing backend for %s could not find its source" : "การแชร์ %s ล้มเหลวเพราะการแชร์แบ็กเอนด์สำหรับ %s ไม่สามารถหาแหล่งที่มา", "%s shared »%s« with you" : "%s ถูกแชร์ »%s« กับคุณ", "%s via %s" : "%s ผ่านทาง %s", "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "แอพฯ \"%s\" ไม่สามารถติดตั้งเพราะไม่ได้ปฏิบัติตามการอ้างอิงต่อไปนี้: %s" },"pluralForm" :"nplurals=1; plural=0;" }