Code

Fixed strict && static problems with xlsexport...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 31 Oct 2006 07:44:47 +0000 (07:44 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 31 Oct 2006 07:44:47 +0000 (07:44 +0000)
Added acls

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4970 594d385d-05f5-0310-b6e9-bd551577e9d8

html/getxls.php
include/php_writeexcel/class.writeexcel_workbook.inc.php

index ef1ca5b6ce208e4a9bf0504f7147766010a69ce3..1b88b8ce0c1e77ca70a570e80203dcbdc18a7954 100644 (file)
@@ -36,7 +36,7 @@ function dump_ldap ($mode= 0)
     $dn=$d.$n;
     $date=date('dS \of F Y ');
     $fname = tempnam("/tmp", "demo.xls");
-    $workbook=& new writeexcel_workbook($fname);
+    $workbook= new writeexcel_workbook($fname);
 
     $title_title=& $workbook->addformat(array(
           bold    => 1,
@@ -238,12 +238,12 @@ function dump_ldap ($mode= 0)
     $name_section=_("Full");
     $date=date('dS \of F Y ');
     $fname = tempnam("/tmp", "demo.xls");
-    $workbook =& new writeexcel_workbook($fname);
-    $worksheet =& $workbook->addworksheet(_("Users"));
-    $worksheet2 =& $workbook->addworksheet(_("Groups"));
-    $worksheet3 =& $workbook->addworksheet(_("Servers"));
-    $worksheet4 =$workbook->addworksheet(_("Computers"));
-    $worksheet5 =& $workbook->addworksheet(_("Adressbook"));
+    $workbook =  new writeexcel_workbook($fname);
+    $worksheet = $workbook->addworksheet(_("Users"));
+    $worksheet2 = $workbook->addworksheet(_("Groups"));
+    $worksheet3 = $workbook->addworksheet(_("Servers"));
+    $worksheet4 =$workbook->addworksheet(_("Computers"));
+    $worksheet5 = $workbook->addworksheet(_("Adressbook"));
 
     $worksheet->set_column('A:B', 51);
     $worksheet2->set_column('A:B', 51);
@@ -413,7 +413,12 @@ $config = $_SESSION['config'];
 
 
 /* Check ACL's */
-$dn =  base64_decode($_GET['n']);
+$dn ="";
+if(isset($_GET['n'])){
+  $dn =  base64_decode($_GET['n']);
+}elseif(isset($_GET['dn'])){
+  $dn =  base64_decode($_GET['dn']);
+}
 $acl = $ui->get_permissions($dn,"ldapmanager/xlsexport");
 if(!preg_match("/r/",$acl)){
   echo "insufficient permissions";
index 85a398d23d0cf441b8f121db03dc2616daf125b8..c175c43dc17896022fd5ac94e501a4fe7012b678 100644 (file)
@@ -165,7 +165,7 @@ function &addworksheet($name="") {
         }
     }
 
-    $worksheet =& new writeexcel_worksheet($name, $index, $this->_activesheet,
+    $worksheet = new writeexcel_worksheet($name, $index, $this->_activesheet,
                                           $this->_firstsheet,
                                           $this->_url_format, $this->_parser,
                                           $this->_tempdir);
@@ -185,9 +185,9 @@ function &addworksheet($name="") {
 #
 function &addformat($para=false) {
     if($para===false) {
-        $format =& new writeexcel_format($this->_xf_index);
+        $format = new writeexcel_format($this->_xf_index);
     } else {
-        $format =& new writeexcel_format($this->_xf_index, $para);
+        $format = new writeexcel_format($this->_xf_index, $para);
     }
 
     $this->_xf_index += 1;