Esempio n. 1
0
 function unregister_url($url)
 {
     $sm =& vivvo_lite_site::get_instance();
     if ($sm->is_registered_url($url)) {
         require_once VIVVO_FS_FRAMEWORK . 'vivvo_post.php';
         require_once VIVVO_FS_FRAMEWORK . 'vivvo_preference.php';
         $pm = new vivvo_post_master();
         $config_list = new preferences_list();
         if ($config_list->get_preference_by_all_variable($url, '', '', 'url_modules', 1)) {
             $config_list->sql_delete_list($pm);
             unset($sm->url_modules[$url]);
             return true;
         }
     }
     return false;
 }
 /**
  * Set configuration data
  *
  * @param string $name		Variable name
  * @param string $property	Variable property name
  * @param string $value		Variable value
  * @param string $module	Module name
  * @param string $reg_exp	Variable value restriction
  * @param string $doamin_id	Doamin restriction
  *
  * @return boolean True on success, false on fail
  */
 function set_conf($name, $property = '', $value, $module = '', $reg_exp = '', $domain_id = 1)
 {
     require_once VIVVO_FS_FRAMEWORK . 'vivvo_preference.php';
     if (!$this->_post_master) {
         $this->set__post_master();
     }
     $config_list = new preferences_list();
     $conf = $config_list->get_preference_by_all_variable($name, '', '', '');
     if ($conf) {
         if ($property != '') {
             $conf->set_variable_property($property);
         }
         $conf->set_variable_value($value);
         if ($module != '') {
             $conf->set_module($module);
         }
         if ($reg_exp != '') {
             $conf->set_reg_exp($reg_exp);
         }
         $conf->set_domain_id($domain_id);
         $this->_post_master->set_data_object($conf);
         $this->_post_master->sql_update();
         vivvo_cache::get_instance()->delete('configuration');
     } else {
         $this->add_conf($name, $property, $value, $module, $reg_exp, $domain_id);
     }
 }