You are here

function node_gallery_upload_limits in Node Gallery 6.2

Same name and namespace in other branches
  1. 6 node_gallery.pages.inc \node_gallery_upload_limits()
1 call to node_gallery_upload_limits()
node_gallery_upload_form in ./node_gallery.pages.inc

File

./node_gallery.pages.inc, line 144
Node gallery pages.

Code

function node_gallery_upload_limits($config) {
  global $user;
  $limits = node_gallery_upload_file_limits($user, $config);

  // This check is not true for user 1
  if ($user->uid != '1') {
    $items[] = t('Your total storage space is %total and you have used %used', array(
      '%total' => format_size($limits['user_size']),
      '%used' => format_size(file_space_used($user->uid)),
    ));
  }
  if ($limits['resolution']) {
    $items[] = t('Images larger than %resolution will be resized.', array(
      '%resolution' => $limits['resolution'],
    ));
  }
  $items[] = t('The maximum upload size per submit is %filesize.', array(
    '%filesize' => format_size($limits['file_size']),
  ));
  $items[] = t('Only images with the following extensions may be uploaded: %extensions.', array(
    '%extensions' => $limits['extensions'],
  ));
  return theme('item_list', $items, t('notes'), 'ul', array(
    'class' => 'upload-notes',
  ));
}