merge the two files now that they are smaller.
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 22 Jul 2006 12:58:50 +0000 (12:58 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 22 Jul 2006 12:58:50 +0000 (12:58 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@558 839d8a87-29fc-0310-9880-83ba4fa771e5

plugins/pmwiki.config.php
plugins/pmwiki.platalAuth.php [deleted file]

index 3c97eed..da06d73 100644 (file)
@@ -29,7 +29,6 @@ XLSDV('en', array('EnterAttributes' =>
     Le <strong>:</strong> à la fin de chaque mot clef est important. Tu peux également combiner plusieurs mots clefs avec <strong>and:</strong>
     ou des espaces (qui remplace le <em>ou</em> logique)<br/>"));
 
-include_once($globals->spoolroot."/plugins/pmwiki.platalAuth.php");
 @include_once("$FarmD/cookbook/e-protect.php");
 
 $DefaultPasswords['read']   = 'logged:';
@@ -98,4 +97,50 @@ function doBicol($column=false)
 }
 
 // }}}
+// {{{ Auth
+
+$AuthFunction = 'AuthPlatal';
+
+$HandleAuth['diff']        = 'edit';
+$HandleAuth['source']      = 'edit';
+
+// impossible to see the diff without the source because of the smarty tags
+$DiffShow['source'] = 'y';
+$DiffSourceFmt = '';
+
+// for read pages: will come only once so we have to be careful
+// and translate any auth from the wiki to smarty auth
+function AuthPlatal($pagename, $level, $authprompt)
+{
+    global $page;
+
+    $page_read = ReadPage($pagename);
+
+    $levels = array('read', 'attr', 'edit', 'upload');
+
+    if (S::identified() && S::has_perms())
+    {
+        $page_read['=passwd']   = $passwds;
+        $page_read['=pwsource'] = $pwsources;
+
+        return $page_read;
+    }
+
+    // if we arrive here, the user doesn't have enough permission to access page
+
+    // maybe it is because he is not identified
+    if ($authprompt && !S::identified()) {
+        require_once dirname(__FILE__).'/../classes/Platal.php';
+        require_once dirname(__FILE__).'/../classes/PLModule.php';
+        $platal = new Platal();
+        $platal->force_login($page);
+    }
+
+    if (S::has_perms()) {
+        $page->trig('Erreur : page Wiki inutilisable sur plat/al');
+    }
+    $page->run();
+}
+
+// }}}
 ?>
diff --git a/plugins/pmwiki.platalAuth.php b/plugins/pmwiki.platalAuth.php
deleted file mode 100644 (file)
index 2c05253..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-
-$AuthFunction = 'AuthPlatal';
-
-$Conditions['logged']      = S::logged();
-$Conditions['identified']  = S::identified();
-$Conditions['has_perms']   = S::has_perms();
-$Conditions['public']      = 'true';
-
-$HandleAuth['diff']        = 'edit';
-$HandleAuth['source']      = 'edit';
-
-// impossible to see the diff without the source because of the smarty tags
-$DiffShow['source'] = 'y';
-$DiffSourceFmt = '';
-
-// for read pages: will come only once so we have to be careful
-// and translate any auth from the wiki to smarty auth
-function AuthPlatal($pagename, $level, $authprompt)
-{
-    global $Conditions, $page;
-
-    $page_read = ReadPage($pagename);
-
-    $levels = array('read', 'attr', 'edit', 'upload');
-
-    if (S::identified() && S::has_perms())
-    {
-        $page_read['=passwd']   = $passwds;
-        $page_read['=pwsource'] = $pwsources;
-
-        return $page_read;
-    }
-
-    // if we arrive here, the user doesn't have enough permission to access page
-
-    // maybe it is because he is not identified
-    if ($authprompt && !S::identified()) {
-        require_once dirname(__FILE__).'/../classes/Platal.php';
-        require_once dirname(__FILE__).'/../classes/PLModule.php';
-        $platal = new Platal();
-        $platal->force_login($page);
-    }
-
-    if (S::has_perms()) {
-        $page->trig('Erreur : page Wiki inutilisable sur plat/al');
-    }
-    $page->run();
-}
-
-?>