/[drupal]/contributions/modules/office_hours/office_hours.install
ViewVC logotype

Diff of /contributions/modules/office_hours/office_hours.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.1.2.6, Sat Aug 29 08:33:31 2009 UTC revision 1.1.2.1.2.7, Sun Nov 1 14:49:36 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id$  // $Id: office_hours.install,v 1.1.2.1.2.6 2009/08/29 08:33:31 mikl Exp $
3    
4  /**  /**
5   * Implementation of hook_install().   * Implementation of hook_install().
# Line 45  function office_hours_update_6000() { Line 45  function office_hours_update_6000() {
45    
46      while ($field = db_fetch_array($old)) {      while ($field = db_fetch_array($old)) {
47        list($hr, $min) = explode(":", $field->$name . "_starthours");        list($hr, $min) = explode(":", $field->$name . "_starthours");
48        $start = $hr * 60 + $min;        $start = $hr.$min;
49        list($hr, $min) = explode(":", $field->$name . "_endhours");        list($hr, $min) = explode(":", $field->$name . "_endhours");
50        $end = $hr * 60 + $min;        $end = $hr.$min;
51        $ret[] = update_sql("UPDATE {content_" . $name . "} SET " . $name . "_starthours = " . $start . "," . $name . "_endhours = " . $end . " WHERE nid = %d AND delta = %d", $field->nid, $field->data);        $ret[] = update_sql("UPDATE {content_" . $name . "} SET " . $name . "_starthours = " . $start . "," . $name . "_endhours = " . $end . " WHERE nid = %d AND delta = %d", $field->nid, $field->data);
52      }      }
53    

Legend:
Removed from v.1.1.2.1.2.6  
changed lines
  Added in v.1.1.2.1.2.7

  ViewVC Help
Powered by ViewVC 1.1.2