<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Patrick,<br>
<br>
&gt;&gt;Try turning $EnableIMSCaching off and see if the
$isEditAuthorized appears correctly.<br>
<br>
Yes that works.<br>
<br>
I also tried the following (with $EnableIMSCaching set to true or
false):<br>
<br>
if (isset($_GET['action'])) $useraction = $_GET['action'];<br>
elseif (isset($_POST['action'])) $useraction = $_POST['action'];<br>
else $useraction = 'none';<br>
echo 'useraction='. $useraction;<br>
if ($useraction=='logout') {<br>
&nbsp;$EnableIMSCaching=0;<br>
} <br>
<br>
I use $useraction because $action seems to be set to 'browse' a lot,
and I was trying to get behind it.<br>
<br>
But, this code never sees the "logout" value (or at least it never gets
echoed, even with $EnableIMSCaching set to false), presumably because
of the redirect generated by the logout action. Not sure it would work
anyway without clearing the browser cache first. But is there some way
of determining that the redirect came from a logout, and forcing a
refresh?<br>
<br>
I'm using Firefox, but the solution would have to be cross browser
compatible.<br>
<br>
Also, for future reference, a side effect of something
(include_once('local/config.php')??) is that the author name is being
lost between edit states, so the user has to re-enter it all the time
-- not true before (I have $EnablePostAuthorRequired = 1;) [I'm just
working in a test environment of course]. I'm presuming that if nothing
else I could jam all this into a function and call it from the
template, so as to allow config.php to be called after farmconfig.php.
But that's for later...<br>
<br>
Is my quest here legitimate?<br>
<br>
- Henrik<br>
<br>
<pre class="moz-signature" cols="72">Henrik Bechmann
<a class="moz-txt-link-abbreviated" href="http://www.osscommons.ca">www.osscommons.ca</a>
<a class="moz-txt-link-abbreviated" href="http://www.bechmannsoftware.com">www.bechmannsoftware.com</a>
Webmaster, <a class="moz-txt-link-abbreviated" href="http://www.dufferinpark.ca">www.dufferinpark.ca</a></pre>
<br>
<br>
Patrick R. Michaud wrote:
<blockquote cite="mid20060803175228.GC14055@host.pmichaud.com"
 type="cite">
  <pre wrap="">On Thu, Aug 03, 2006 at 01:00:45PM -0400, Henrik Bechmann wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">   I have the sequencing figured out.

   Here's my code in farmconfig:

   include_once('local/config.php');
   $pagename = ResolvePageName($pagename);
   $isEditAuthorized = (boolean)RetrieveAuthPage($pagename, 'edit', false,
   READPAGE_CURRENT);
   echo ' value='.$isEditAuthorized;

   I think there may be two problems.

   1. I'm not using (and don't want to use) authuser.php. My author group is
   quite content with the simple base password protection.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Excellent -- I think running without authuser.php is better in general.  So,
that's one less thing to worry about.

  </pre>
  <blockquote type="cite">
    <pre wrap="">   2. $isEditAuthorized still returns true *after* logout (&amp;action=logout)
   per the above echo statement. [...] I'm just finding that clearing the
   browser's cache fixes that, but I don't understand why, and I can't ask my
   users to clear their browser cache whenever they logout. Is the echo of
   $isEditAuthorized returning true because the echo is part of a cache, when
   in fact $isEditAuthorized is false on the server?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
I'm pretty sure you're seeing the browser's cached version of the page,
before the logout occurred.  On the server $isEditAuthorized is certainly 
false.

  </pre>
  <blockquote type="cite">
    <pre wrap="">   I have $EnableIMSCaching=1; in my farmconfig.php so that page location is
   preserved when the user returns to a page.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Aha, this is very likely the issue.  ?action=logout is issuing the redirect,
and the browser thinks it already has the page in its cache and displays
that one (i.e., the one before the logout).  Try turning $EnableIMSCaching 
off and see if the $isEditAuthorized appears correctly.  If that works, 
then maybe we can find a way to get ?action=logout to work with IMS caching.

Also, what browser are you using?  Both IE and Mozilla/Firefox have their
own little caching quirks.

Pm


  </pre>
</blockquote>
</body>
</html>