here's the function used in nadmin :)
Tarjei
function mgd_is_article_approved($article){
if(($article->approver && $article->revised<=$article->approved))
return 1;
if(!$article->calstart) return 0;
$de=explode(".",$article->calstart);
$su=mktime(0,0,0,$de[1],$de[0],$de[2]);
$eu=mktime(0,0,0,$de[1],$de[0]+$article->caldays,$de[2]);
$now=time();
if( ($su<$now) && ( ($eu>$now)||!$article->caldays ) &&
($article->revised<=$article->approved) ) { return 1; }
return 0;
}
}
pp wrote:
>>I could not find $article->approve in the documentation. All i see is
>>$article->approved and $article->approver. Note the 'd' and 'r' at the
>>end.
>>
>>
>
>Yeah, midgard manual is not all in my head
>just typed from my mind :)
>
>
>
>
>>If you ment approved or approver, see my answer to FAbel 15 secs ago. =)
>>
>>
>
>It only depends what exactly You want to get.
>What is the problem to change $article>approved to 0 just after editing?
>
>Piotras
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]