aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@diekershoff.homeunix.net>2011-01-13 14:17:52 +0100
committerroot <root@diekershoff.homeunix.net>2011-01-13 14:17:52 +0100
commitc472799b8dd607946c0bf787240ba4df7fd28e93 (patch)
tree823844fe1269349e3afd7db1c180a4ef066d8f2f
parent44ff96e0cf64fab4a4b9d8d71beeec485ffea4f3 (diff)
parentf3bb78906167dfd3fd4032514bfda9e68a309cdb (diff)
downloadvolse-hubzilla-c472799b8dd607946c0bf787240ba4df7fd28e93.tar.gz
volse-hubzilla-c472799b8dd607946c0bf787240ba4df7fd28e93.tar.bz2
volse-hubzilla-c472799b8dd607946c0bf787240ba4df7fd28e93.zip
Merge branch 'master' of git://github.com/friendika/friendika
-rw-r--r--boot.php2
-rw-r--r--database.sql18
-rw-r--r--mod/notifications.php11
-rw-r--r--update.php25
4 files changed, 55 insertions, 1 deletions
diff --git a/boot.php b/boot.php
index 600ce2cc0..46c514481 100644
--- a/boot.php
+++ b/boot.php
@@ -2,7 +2,7 @@
set_time_limit(0);
-define ( 'BUILD_ID', 1030 );
+define ( 'BUILD_ID', 1031 );
define ( 'DFRN_PROTOCOL_VERSION', '2.0' );
define ( 'EOL', "<br />\r\n" );
diff --git a/database.sql b/database.sql
index 61cd95e72..0e21be512 100644
--- a/database.sql
+++ b/database.sql
@@ -89,6 +89,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
`reason` text NOT NULL,
`info` mediumtext NOT NULL,
`profile-id` int(11) NOT NULL DEFAULT '0',
+ `bdyear` CHAR( 4 ) NOT NULL COMMENT 'birthday notify flag',
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
KEY `self` (`self`),
@@ -451,5 +452,22 @@ CREATE TABLE IF NOT EXISTS `addon` (
) ENGINE = MYISAM DEFAULT CHARSET=utf8;
+CREATE TABLE IF NOT EXISTS `event` (
+`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+`uid` INT NOT NULL ,
+`cid` INT NOT NULL ,
+`created` DATETIME NOT NULL ,
+`edited` DATETIME NOT NULL ,
+`start` DATETIME NOT NULL ,
+`finish` DATETIME NOT NULL ,
+`desc` TEXT NOT NULL ,
+`location` TEXT NOT NULL ,
+`type` CHAR( 255 ) NOT NULL ,
+`adjust` TINYINT( 1 ) NOT NULL DEFAULT '1',
+`allow_cid` MEDIUMTEXT NOT NULL ,
+`allow_gid` MEDIUMTEXT NOT NULL ,
+`deny_cid` MEDIUMTEXT NOT NULL ,
+`deny_gid` MEDIUMTEXT NOT NULL
+) ENGINE = MYISAM DEFAULT CHARSET=utf8;
diff --git a/mod/notifications.php b/mod/notifications.php
index ef7202363..49157c444 100644
--- a/mod/notifications.php
+++ b/mod/notifications.php
@@ -72,6 +72,16 @@ function notifications_content(&$a) {
'$hide_text' => ((strlen($sql_extra)) ? t('Show Ignored Requests') : t('Hide Ignored Requests'))
));
+
+ $r = q("SELECT COUNT(*) AS `total` FROM `intro`
+ WHERE `intro`.`uid` = %d $sql_extra AND `intro`.`blocked` = 0 ",
+ intval($_SESSION['uid'])
+ );
+ if($r && count($r)) {
+ $a->set_pager_total($r[0]['total']);
+ $a->set_pager_itemspage(20);
+ }
+
$r = q("SELECT `intro`.`id` AS `intro_id`, `intro`.*, `contact`.*
FROM `intro` LEFT JOIN `contact` ON `intro`.`contact-id` = `contact`.`id`
WHERE `intro`.`uid` = %d $sql_extra AND `intro`.`blocked` = 0 ",
@@ -152,5 +162,6 @@ function notifications_content(&$a) {
}
+ $o .= paginate($a);
return $o;
}
diff --git a/update.php b/update.php
index afa3b58a4..ae0e35531 100644
--- a/update.php
+++ b/update.php
@@ -277,3 +277,28 @@ function update_1028() {
function update_1029() {
q("ALTER TABLE `contact` ADD `info` MEDIUMTEXT NOT NULL AFTER `reason` ");
}
+
+function update_1030() {
+ q("ALTER TABLE `contact` ADD `bdyear` CHAR( 4 ) NOT NULL COMMENT 'birthday notify flag' AFTER `profile-id` ");
+
+ q("CREATE TABLE IF NOT EXISTS `event` (
+ `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+ `uid` INT NOT NULL ,
+ `cid` INT NOT NULL ,
+ `created` DATETIME NOT NULL ,
+ `edited` DATETIME NOT NULL ,
+ `start` DATETIME NOT NULL ,
+ `finish` DATETIME NOT NULL ,
+ `desc` TEXT NOT NULL ,
+ `location` TEXT NOT NULL ,
+ `type` CHAR( 255 ) NOT NULL ,
+ `adjust` TINYINT( 1 ) NOT NULL DEFAULT '1',
+ `allow_cid` MEDIUMTEXT NOT NULL ,
+ `allow_gid` MEDIUMTEXT NOT NULL ,
+ `deny_cid` MEDIUMTEXT NOT NULL ,
+ `deny_gid` MEDIUMTEXT NOT NULL
+ ) ENGINE = MYISAM DEFAULT CHARSET=utf8 ");
+
+
+}
+