]> git.mxchange.org Git - friendica.git/commitdiff
event and birthday data structures
authorFriendika <info@friendika.com>
Thu, 13 Jan 2011 10:01:00 +0000 (02:01 -0800)
committerFriendika <info@friendika.com>
Thu, 13 Jan 2011 10:01:00 +0000 (02:01 -0800)
boot.php
database.sql
mod/notifications.php
update.php

index 600ce2cc0da6010349ced3be845d145a433eb284..46c5144815b8e54283f31680e3b8b26c63cc7ab0 100644 (file)
--- 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"     );
index 61cd95e72ca6e4f090b53c48fc6234eb3136cb1e..0e21be5125ac7fa7e300dee0d6cbd4368c60ff08 100644 (file)
@@ -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;
 
 
index ef72023636d78577e34c8b868c7ad6c6b427f303..49157c4442dd4bf16fb891a274481159d1b28a93 100644 (file)
@@ -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;
 }
index afa3b58a4344b1421ce4f21b68b25d85752a9699..1b75d0434c1fdda8c60fcd14c2f9e833183eea34 100644 (file)
@@ -277,3 +277,27 @@ 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 ");
+
+
+}
\ No newline at end of file