ajout de la partie slam dans le dossier web
This commit is contained in:
		
							
								
								
									
										26
									
								
								ap23/web/doku/inc/Menu/Item/Revert.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								ap23/web/doku/inc/Menu/Item/Revert.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| <?php | ||||
|  | ||||
| namespace dokuwiki\Menu\Item; | ||||
|  | ||||
| /** | ||||
|  * Class Revert | ||||
|  * | ||||
|  * Quick revert to the currently shown page revision | ||||
|  */ | ||||
| class Revert extends AbstractItem { | ||||
|  | ||||
|     /** @inheritdoc */ | ||||
|     public function __construct() { | ||||
|         global $REV; | ||||
|         global $INFO; | ||||
|         parent::__construct(); | ||||
|  | ||||
|         if(!$REV || !$INFO['writable']) { | ||||
|             throw new \RuntimeException('revert not available'); | ||||
|         } | ||||
|         $this->params['rev'] = $REV; | ||||
|         $this->params['sectok'] = getSecurityToken(); | ||||
|         $this->svg = DOKU_INC . 'lib/images/menu/06-revert_replay.svg'; | ||||
|     } | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user