Ok, whatsoever. Since I could not figure out how to force SOGo to recreate the _quick relation, I created a script to do it for me, now.

Just in case other people have similar problems, I attached the script to this mail. Please be aware that this script might contain errors and cause everything to explode, or worse. I highly recommend to make a database backup before!!! Nobody can hold me liable for any damage this script might cause!

Regards,

Mirko

PS: It actually was the c_classification field that is not correctly set by 
Funambol.

On 12/13/2011 07:51 PM, Mirko Stoffers wrote:
Now, I started a precious discussion on the future of Funambol which actually 
was not my
intention ;)

Back to my problem:

I figured out there are tow tables: jdoe123 and jdoe123_quick . Two my point of 
view jdoe123
contains correct data, i.e. there is an entry CLASS:PRIVATE in the vcal blob. 
However, the
entries in jdoe123_quick differ from really private appointments in the sense 
that there are
three flags zero instead of one: c_classification, c_isopaque, and c_status. I 
guess one of
those flags is the one causing the trouble.

So my question: Is there a way to make SOGo recompute this jdoe123_quick table 
from the
entries in jdoe123?

Thanks,

Mirko

--
[email protected]
https://inverse.ca/sogo/lists
#!/bin/bash

# !!!this script might cause DAMAGE to your computer and comes with absolutely 
NO WARRANTY!!!

# this script only work with PostgreSQL

# I commented the line that actually takes action. Uncomment it at your own 
risk!

defaultdatabase=$USER
indextable=sogo_folder_info

read -p "Database ($defaultdatabase): " database

if [ -z "$database" ]
then
  database=$defaultdatabase
fi

tableIds=`psql -t $database -c "select c_folder_id from $indextable where 
c_folder_type = 'Appointment';"`

for tableId in $tableIds
do
        table=`psql -t $database -c "select split_part(c_location, '/', 5) from 
$indextable where c_folder_id='$tableId';"`
        qtable=`psql -t $database -c "select split_part(c_quick_location, '/', 
5) from $indextable where c_folder_id='$tableId';"`
        privateEvents=`psql -t $database -c "select c_name from $table where 
c_content like '%CLASS:PRIVATE%';"`
        for privateEvent in $privateEvents
        do
                #res=`psql -t $database -c "update $qtable set 
c_classification=1 where c_name='$privateEvent';"`
                echo $res
        done
done

Reply via email to