~ubuntu-branches/debian/sid/phpldapadmin/sid

« back to all changes in this revision

Viewing changes to lib/EntryReader.php

  • Committer: Bazaar Package Importer
  • Author(s): Fabio Tranchitella
  • Date: 2009-03-16 14:54:15 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090316145415-7dsvj319dd02h83j
Tags: 1.1.0.6-1
* New upstream release. (Closes: #518578)
* debian/rules: removed "-m 644" from the dh_install call. (Closes: #518847)
* debian/postrm: remove config.php at purge time. (Closes: #519086)
* debian/patches/hungarian.dpatch: fixed a hungarian translation.
  (Closes: #505559)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/EntryReader.php,v 1.2.2.3 2008/01/27 14:09:14 wurley Exp $
 
2
// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/EntryReader.php,v 1.2.2.5 2008/12/12 12:20:22 wurley Exp $
3
3
 
4
4
define('ENTRY_READER_CREATION_CONTEXT', '1');
5
5
define('ENTRY_READER_EDITING_CONTEXT', '2');
113
113
                // @todo editing objectclasses
114
114
                if (($this->context == ENTRY_READER_CREATION_CONTEXT) && ($name == 'objectClass')) return;
115
115
 
116
 
                $old_vals = $this->get('OldValues', $attribute);
 
116
                if ($this->context == ENTRY_READER_EDITING_CONTEXT)
 
117
                        $old_vals = $this->get('OldValues', $attribute);
 
118
                else
 
119
                        $old_vals = array();
 
120
 
117
121
                $new_vals = $this->get('NewValues', $attribute);
118
122
 
119
123
                if (isset($_POST['old_values'][$name])) {
205
209
                }
206
210
 
207
211
                if (is_null($val)) {
208
 
                        pla_error(sprintf(_('Your template is missing variable (%s)'), $request));
 
212
                        error(sprintf(_('Your template is missing variable (%s)'),$request),'error','index.php');
209
213
                }
210
214
 
211
215
                return $val;
255
259
                                        if (function_exists($matches[1])) {
256
260
                                                $val = call_user_func($matches[1], $matches[2], $attribute, $i, $val);
257
261
                                        } else {
258
 
                                                pla_error(sprintf(_('Your template has an unknown post function (%s).'), $matches[1]));
 
262
                                                error(sprintf(_('Your template has an unknown post function (%s).'),$matches[1]),'error','index.php');
259
263
                                        }
260
264
                        }
261
265
                }