From: hickert Date: Tue, 31 Oct 2006 07:44:47 +0000 (+0000) Subject: Fixed strict && static problems with xlsexport... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d0093a64b63e08db08e2fd59ccdb7e48a37655fc;p=gosa.git Fixed strict && static problems with xlsexport... Added acls git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4970 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/html/getxls.php b/html/getxls.php index ef1ca5b6c..1b88b8ce0 100644 --- a/html/getxls.php +++ b/html/getxls.php @@ -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"; diff --git a/include/php_writeexcel/class.writeexcel_workbook.inc.php b/include/php_writeexcel/class.writeexcel_workbook.inc.php index 85a398d23..c175c43dc 100644 --- a/include/php_writeexcel/class.writeexcel_workbook.inc.php +++ b/include/php_writeexcel/class.writeexcel_workbook.inc.php @@ -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;