index 670fa16f2c148b6ad680dddd1d12e9a5cf2d4367..3d59015a24b6dc343e888fd3cb7877f827d5961b 100644 (file)
--- a/include/class_plugin.inc
+++ b/include/class_plugin.inc
{
/* Save values to object */
foreach ($this->attributes as $val){
- if ($this->acl_is_writable($val) && isset ($_POST["$val"])){
+ if ($this->acl_is_writeable($val) && isset ($_POST["$val"])){
/* Check for modifications */
if (get_magic_quotes_gpc()) {
$data= stripcslashes($_POST["$val"]);
$data = "";
}
$this->$val= $data;
- echo "<font color='blue'>".$val."</font><br>";
+ //echo "<font color='blue'>".$val."</font><br>";
}else{
- echo "<font color='red'>".$val."</font><br>";
+ //echo "<font color='red'>".$val."</font><br>";
}
}
}
$ldap->cd($this->config->current['BASE']);
$ldap->rmdir_recursive($dn);
}else{
- print_red (_("You are not allowed to delete this snap shot!"));
+ print_red (_("You are not allowed to delete this snapshot!"));
}
}
}
- function acl_is_writable($attribute)
+ function acl_is_writeable($attribute)
{
$ui= get_userinfo();
return preg_match('/w/', $ui->get_permissions($this->dn, get_class($this), $attribute));
return preg_match('/d/', $ui->get_permissions($this->dn, get_class($this), '0'));
}
+
+ function acl_is_moveable()
+ {
+ $ui= get_userinfo();
+ return preg_match('/m/', $ui->get_permissions($this->dn, get_class($this), '0'));
+ }
+
+
+ function getacl($attribute)
+ {
+ $ui= get_userinfo();
+ return $ui->get_permissions($this->dn, get_class($this), $attribute);
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>