コード例 #1
0
 /**
  * Processes the input of the administration interface for Picture
  *
  * @return void
  */
 public function processAdminUI()
 {
     if ($this->DEPRECATEDisOwner(User::getCurrentUser()) || User::getCurrentUser()->DEPRECATEDisSuperAdmin()) {
         parent::processAdminUI();
         /* width and height */
         $name = "banner_add_group_{this->getId()}_widthxheight";
         $widthxheight = FormSelectGenerator::getResult($name, null);
         //pretty_print_r($widthxheight);
         $name = "banner_add_group_{this->getId()}_max_width";
         $max_width = $_REQUEST[$name];
         /*max_height*/
         $name = "banner_add_group_{this->getId()}_max_height";
         $max_height = $_REQUEST[$name];
         if (!empty($widthxheight)) {
             $widthxheightArray = explode('/', $widthxheight);
             $max_width_select = $widthxheightArray[0];
             $max_height_select = $widthxheightArray[1];
             if (($max_width_select != $max_width || $max_height_select != $max_height) && ($max_width == $this->getKVP(get_class($this) . '_max_width') && $max_height == $this->getKVP(get_class($this) . '_max_height'))) {
                 /* Width and height weren't manually changed, or were empty */
                 $max_width = $max_width_select;
                 $max_height = $max_height_select;
             }
         }
         $this->setKVP(get_class($this) . '_max_width', $max_width);
         $this->setKVP(get_class($this) . '_max_height', $max_height);
     }
 }