<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?action=history&amp;feed=atom&amp;title=Eprint_warnings.pl</id>
	<title>Eprint warnings.pl - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?action=history&amp;feed=atom&amp;title=Eprint_warnings.pl"/>
	<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Eprint_warnings.pl&amp;action=history"/>
	<updated>2026-05-10T19:32:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Eprint_warnings.pl&amp;diff=14275&amp;oldid=prev</id>
		<title>Drn@ecs.soton.ac.uk: Added page about config file</title>
		<link rel="alternate" type="text/html" href="https://wiki.ext-9.eprints-hosting.org/w/index.php?title=Eprint_warnings.pl&amp;diff=14275&amp;oldid=prev"/>
		<updated>2022-01-23T11:46:52Z</updated>

		<summary type="html">&lt;p&gt;Added page about config file&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{dirs}}&lt;br /&gt;
{{cfgd}}&lt;br /&gt;
&lt;br /&gt;
This file contains configuration for raising warnings for EPrint data objects within the &amp;#039;&amp;#039;&amp;#039;eprint_warnings&amp;#039;&amp;#039;&amp;#039; functiom.  Unlike [[eprint_validate.pl]] warnings do not prevent a user from depositing an eprint item, they use advise them that they may have forgotten to add something or some field is not that format that would normally be expected.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
In this example warnings would be raised if the eprint item:&lt;br /&gt;
# Has no documents uploaded.&lt;br /&gt;
# Has non-public documents uploaded but no contact email address set.&lt;br /&gt;
 $c-&amp;gt;{eprint_warnings} = sub&lt;br /&gt;
 {&lt;br /&gt;
   my( $eprint, $repository ) = @_;&lt;br /&gt;
 &lt;br /&gt;
   my @problems = ();&lt;br /&gt;
 &lt;br /&gt;
   my @docs = $eprint-&amp;gt;get_all_documents;&lt;br /&gt;
   if( @docs == 0 )&lt;br /&gt;
   {&lt;br /&gt;
     push @problems, $repository-&amp;gt;html_phrase( &amp;quot;warnings:no_documents&amp;quot; );&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   my $all_public = 1;&lt;br /&gt;
   foreach my $doc ( @docs )&lt;br /&gt;
   {&lt;br /&gt;
     if( $doc-&amp;gt;value( &amp;quot;security&amp;quot; ) ne &amp;quot;public&amp;quot; )&lt;br /&gt;
     {&lt;br /&gt;
         $all_public = 0;&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   if( !$all_public &amp;amp;&amp;amp; !$eprint-&amp;gt;is_set( &amp;quot;contact_email&amp;quot; ) )&lt;br /&gt;
   {&lt;br /&gt;
     push @problems, $repository-&amp;gt;html_phrase( &amp;quot;warnings:no_contact_email&amp;quot; );&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   return( @problems );&lt;br /&gt;
 };&lt;/div&gt;</summary>
		<author><name>Drn@ecs.soton.ac.uk</name></author>
	</entry>
</feed>