tag_explode -> Tag::explode
This commit is contained in:
		
							parent
							
								
									199a0d709c
								
							
						
					
					
						commit
						26e1383b0a
					
				@ -192,7 +192,7 @@ class DanbooruApi implements Extension
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				// Get tags out of url
 | 
									// Get tags out of url
 | 
				
			||||||
				$posttags = tag_explode(isset($_REQUEST['tags']) ? $_REQUEST['tags'] : $_REQUEST['post']['tags']);
 | 
									$posttags = Tag::explode(isset($_REQUEST['tags']) ? $_REQUEST['tags'] : $_REQUEST['post']['tags']);
 | 
				
			||||||
				$hash = md5_file($file);
 | 
									$hash = md5_file($file);
 | 
				
			||||||
				// Was an md5 supplied? Does it match the file hash?
 | 
									// Was an md5 supplied? Does it match the file hash?
 | 
				
			||||||
				if(isset($_REQUEST['md5']))
 | 
									if(isset($_REQUEST['md5']))
 | 
				
			||||||
@ -282,7 +282,7 @@ class DanbooruApi implements Extension
 | 
				
			|||||||
			{
 | 
								{
 | 
				
			||||||
				$limit = isset($_GET['limit']) ? int_escape($_GET['limit']) : 100;
 | 
									$limit = isset($_GET['limit']) ? int_escape($_GET['limit']) : 100;
 | 
				
			||||||
				$start = isset($_GET['offset']) ? int_escape($_GET['offset']) : 0;
 | 
									$start = isset($_GET['offset']) ? int_escape($_GET['offset']) : 0;
 | 
				
			||||||
				$tags = isset($_GET['tags']) ? tag_explode($_GET['tags']) : array();
 | 
									$tags = isset($_GET['tags']) ? Tag::explode($_GET['tags']) : array();
 | 
				
			||||||
				$results = Image::find_images($config,$database,$start,$limit,$tags);
 | 
									$results = Image::find_images($config,$database,$start,$limit,$tags);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -340,7 +340,7 @@ class DanbooruApi implements Extension
 | 
				
			|||||||
			elseif(isset($_GET['tags']))
 | 
								elseif(isset($_GET['tags']))
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				$start = isset($_GET['after_id']) ? int_escape($_GET['offset']) : 0;
 | 
									$start = isset($_GET['after_id']) ? int_escape($_GET['offset']) : 0;
 | 
				
			||||||
				$tags = tag_explode($_GET['tags']);
 | 
									$tags = Tag::explode($_GET['tags']);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			*/
 | 
								*/
 | 
				
			||||||
 | 
				
			|||||||
@ -51,7 +51,7 @@ class FlashFileHandler implements Extension {
 | 
				
			|||||||
		$image->hash      = $metadata['hash'];
 | 
							$image->hash      = $metadata['hash'];
 | 
				
			||||||
		$image->filename  = $metadata['filename'];
 | 
							$image->filename  = $metadata['filename'];
 | 
				
			||||||
		$image->ext       = $metadata['extension'];
 | 
							$image->ext       = $metadata['extension'];
 | 
				
			||||||
		$image->tag_array = tag_explode($metadata['tags']);
 | 
							$image->tag_array = Tag::explode($metadata['tags']);
 | 
				
			||||||
		$image->source    = $metadata['source'];
 | 
							$image->source    = $metadata['source'];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// redundant, since getimagesize() works on SWF o_O
 | 
							// redundant, since getimagesize() works on SWF o_O
 | 
				
			||||||
 | 
				
			|||||||
@ -69,7 +69,7 @@ class IcoFileHandler implements Extension {
 | 
				
			|||||||
		$image->hash      = $metadata['hash'];
 | 
							$image->hash      = $metadata['hash'];
 | 
				
			||||||
		$image->filename  = $metadata['filename'];
 | 
							$image->filename  = $metadata['filename'];
 | 
				
			||||||
		$image->ext       = $metadata['extension'];
 | 
							$image->ext       = $metadata['extension'];
 | 
				
			||||||
		$image->tag_array = tag_explode($metadata['tags']);
 | 
							$image->tag_array = Tag::explode($metadata['tags']);
 | 
				
			||||||
		$image->source    = $metadata['source'];
 | 
							$image->source    = $metadata['source'];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		return $image;
 | 
							return $image;
 | 
				
			||||||
 | 
				
			|||||||
@ -53,7 +53,7 @@ class MP3FileHandler implements Extension {
 | 
				
			|||||||
		$image->hash      = $metadata['hash'];
 | 
							$image->hash      = $metadata['hash'];
 | 
				
			||||||
		$image->filename  = $metadata['filename'];
 | 
							$image->filename  = $metadata['filename'];
 | 
				
			||||||
		$image->ext       = $metadata['extension'];
 | 
							$image->ext       = $metadata['extension'];
 | 
				
			||||||
		$image->tag_array = tag_explode($metadata['tags']);
 | 
							$image->tag_array = Tag::explode($metadata['tags']);
 | 
				
			||||||
		$image->source    = $metadata['source'];
 | 
							$image->source    = $metadata['source'];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		return $image;
 | 
							return $image;
 | 
				
			||||||
 | 
				
			|||||||
@ -79,7 +79,7 @@ class SVGFileHandler implements Extension {
 | 
				
			|||||||
		$image->hash      = $metadata['hash'];
 | 
							$image->hash      = $metadata['hash'];
 | 
				
			||||||
		$image->filename  = $metadata['filename'];
 | 
							$image->filename  = $metadata['filename'];
 | 
				
			||||||
		$image->ext       = $metadata['extension'];
 | 
							$image->ext       = $metadata['extension'];
 | 
				
			||||||
		$image->tag_array = tag_explode($metadata['tags']);
 | 
							$image->tag_array = Tag::explode($metadata['tags']);
 | 
				
			||||||
		$image->source    = $metadata['source'];
 | 
							$image->source    = $metadata['source'];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		return $image;
 | 
							return $image;
 | 
				
			||||||
 | 
				
			|||||||
@ -54,7 +54,7 @@ class PixelFileHandler implements Extension {
 | 
				
			|||||||
		$image->hash      = $metadata['hash'];
 | 
							$image->hash      = $metadata['hash'];
 | 
				
			||||||
		$image->filename  = $metadata['filename'];
 | 
							$image->filename  = $metadata['filename'];
 | 
				
			||||||
		$image->ext       = $metadata['extension'];
 | 
							$image->ext       = $metadata['extension'];
 | 
				
			||||||
		$image->tag_array = tag_explode($metadata['tags']);
 | 
							$image->tag_array = Tag::explode($metadata['tags']);
 | 
				
			||||||
		$image->source    = $metadata['source'];
 | 
							$image->source    = $metadata['source'];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		return $image;
 | 
							return $image;
 | 
				
			||||||
 | 
				
			|||||||
@ -55,7 +55,7 @@ class Upload implements Extension {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		if(($event instanceof PageRequestEvent) && $event->page_matches("upload")) {
 | 
							if(($event instanceof PageRequestEvent) && $event->page_matches("upload")) {
 | 
				
			||||||
			if(count($_FILES) + count($_POST) > 0) {
 | 
								if(count($_FILES) + count($_POST) > 0) {
 | 
				
			||||||
				$tags = tag_explode($_POST['tags']);
 | 
									$tags = Tag::explode($_POST['tags']);
 | 
				
			||||||
				$source = isset($_POST['source']) ? $_POST['source'] : null;
 | 
									$source = isset($_POST['source']) ? $_POST['source'] : null;
 | 
				
			||||||
				global $user;
 | 
									global $user;
 | 
				
			||||||
				if($this->can_upload($user)) {
 | 
									if($this->can_upload($user)) {
 | 
				
			||||||
@ -81,7 +81,7 @@ class Upload implements Extension {
 | 
				
			|||||||
					$url = $_GET['url'];
 | 
										$url = $_GET['url'];
 | 
				
			||||||
					$tags = array('tagme');
 | 
										$tags = array('tagme');
 | 
				
			||||||
					if(!empty($_GET['tags']) && $_GET['tags'] != "null") {
 | 
										if(!empty($_GET['tags']) && $_GET['tags'] != "null") {
 | 
				
			||||||
						$tags = tag_explode($_GET['tags']);
 | 
											$tags = Tag::explode($_GET['tags']);
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					$ok = $this->try_transload($url, $tags, $url);
 | 
										$ok = $this->try_transload($url, $tags, $url);
 | 
				
			||||||
					$this->theme->display_upload_status($event->page, $ok);
 | 
										$this->theme->display_upload_status($event->page, $ok);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user