Move Object\Image static methods to Util\Images
- Optimize imports in modified files
This commit is contained in:
		
					parent
					
						
							
								b543ee8ac7
							
						
					
				
			
			
				commit
				
					
						03bf1dcbd3
					
				
			
		
					 15 changed files with 322 additions and 217 deletions
				
			
		| 
						 | 
				
			
			@ -10,7 +10,7 @@ use Friendica\Core\L10n;
 | 
			
		|||
use Friendica\Core\Renderer;
 | 
			
		||||
use Friendica\Core\System;
 | 
			
		||||
use Friendica\Database\DBA;
 | 
			
		||||
use Friendica\Object\Image;
 | 
			
		||||
use Friendica\Util\Images;
 | 
			
		||||
use Friendica\Util\Strings;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			@ -79,7 +79,7 @@ function fbrowser_content(App $a)
 | 
			
		|||
			function _map_files1($rr)
 | 
			
		||||
			{
 | 
			
		||||
				$a = \get_app();
 | 
			
		||||
				$types = Image::supportedTypes();
 | 
			
		||||
				$types = Images::supportedTypes();
 | 
			
		||||
				$ext = $types[$rr['type']];
 | 
			
		||||
				$filename_e = $rr['filename'];
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,6 +29,7 @@ use Friendica\Protocol\Activity;
 | 
			
		|||
use Friendica\Util\ACLFormatter;
 | 
			
		||||
use Friendica\Util\Crypto;
 | 
			
		||||
use Friendica\Util\DateTimeFormat;
 | 
			
		||||
use Friendica\Util\Images;
 | 
			
		||||
use Friendica\Util\Map;
 | 
			
		||||
use Friendica\Util\Security;
 | 
			
		||||
use Friendica\Util\Strings;
 | 
			
		||||
| 
						 | 
				
			
			@ -142,7 +143,7 @@ function photos_post(App $a)
 | 
			
		|||
	Logger::log('mod_photos: REQUEST ' . print_r($_REQUEST, true), Logger::DATA);
 | 
			
		||||
	Logger::log('mod_photos: FILES '   . print_r($_FILES, true), Logger::DATA);
 | 
			
		||||
 | 
			
		||||
	$phototypes = Image::supportedTypes();
 | 
			
		||||
	$phototypes = Images::supportedTypes();
 | 
			
		||||
 | 
			
		||||
	$can_post  = false;
 | 
			
		||||
	$visitor   = 0;
 | 
			
		||||
| 
						 | 
				
			
			@ -694,7 +695,7 @@ function photos_post(App $a)
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	if ($type == "") {
 | 
			
		||||
		$type = Image::guessType($filename);
 | 
			
		||||
		$type = Images::guessType($filename);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	Logger::log('photos: upload: received file: ' . $filename . ' as ' . $src . ' ('. $type . ') ' . $filesize . ' bytes', Logger::DEBUG);
 | 
			
		||||
| 
						 | 
				
			
			@ -846,7 +847,7 @@ function photos_content(App $a)
 | 
			
		|||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	$phototypes = Image::supportedTypes();
 | 
			
		||||
	$phototypes = Images::supportedTypes();
 | 
			
		||||
 | 
			
		||||
	$_SESSION['photo_return'] = $a->cmd;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,16 +9,16 @@
 | 
			
		|||
 */
 | 
			
		||||
 | 
			
		||||
use Friendica\App;
 | 
			
		||||
use Friendica\Core\Config;
 | 
			
		||||
use Friendica\Core\L10n;
 | 
			
		||||
use Friendica\Core\Logger;
 | 
			
		||||
use Friendica\Core\System;
 | 
			
		||||
use Friendica\Core\Session;
 | 
			
		||||
use Friendica\Core\Config;
 | 
			
		||||
use Friendica\Core\System;
 | 
			
		||||
use Friendica\Database\DBA;
 | 
			
		||||
use Friendica\Model\Contact;
 | 
			
		||||
use Friendica\Model\Photo;
 | 
			
		||||
use Friendica\Model\User;
 | 
			
		||||
use Friendica\Object\Image;
 | 
			
		||||
use Friendica\Util\Images;
 | 
			
		||||
use Friendica\Util\Strings;
 | 
			
		||||
 | 
			
		||||
function wall_upload_post(App $a, $desktopmode = true)
 | 
			
		||||
| 
						 | 
				
			
			@ -166,7 +166,7 @@ function wall_upload_post(App $a, $desktopmode = true)
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	if ($filetype == "") {
 | 
			
		||||
		$filetype = Image::guessType($filename);
 | 
			
		||||
		$filetype = Images::guessType($filename);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// If there is a temp name, then do a manual check
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue