Returns maximum height for images

Takes the maximum height for images eithre from search form or from
user preferences, updates user preferences if needed

@return int
179784
public function get_maxheight() {
        $param = optional_param('wikimedia_maxheight', 0, PARAM_INT);
        $pref = get_user_preferences('repository_wikimedia_maxheight', WIKIMEDIA_IMAGE_SIDE_LENGTH);
        if ($param > 0 && $param != $pref) {
            $pref = $param;
            set_user_preference('repository_wikimedia_maxheight', $pref);
        }
        return $pref;
    }
923174
public function getSize() {
		list($this->width, $this->height) = $result = array(imagesx($this->image), imagesy($this->image));
		return $result;
	}
1257980
public static function getMaxFilesize()
    {
        $max = trim(ini_get('upload_max_filesize'));

        if ('' === $max) {
            return PHP_INT_MAX;
        }

        $unit = strtolower(substr($max, -1));
        $max = (int)substr($max, 0, -1);

        if (in_array($unit, array('g', 'm', 'k'), true)) {
            $max *= 1024;
        }

        return $max;
    }
165183
private function maxLength()
	{
		$max = mb_strlen($this->value);
		if (!$ret = $max <= $this->options->max) {
			$this->error(1);
		}

		return $ret;
	}
492888
public function getMetaImageResizeHeight($height = null)
    {
        if ($height) {
            return $height;
        }
        
        if ($height = $this->owner->ImageMetaResizeHeight) {
            return $height;
        }
        
        return $this->owner->getFieldFromParent('DefaultImageResizeHeight');
    }
288183
public static function getImageDimensions($width=false, $height=false) {

		$max_width  = config('center.img.max.width');
		$max_height = config('center.img.max.height');
		$max_area   = config('center.img.max.area');

		//too wide?
		if ($width && $width > $max_width) {
			if ($height) $height *= $max_width / $width;
			$width = $max_width;
		}

		//too tall?
		if ($height && $height > $max_height) {
			if ($width) $width *= $max_height / $height;
			$height = $max_height;
		}

		//not specified?
		if (!$width) $width = config('center.img.default.width');
		if (!$height) $height = config('center.img.default.height');

		//too large?
		$area = $width * $height;
		if ($width * $height > $max_area) {
			$width *= $max_area / $area;
			$height *= $max_area / $area;
		}

		return array($width, $height);
	}
334673
private static function getUploadMaxFileSizeInBytes() {
    $val = trim(ini_get('upload_max_filesize'));
    $unit = strtolower(substr($val, -1));
    switch ($unit) {
      case 'g':
        $val *= 1024;
        // Fall through
      case 'm':
        $val *= 1024;
        // Fall through
      case 'k':
        $val *= 1024;
        break;
    }
    return intval($val);
  }
54579
public static function get_thumbnail_size() {
		$sizes = self::get_image_sizes();

		if ( isset( $sizes['thumbnail'] ) ) {
			return $sizes['thumbnail'];
		}

		$img_size = reset( $sizes );

		return $img_size;
	}
1205094
public function getHeight() : ?float 
    {
        if ( ! $this->hasHeight()) {
            $this->setHeight($this->getDefaultHeight());
        }
        return $this->height;
    }
116402
public function getHeight()
    {
      if ($this->height != null) {
        return $this->height;
      }

      list(, $height) = getimagesize($this->_files['tmp_name']);

      return $height;
    }
329832
public function getMaxChunks()
	{
		return ceil(($this->name !== null ? filesize($this->name) : 0) / $this->size);
	}
659452
public function getLastPage()
    {
        return (int) \max(self::MIN_PAGE, \ceil($this->getTotal() / $this->getLimit()));
    }
963507
private function getMaxWidth()
    {
        $max = 0;

        foreach ($this->getOptions() as $option) {
            $nameLength = \strlen($option->getName()) + 2;
            if ($option->getShortcut()) {
                $nameLength += \strlen($option->getShortcut()) + 3;
            }

            $max = \max($max, $nameLength);
        }

        foreach ($this->getArguments() as $argument) {
            $max = \max($max, \strlen($argument->getName()));
        }

        return ++$max;
    }
319686
public function getImages() {
    	// Sort array
    	$images = array();
    	if (isset($this->_headerFooterImages[self::IMAGE_HEADER_LEFT])) 	$images[self::IMAGE_HEADER_LEFT] = 		$this->_headerFooterImages[self::IMAGE_HEADER_LEFT];
    	if (isset($this->_headerFooterImages[self::IMAGE_HEADER_CENTER])) 	$images[self::IMAGE_HEADER_CENTER] = 	$this->_headerFooterImages[self::IMAGE_HEADER_CENTER];
    	if (isset($this->_headerFooterImages[self::IMAGE_HEADER_RIGHT])) 	$images[self::IMAGE_HEADER_RIGHT] = 	$this->_headerFooterImages[self::IMAGE_HEADER_RIGHT];
    	if (isset($this->_headerFooterImages[self::IMAGE_FOOTER_LEFT])) 	$images[self::IMAGE_FOOTER_LEFT] = 		$this->_headerFooterImages[self::IMAGE_FOOTER_LEFT];
    	if (isset($this->_headerFooterImages[self::IMAGE_FOOTER_CENTER])) 	$images[self::IMAGE_FOOTER_CENTER] = 	$this->_headerFooterImages[self::IMAGE_FOOTER_CENTER];
    	if (isset($this->_headerFooterImages[self::IMAGE_FOOTER_RIGHT])) 	$images[self::IMAGE_FOOTER_RIGHT] = 	$this->_headerFooterImages[self::IMAGE_FOOTER_RIGHT];
    	$this->_headerFooterImages = $images;

    	return $this->_headerFooterImages;
    }
1015961
protected function getPostMaxSize()
    {
        $postMaxSize = ini_get('post_max_size');

        switch (substr($postMaxSize, -1)) {
            case 'M':
            case 'm':
                return (int) $postMaxSize * 1048576;
            case 'K':
            case 'k':
                return (int) $postMaxSize * 1024;
            case 'G':
            case 'g':
                return (int) $postMaxSize * 1073741824;
        }

        return (int) $postMaxSize;
    }
794039
public function getMaxUploadFileSize() {

        $upload_max_filesize = (integer) ini_get('upload_max_filesize');
        $post_max_size = (integer) ini_get('post_max_size');
        $size_max = min($upload_max_filesize, $post_max_size);

        return $size_max;
    }
1184541
public function getHeight() : ?int 
    {
        if ( ! $this->hasHeight()) {
            $this->setHeight($this->getDefaultHeight());
        }
        return $this->height;
    }