~ubuntu-branches/ubuntu/trusty/ldap-account-manager/trusty-proposed

« back to all changes in this revision

Viewing changes to templates/masscreate.php

  • Committer: Package Import Robot
  • Author(s): Roland Gruber
  • Date: 2013-07-21 11:15:58 UTC
  • mfrom: (1.2.21)
  • Revision ID: package-import@ubuntu.com-20130721111558-ex49xgcpo71fh0xg
Tags: 4.2.1-2
* Apache 2.4 support
* Fix "transition towards Apache 2.4" 
  support conf-enabled (Closes: #669824)
* Fix "[ldap-account-manager] Can't install ldap-account-manager"
  support conf-enabled (Closes: #711778)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
2
/*
3
 
$Id: masscreate.php 4734 2013-02-03 11:46:47Z gruberroland $
 
3
$Id: masscreate.php 4906 2013-05-09 19:10:35Z gruberroland $
4
4
 
5
5
  This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
6
6
  Copyright (C) 2004 - 2013  Roland Gruber
78
78
 
79
79
// get possible types and remove those which do not support file upload
80
80
$types = $_SESSION['config']->get_ActiveTypes();
81
 
for ($i = 0; $i < sizeof($types); $i++) {
 
81
$count = sizeof($types);
 
82
for ($i = 0; $i < $count; $i++) {
82
83
        $myType = new $types[$i]();
83
 
        if (!$myType->supportsFileUpload() || isAccountTypeHidden($types[$i])) {
 
84
        if (!$myType->supportsFileUpload() || isAccountTypeHidden($types[$i]) || !checkIfNewEntriesAreAllowed($types[$i])) {
84
85
                unset($types[$i]);
85
86
        }
86
87
}
169
170
                if (($m != 0) && ($m%3 == 0)) {
170
171
                        echo $innerTable->addNewLine();
171
172
                }
172
 
                $module = new $modules[$m]($types[$i]);
 
173
                $module = moduleCache::getModule($modules[$m], $types[$i]);
173
174
                $iconImage = '../graphics/' . $module->getIcon();
174
175
                $innerTable->addElement(new htmlImage($iconImage));
175
176
                $enabled = true;
348
349
                }
349
350
                $columnContainer->addElement(new htmlSpacer(null, '10px'), true);
350
351
                $icon = '';
351
 
                $module = new $modules[$m]($scope);
 
352
                $module = moduleCache::getModule($modules[$m], $scope);
352
353
                $iconImage = $module->getIcon();
353
354
                if ($iconImage != null) {
354
355
                        $icon = '../graphics/' . $iconImage;