- Timestamp:
- 07/08/11 18:21:21 (13 years ago)
- Location:
- branches/2.2/expressoMail1_2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/expressoMail1_2/inc/class.rss.inc.php
r3178 r4688 33 33 exit; 34 34 } 35 function getChannels(){ 35 36 private function createTableRSS() 37 { 38 $query = 'CREATE TABLE phpgw_userrss( uid INT NOT NULL,rss_url VARCHAR(1000),name varchar(50), PRIMARY KEY (uid,rss_url) );'; 39 40 $GLOBALS['phpgw']->db->query($query); 41 42 if ( $GLOBALS['phpgw']->db->Error ) 43 return false; 44 else 45 return true; 46 } 47 48 function getChannels() 49 { 36 50 include('../header.inc.php'); 37 $GLOBALS['phpgw']->db->query('SELECT rss_url,name FROM phpgw_userrss WHERE uid = '.$_SESSION['phpgw_session']['account_id']); 38 while($GLOBALS['phpgw']->db->next_record()) 39 $return[]=$GLOBALS['phpgw']->db->row(); 40 return $return; 51 52 $flag = false; 53 $tableQuery = "select relname from pg_stat_user_tables order by relname;"; 54 55 if( $GLOBALS['phpgw']->db->query( $tableQuery ) ) 56 { 57 while( $GLOBALS['phpgw']->db->next_record() ) 58 { 59 $tables[] = $GLOBALS['phpgw']->db->row(); 60 } 61 62 foreach( $tables as $tableName ) 63 { 64 if( strtolower( $tableName['relname'] ) === 'phpgw_userrss' ) 65 { 66 $flag = true; 67 } 68 } 69 } 70 71 if( !$flag ) 72 { 73 $flag = $this->createTableRSS(); 74 } 75 76 $query = 'SELECT rss_url,name FROM phpgw_userrss WHERE uid = '.$_SESSION['phpgw_session']['account_id']; 77 78 if( $GLOBALS['phpgw']->db->query($query) ) 79 { 80 while( $GLOBALS['phpgw']->db->next_record() ) 81 { 82 $return[] = $GLOBALS['phpgw']->db->row(); 83 } 84 } 85 86 if( count($return) > 0 ) 87 return $return; 88 else 89 return ""; 41 90 } 42 function addChannel($param){ 91 92 function addChannel($param) 93 { 43 94 include('../header.inc.php'); 44 95 $name = $GLOBALS['phpgw']->db->db_addslashes(htmlentities($param['name'])); … … 52 103 } 53 104 54 function removeChannel($param){ 105 function removeChannel($param) 106 { 55 107 include('../header.inc.php'); 56 108 $url = $GLOBALS['phpgw']->db->db_addslashes($param['url']); -
branches/2.2/expressoMail1_2/js/draw_api.js
r4684 r4688 162 162 { 163 163 164 if (data == null || typeof(data) == 'string')164 if ( data == null || typeof(data) == 'string') 165 165 { 166 return;166 return false; 167 167 } 168 168 -
branches/2.2/expressoMail1_2/setup/setup.inc.php
r4542 r4688 16 16 $setup_info['expressoMail1_2']['tables'][] = 'phpgw_expressomail_contacts'; 17 17 $setup_info['expressoMail1_2']['tables'][] = 'phpgw_certificados'; 18 $setup_info['expressoMail1_2']['tables'][] = 'phpgw_userrss'; 18 19 $setup_info['expressoMail1_2']['enable'] = 1; 19 20 -
branches/2.2/expressoMail1_2/setup/tables_current.inc.php
r1035 r4688 33 33 'ix' => array(), 34 34 'uc' => array() 35 ), 36 'phpgw_userrss' => array( 37 'fd' => array( 38 'uid' => array('type' => 'int', 'nullable' => false ), 39 'rss_url' => array('type' => 'varchar', 'precision' => 1000 ), 40 'name' => array('type' => 'varchar', 'precision' => 50) 41 ), 42 'pk' => array('uid','rss_url'), 43 'fk' => array(), 44 'ix' => array(), 45 'uc' => array() 35 46 ) 36 47 );
Note: See TracChangeset
for help on using the changeset viewer.