[ingo] Problem with convert_imp_filters.php

jordi.melero at upcnet.es jordi.melero at upcnet.es
Thu Dec 24 07:47:53 UTC 2009


"Jan Schneider" <jan at horde.org> escribió:

> Zitat von jordi.melero at upcnet.es:
>
>> "Jan Schneider" <jan at horde.org> escribió:
>>
>>> DON'T top-post!
>>>
>>> Zitat von jordi.melero at upcnet.es:
>>>
>>>>>
>>>>> And did you read the "Usage:" line, right below that? Did you  
>>>>> feed the script with the user list?
>>>>>
>>>> Yes, I give the users list in a plain text file and the script  
>>>> recognizes all the users fine.
>>>>
>>>> This is the output.
>>>>
>>>> root at cafex01:/dades/horde3/ingo/scripts# php  
>>>> convert_imp_filters.php < usu.txt
>>>> Converting filters for user: 46561826 at ub.edu
>>>> sql
>>>> 46561826 at ub.edu    Nothing to convert
>>>> root at cafex01:/dades/horde3/ingo/scripts#
>>>
>>> Try removing the @ in front of the @unserialize() call in line 67  
>>> and watch out for any warnings that the unserialization failed.
>>
>> Ok I delete the @ symbol from the call but nothing happens...
>>
>> root at cafex01:/dades/horde3/ingo/scripts# php  
>> convert_imp_filters.php < usu.txt
>> Converting filters for user: 46561826 at ub.edu
>> sql
>> 46561826 at ub.edu    Nothing to convert
>
> Well, then either your PHP is not showing any notices/warnings, or  
> the preference is empty. You get the "Nothing to convert" only if  
> the unserialization fails, and this only happens if the preference  
> data is corrupt, but that would get you a PHP notice. Or the data is  
> completely empty.
>
> Jan.
>
> -- 
> Do you need professional PHP or Horde consulting?
> http://horde.org/consulting/
>
> -- 
> Ingo mailing list - Join the hunt: http://horde.org/bounties/#ingo
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: ingo-unsubscribe at lists.horde.org
>

Hi,

    PHP is configured to show all errors and the data is not empty.
    Well, at last I minimized the problem, I want to change the array  
format wich is content in imp->filters of the version 3.1 of IMP to  
the actual array format content in ingo->rules, so, if I have this  
value in the old imp filters:  
a:1:{i:0;a:3:{s:6:"fields";a:1:{i:0;s:4:"from";}s:4:"text";s:20:"EGonzalez at siae.ub.es";s:6:"action";s:6:"delete";}} I want to change it to the new format in ingo rules:  
a:1:{i:0;a:9:{s:4:"name";s:4:"Rule";s:7:"combine";s:1:"1";s:10:"conditions";a:1:{i:0;a:4:{s:5:"field";s:4:"from";s:4:"type";i:1;s:5:"match";s:8:"contains";s:5:"value";s:20:"EGonzalez at siae.ub.es";}}s:6:"action";s:1:"3";s:12:"action-value";N;s:4:"stop";s:1:"1";s:5:"flags";i:0;s:7:"disable";b:0;s:2:"id";N;}}.

    Anyone has a script to do this? Please, I need to convert the  
filters of 8000 users...

Regards,
Jordi

---------------------------------------------------------------
*** Si us plau, no m'imprimeixis. Vull seguir sent digital ***
*** Por favor, no me imprimas. Quiero seguir siendo digital ***
*** Please, don't print me. I want to remain digital ***


More information about the ingo mailing list