This file is indexed.

/usr/share/gosa/plugins/admin/opsi/class_opsiProperties.inc is in gosa-plugin-opsi 2.7.4+reloaded2-13+deb9u1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php


/*! \brief  Displays opsi product properties.
 */
class opsiProperties extends plugin
{
    private $product;
    private $cfg;
    private $hostId;
    public $config;

    /*! \brief  Initializes the class.
      @param  Object  The gosa configuration object
      @param  String  The product name.
      @param  Array   The product config (e.g. aray('attr' => 'value'))
      @param  String  The host id if necessary
     */
    public function __construct($config,$product,$cfg = array() ,$hostId = "")
    {
        $this->initTime = microtime(TRUE);
        $this->config  = $config;
        $this->product = $product;
        $this->cfg     = $cfg;
        $this->hostId  = $hostId;

        // Create statistic table entry
        stats::log('plugin', $class = get_class($this), $category = array($this->acl_category),  $action = 'open',
                $amount = 1, $duration = (microtime(TRUE) - $this->initTime));
    }


    /*! \brief  Display html dialog which allows to 
      configure the properties
      @return String  HTML content
     */
    public function execute()
    {
        plugin::execute();
        $ui =get_userinfo();
        $acl =  $ui->get_permissions($this->config->current['BASE'],"opsi/opsiProperties","");
        $smarty = get_smarty();
        $smarty->assign("ACL",$acl);
        $smarty->assign("cfg",set_post($this->cfg));
        $smarty->assign("cfg_count",count($this->cfg));
        return($smarty->fetch(get_template_path("properties.tpl",TRUE,dirname(__FILE__))));
    }


    /*! \brief  Save the posted property updates 
     */
    public function save_object()
    {
        $ui =get_userinfo();
        $acl =  $ui->get_permissions($this->config->current['BASE'],"opsi/opsiProperties","");
        if(preg_match("/w/",$acl)){
            foreach($this->cfg as $name => $value){
                if(isset($_POST['value_'.$name])){
                    $this->cfg[$name]['CURRENT'] = get_post('value_'.$name);
                }
            }
        }
    }


    /*! \brief  Sets the current config array.
     */
    public function set_cfg($cfg) 
    {
        $this->cfg = $cfg;
    }


    /*! \brief  Returns the current product config
      @return Array.
     */
    public function get_cfg() 
    {
        return($this->cfg);
    }


    /*! \brief  Returns the ID of the product.
      @param  String  Product ID
     */
    public function get_product()
    {
        return($this->product);
    }


    /*! \brief  Sets the current product ID, 
      The name is only used to remember the currently edited product.
     */
    public function set_product($name)
    {
        $this->product = $name;
    }


    /*! \brief  Retuns the hostId.
     */
    public function get_hostId()
    {
        return($this->hostId);
    }


    /* Return plugin informations for acl handling */
    static function plInfo()
    {
        return (array(
                    "plShortName"   => _("Products"),
                    "plDescription" => _("Product properties"),
                    "plSelfModify"  => FALSE,
                    "plDepends"     => array(),
                    "plPriority"    => 10,
                    "plSection"     => array("administration"),
                    "plCategory"    => array("opsi"),
                    "plProvidedAcls"=> array(
                        )
                    ));
    }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>