DataObjects/Core_notify_recur.php
[Pman.Core] / Notify.php
index 44e5ed8..8a99c61 100644 (file)
@@ -43,7 +43,7 @@ class Pman_Core_Notify extends Pman
             'max' => 0,
             
         ),
-         'force' => array(
+        'force' => array(
             'desc' => 'Force redelivery, even if it has been sent before or not queued...',
             'default' => 0,
             'short' => 'f',
@@ -91,7 +91,7 @@ class Pman_Core_Notify extends Pman
             $this->send_to = $opts['send-to'];
         }
      
-        //DB_DataObject::debugLevel(1);
+        DB_DataObject::debugLevel(1);
         $w = DB_DataObject::factory($this->table);
         
         if (!$showold) {
@@ -188,7 +188,7 @@ class Pman_Core_Notify extends Pman
         $php = $_SERVER["_"];
         $sn =  $_SERVER["SCRIPT_NAME"];
         
-        $cwd = $sn[0] == '/' ? dirname($sn) : dirname(realpath(getcwd() . $sn)); // same as run on.. (so script should end up being same relatively..)
+        $cwd = $sn[0] == '/' ? dirname($sn) : dirname(realpath(getcwd() . '/'. $sn)); // same as run on.. (so script should end up being same relatively..)
         $app = $cwd . '/' . basename($_SERVER["SCRIPT_NAME"]) . '  ' . $this->target . '/'. $id;
         if ($this->force) {
             $app .= ' -f';
@@ -256,7 +256,7 @@ class Pman_Core_Notify extends Pman
             }
             fclose($p['pipes'][0]);
             fclose($p['pipes'][2]);
-            echo "CLOSING: ({$p['pid']}) " . $p['cmd'] . " : " . file_get_contents($p['out']) . "\n";
+            //echo "CLOSING: ({$p['pid']}) " . $p['cmd'] . " : " . file_get_contents($p['out']) . "\n";
             //fclose($p['pipes'][1]);
             
             proc_close($p['proc']);