fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [7198] property: fix cron


From: Sigurd Nes
Subject: [Fmsystem-commits] [7198] property: fix cron
Date: Fri, 08 Apr 2011 10:08:32 +0000

Revision: 7198
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7198
Author:   sigurdne
Date:     2011-04-08 10:08:31 +0000 (Fri, 08 Apr 2011)
Log Message:
-----------
property: fix cron

Modified Paths:
--------------
    trunk/phpgwapi/inc/class.vfs_dav.inc.php
    trunk/phpgwapi/inc/class.vfs_shared.inc.php
    trunk/phpgwapi/inc/class.vfs_sql.inc.php
    trunk/property/inc/cron/cron.php
    trunk/property/inc/cron/default/catch_ppc.php

Modified: trunk/phpgwapi/inc/class.vfs_dav.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.vfs_dav.inc.php    2011-04-07 12:17:22 UTC (rev 
7197)
+++ trunk/phpgwapi/inc/class.vfs_dav.inc.php    2011-04-08 10:08:31 UTC (rev 
7198)
@@ -38,7 +38,7 @@
        * @package phpgwapi
        * @subpackage vfs
        */
-       class vfs extends vfs_shared
+       class phpgwapi_vfs extends phpgwapi_vfs_shared
        {
                /*
                * That's the history add to the path !
@@ -83,9 +83,9 @@
                *
                 */
 
-               function vfs ()
+               function __construct()
                {
-                       $this->vfs_shared();
+                       parent::__construct();
                        /*
                           File/dir attributes, each corresponding to a 
database field.  Useful for use in loops
                           If an attribute was added to the table, add it here 
and possibly add it to

Modified: trunk/phpgwapi/inc/class.vfs_shared.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.vfs_shared.inc.php 2011-04-07 12:17:22 UTC (rev 
7197)
+++ trunk/phpgwapi/inc/class.vfs_shared.inc.php 2011-04-08 10:08:31 UTC (rev 
7198)
@@ -125,7 +125,7 @@
        * @package phpgwapi
        * @subpackage vfs
        */
-       class vfs_shared
+       class phpgwapi_vfs_shared
        {
                /*
                 * All VFS classes must have some form of 'linked directories'.
@@ -210,7 +210,7 @@
                 *  * All derived classes should call this function in their
                 *              constructor ($this->vfs_shared())
                  */
-               function vfs_shared ()
+               function __construct()
                {
                        $this->basedir = 
$GLOBALS['phpgw_info']['server']['files_dir'];
                        $this->working_id = 
$GLOBALS['phpgw_info']['user']['account_id'];

Modified: trunk/phpgwapi/inc/class.vfs_sql.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.vfs_sql.inc.php    2011-04-07 12:17:22 UTC (rev 
7197)
+++ trunk/phpgwapi/inc/class.vfs_sql.inc.php    2011-04-08 10:08:31 UTC (rev 
7198)
@@ -35,7 +35,7 @@
        * @subpackage vfs
        * @ignore
        */
-       class vfs extends vfs_shared
+       class phpgwapi_vfs extends phpgwapi_vfs_shared
        {
                var $file_actions;
 
@@ -43,9 +43,9 @@
                 * constructor, sets up variables
                *
                 */
-               function vfs ()
+               function __construct()
                {
-                       parent::vfs_shared();
+                       parent::__construct();
                        /*
                           File/dir attributes, each corresponding to a 
database field.  Useful for use in loops
                           If an attribute was added to the table, add it here 
and possibly add it to

Modified: trunk/property/inc/cron/cron.php
===================================================================
--- trunk/property/inc/cron/cron.php    2011-04-07 12:17:22 UTC (rev 7197)
+++ trunk/property/inc/cron/cron.php    2011-04-08 10:08:31 UTC (rev 7198)
@@ -89,6 +89,8 @@
 
        $GLOBALS['phpgw_info']['user']['apps']['admin'] = true;
        $GLOBALS['phpgw_info']['user']['domain'] = $_GET['domain'];
+       $GLOBALS['phpgw_info']['user']['account_id'] = -1;
+       $GLOBALS['phpgw_info']['user']['account_lid'] = 'cron_job';
 
        $num = ExecMethod('property.custom_functions.index',$data);
        // echo date('Y/m/d H:i:s ').$_GET['domain'].': '.($num ? "$num job(s) 
executed" : 'Nothing to execute')."\n";

Modified: trunk/property/inc/cron/default/catch_ppc.php
===================================================================
--- trunk/property/inc/cron/default/catch_ppc.php       2011-04-07 12:17:22 UTC 
(rev 7197)
+++ trunk/property/inc/cron/default/catch_ppc.php       2011-04-08 10:08:31 UTC 
(rev 7198)
@@ -29,6 +29,7 @@
 
        /**
         * Description
+        * example cron : /usr/local/bin/php -q 
/var/www/html/phpgroupware/property/inc/cron/cron.php default catch_ppc
         * @package property
         */
 
@@ -43,7 +44,7 @@
                        $this->like                     = & $this->db->like;
                }
 
-               function pre_run($data='')
+               function pre_run($data = array())
                {
                        phpgwapi_cache::session_set('catch', 'data', $data);
 
@@ -116,7 +117,6 @@
 
                function execute($cron='')
                {
-
                        try
                        {
                                $this->import_ppc();
@@ -149,6 +149,7 @@
 
                function import_ppc()
                {
+
                        //do the actual import
                        $config = CreateObject('catch.soconfig');
                        $config->read_repository();
@@ -179,6 +180,7 @@
                                $xmlparse->setEncoding('UTF-8');
 
                                $file_list = $this->get_files();
+
                                $i = 0;
                                foreach ($file_list as $file)
                                {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]