Exemple #1
0
 public function setContent($html)
 {
     if (\app::getClass('user')->VerifyConnexion() && $_SESSION['permissions'] & 128) {
         /* perm 128 = configure blocks */
         return \tools::file_put_contents(PROFILE_PATH . $this->getConfig('viewPath'), \tools::sanitize($html));
     }
     return FALSE;
 }
Exemple #2
0
 /**
  * Validate the value of Field
  * @param string $value
  * @return string|false
  */
 public function validate($value)
 {
     if (empty($value) && $this->required) {
         return FALSE;
     } else {
         $value = \tools::sanitize($value, $this->wysiwygModules);
         $length = strlen($value);
         if ($length >= $this->characters_min && $length <= 4294967295) {
             return $value;
         } else {
             return FALSE;
         }
     }
 }