| 
									
										
										
										
											2013-08-18 12:54:57 +03:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							| 
									
										
										
										
											2013-08-28 12:02:27 +02:00
										 |  |  |  * ownCloud - Documents App | 
					
						
							| 
									
										
										
										
											2013-08-18 12:54:57 +03:00
										 |  |  |  * | 
					
						
							|  |  |  |  * @author Victor Dubiniuk | 
					
						
							|  |  |  |  * @copyright 2013 Victor Dubiniuk victor.dubiniuk@gmail.com | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This file is licensed under the Affero General Public License version 3 or | 
					
						
							|  |  |  |  * later. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-08-28 12:02:27 +02:00
										 |  |  | namespace OCA\Documents; | 
					
						
							| 
									
										
										
										
											2013-08-18 12:54:57 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | \OCP\JSON::callCheck(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $unstable = isset($_POST['unstable']) ? $_POST['unstable'] : null; | 
					
						
							|  |  |  | if (!is_null($unstable)){ | 
					
						
							|  |  |  | 	\OCP\JSON::checkAdminUser(); | 
					
						
							| 
									
										
										
										
											2013-08-28 12:02:27 +02:00
										 |  |  | 	\OCP\Config::setAppValue('documents', 'unstable', $unstable); | 
					
						
							| 
									
										
										
										
											2013-08-18 12:54:57 +03:00
										 |  |  | 	\OCP\JSON::success(); | 
					
						
							|  |  |  | 	exit(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if (isset($_GET['unstable'])){ | 
					
						
							|  |  |  | 	\OCP\JSON::success(array( | 
					
						
							| 
									
										
										
										
											2013-08-28 12:02:27 +02:00
										 |  |  | 			'value' => \OCP\Config::getAppValue('documents', 'unstable', 'false') | 
					
						
							| 
									
										
										
										
											2013-08-18 12:54:57 +03:00
										 |  |  | 	)); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | exit(); |