Ignore:
Timestamp:
07/28/09 11:20:54 (15 years ago)
Author:
amuller
Message:

Ticket #88 - Adaptação pro expresso2.0

Location:
trunk/expressoCalendar/inc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoCalendar/inc/class.bocalendar.inc.php

    r920 r1204  
    103103        function insertEvent ($datetime, $edatetime, $title, $description, $location) 
    104104        { 
    105                 //Discover the event id 
    106                 $query = "SELECT max(cal_id) FROM phpgw_cal"; 
    107                 if (!$this->db->query($query)) 
    108                         return false; 
    109  
    110                 while($this->db->next_record()) 
    111                         $id = $this->db->row(); 
    112  
    113105                // Performing SQL insert query 
    114                 $query = "INSERT INTO phpgw_cal VALUES (".($id['max']+1).", '".$_SESSION['calendar']['user']['email']."', ".$this->user_id.", null, null, ".$datetime.", ".time().",".$edatetime.", 2, 'E', 0, '".$title."', '".$description."', '".$location."', 0, null)"; 
     106                //FIXME LOCK the table sequence is desirable 
     107                $query = "INSERT INTO phpgw_cal VALUES (default, '".$_SESSION['calendar']['user']['email']."', ".$this->user_id.", null, null, ".$datetime.", ".time().",".$edatetime.", default, 'E', default, '".$title."', '".$description."', '".$location."', default, default)"; 
    115108                if ($this->db->query($query)){ 
    116                         $query = "INSERT INTO phpgw_cal_user VALUES (".($id['max']+1).", ".$this->user_id.", 'A', 'u')"; 
     109                        $query = "INSERT INTO phpgw_cal_user VALUES (currval('seq_phpgw_cal'::regclass), ".$this->user_id.", 'A', 'u')"; 
    117110                        if ($this->db->query($query)){ 
    118111                                $return = "true "; 
  • trunk/expressoCalendar/inc/controller.php

    r632 r1204  
    11<?php 
     2        if(!isset($GLOBALS['phpgw_info'])){ 
     3                $GLOBALS['phpgw_info']['flags'] = array( 
     4                 'currentapp' => 'expressoCalendar', 
     5                 'nonavbar'   => true, 
     6                 'noheader'   => true 
     7                ); 
     8        } 
     9        require_once '../../header.session.inc.php'; 
     10 
    211   //   Explode action from cExecuteForm function 
    312   $cExecuteFormReturn = false; 
  • trunk/expressoCalendar/inc/load_lang.php

    r919 r1204  
    11<? 
     2        if(!isset($GLOBALS['phpgw_info'])){ 
     3                $GLOBALS['phpgw_info']['flags'] = array( 
     4                 'currentapp' => 'expressoCalendar', 
     5                 'nonavbar'   => true, 
     6                 'noheader'   => true 
     7                ); 
     8        } 
     9        require_once '../../header.session.inc.php'; 
     10 
    211// Load the lang of the module. 
    312        if(!$_SESSION['phpgw_info']['expressoCalendar']['lang'])  
Note: See TracChangeset for help on using the changeset viewer.