Example #1
0
 /**
  * Forget everything about a previously recorded program
  *
  * @todo Eventually, all of this should get separated out of the Program class
  * and into something more generic, since this backend command is called from
  * several places depending on if a program or a non-expanded data row is being
  * used.
 /**/
 public function rec_forget_old()
 {
     global $db;
     // The FORGET_RECORDING command requires the specific record to be
     // forgotten, so we have to search for matching rows
     $sh = $db->query("SELECT *\n                            FROM oldrecorded\n                           WHERE title = ? AND\n                                 ((programid = '' AND subtitle = ?\n                                   AND description = ?) OR \n                                  (programid <> '' AND programid = ?) OR \n                                  (findid <> 0 AND findid = ?))", $this->title, $this->subtitle, $this->description, $this->programid, $this->findid);
     while ($row = $sh->fetch_assoc()) {
         $prog = new Program($row);
         MythBackend::find()->sendCommand(array('FORGET_RECORDING', $prog->backend_row(), '0'));
     }
     $sh->finish();
     MythBackend::find()->listenForEvent('SCHEDULE_CHANGE');
 }