]> git.sur5r.net Git - contagged/blobdiff - tags.php
Merge pull request #15 from cweiske/master
[contagged] / tags.php
index a1af7a98031a8db312d63b3cbb246ed9b8cdd2e4..ddde120596086c446714a7a6d46968748c289b45 100644 (file)
--- a/tags.php
+++ b/tags.php
@@ -1,7 +1,11 @@
-<?
-  require_once('init.php');
+<?php
+  require_once('inc/init.php');
   ldap_login();
 
+  if ($conf['userlogreq'] && !isset($_SESSION['ldapab']['username'])){
+    header('Location: login.php');
+    exit();
+  }
   //prepare templates
   tpl_std();
   $smarty->assign('tagcloud',tag_cloud());
     global $conf;
     global $LDAP_CON;
     global $FIELDS;
-    if(!$conf['extended']) return;
+    if(!$FIELDS['_marker']) return;
 
     $result = ldap_queryabooks('(objectClass=inetOrgPerson)',$FIELDS['_marker']);
-
     $max = 0;
     $min = 999999999;
     $tags = array();
@@ -32,7 +35,7 @@
       }
     }
     ksort($tags);
-    tag_cloud_weight(&$tags,$min,$max,6);
+    tag_cloud_weight($tags,$min,$max,6);
 
     $out = '';
     foreach($tags as $tag => $cnt){