+ $default_upload_box = replace_macros(get_markup_template('photos_default_uploader_box.tpl'), array());
+ $default_upload_submit = replace_macros(get_markup_template('photos_default_uploader_submit.tpl'), array(
+ '$submit' => t('Submit'),
+ ));
+
+ $usage_message = '';
+ $limit = service_class_fetch($a->data['user']['uid'],'photo_upload_limit');
+ if($limit !== false) {
+
+ $r = q("select sum(datasize) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ",
+ intval($a->data['user']['uid'])
+ );
+ $usage_message = sprintf( t("You have used %1$.2f Mbytes of %2$.2f Mbytes photo storage."), $r[0]['total'] / 1024000, $limit / 1024000 );
+ }
+
+
+ // Private/public post links for the non-JS ACL form
+ $private_post = 1;
+ if($_REQUEST['public'])
+ $private_post = 0;
+
+ $query_str = $a->query_string;
+ if(strpos($query_str, 'public=1') !== false)
+ $query_str = str_replace(array('?public=1', '&public=1'), array('', ''), $query_str);
+
+ // I think $a->query_string may never have ? in it, but I could be wrong
+ // It looks like it's from the index.php?q=[etc] rewrite that the web
+ // server does, which converts any ? to &, e.g. suggest&ignore=61 for suggest?ignore=61
+ if(strpos($query_str, '?') === false)
+ $public_post_link = '?public=1';
+ else
+ $public_post_link = '&public=1';