diff options
author | friendica <info@friendica.com> | 2014-02-25 17:55:30 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-02-25 17:55:30 -0800 |
commit | 2c72e49d1f63404b464f284d86ce2dce7f2eb493 (patch) | |
tree | f4635c09daa817c9b9cd0d69ffa7ae91ef11f7a8 | |
parent | 9a2e73ae1522c7e69d7d6e0ca6c1089189c6e697 (diff) | |
download | volse-hubzilla-2c72e49d1f63404b464f284d86ce2dce7f2eb493.tar.gz volse-hubzilla-2c72e49d1f63404b464f284d86ce2dce7f2eb493.tar.bz2 volse-hubzilla-2c72e49d1f63404b464f284d86ce2dce7f2eb493.zip |
more chatroom discovery
-rwxr-xr-x | boot.php | 2 | ||||
-rw-r--r-- | install/database.sql | 11 | ||||
-rw-r--r-- | install/update.php | 20 | ||||
-rw-r--r-- | mod/rbmark.php | 7 |
4 files changed, 35 insertions, 5 deletions
@@ -47,7 +47,7 @@ define ( 'RED_PLATFORM', 'Red Matrix' ); define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R'); define ( 'ZOT_REVISION', 1 ); -define ( 'DB_UPDATE_VERSION', 1099 ); +define ( 'DB_UPDATE_VERSION', 1100 ); define ( 'EOL', '<br />' . "\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/install/database.sql b/install/database.sql index ac35f9bc3..5d00afb03 100644 --- a/install/database.sql +++ b/install/database.sql @@ -1027,6 +1027,17 @@ CREATE TABLE IF NOT EXISTS `xchan` ( KEY `xchan_follow` (`xchan_follow`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `xchat` ( + `xchat_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `xchat_url` char(255) NOT NULL DEFAULT '', + `xchat_desc` char(255) NOT NULL DEFAULT '', + `xchat_xchan` char(255) NOT NULL DEFAULT '', + PRIMARY KEY (`xchat_id`), + KEY `xchat_url` (`xchat_url`), + KEY `xchat_desc` (`xchat_desc`), + KEY `xchat_xchan` (`xchat_xchan`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + CREATE TABLE IF NOT EXISTS `xconfig` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `xchan` char(255) NOT NULL, diff --git a/install/update.php b/install/update.php index 9ad74fec4..8612e7354 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1099 ); +define( 'UPDATE_VERSION' , 1100 ); /** * @@ -1118,3 +1118,21 @@ function update_r1098() { return UPDATE_SUCCESS; return UPDATE_FAILED; } + +function update_r1099() { + $r = q("CREATE TABLE IF NOT EXISTS `xchat` ( + `xchat_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `xchat_url` char(255) NOT NULL DEFAULT '', + `xchat_desc` char(255) NOT NULL DEFAULT '', + `xchat_xchan` char(255) NOT NULL DEFAULT '', + PRIMARY KEY (`xchat_id`), + KEY `xchat_url` (`xchat_url`), + KEY `xchat_desc` (`xchat_desc`), + KEY `xchat_xchan` (`xchat_xchan`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 "); + + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + diff --git a/mod/rbmark.php b/mod/rbmark.php index 1c962152c..e35c2494a 100644 --- a/mod/rbmark.php +++ b/mod/rbmark.php @@ -35,7 +35,8 @@ function rbmark_post(&$a) { $t = array('url' => escape_tags($_REQUEST['url']),'term' => escape_tags($_REQUEST['title'])); bookmark_add($channel,$channel,$t,((x($_REQUEST,'private')) ? intval($_REQUEST['private']) : 0), array('menu_id' => ((x($_REQUEST,'menu_id')) ? intval($_REQUEST['menu_id']) : 0), - 'menu_name' => ((x($_REQUEST,'menu_name')) ? escape_tags($_REQUEST['menu_name']) : '') + 'menu_name' => ((x($_REQUEST,'menu_name')) ? escape_tags($_REQUEST['menu_name']) : ''), + 'ischat' => ((x($_REQUEST['ischat'])) ? intval($_REQUEST['ischat']) : 0) )); goaway(z_root() . '/bookmarks'); @@ -92,8 +93,8 @@ function rbmark_content(&$a) { '$header' => t('Save Bookmark'), '$url' => array('url',t('URL of bookmark'),escape_tags($_REQUEST['url'])), '$title' => array('title',t('Description'),escape_tags($_REQUEST['title'])), - '$ischat' => (($ischat) ? 1 : 0), - '$private' => (($private) ? 1 : 0), + '$ischat' => ((x($_REQUEST,'ischat')) ? intval($_REQUEST['ischat']) : 0), + '$private' => ((x($_REQUEST,'private')) ? intval($_REQUEST['private']) : 0), '$submit' => t('Save'), '$menu_name' => array('menu_name',t('Or enter new bookmark folder name'),'',''), '$menus' => $menu_select |