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

Diff of /contributions/modules/biblio/biblio.install

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

revision 1.77.2.4 by rjerome, Tue Nov 10 22:09:18 2009 UTC revision 1.77.2.5 by rjerome, Mon Nov 16 02:24:22 2009 UTC
# Line 1  Line 1 
1  <?PHP  <?PHP
2  // $Id: biblio.install,v 1.77.2.3 2009/11/02 01:45:24 rjerome Exp $  // $Id: biblio.install,v 1.77.2.4 2009/11/10 22:09:18 rjerome Exp $
3  function biblio_install() {  function biblio_install() {
4    $result = array();    $result = array();
5    
# Line 764  function biblio_schema() { Line 764  function biblio_schema() {
764          ),          ),
765        'aka' => array(        'aka' => array(
766          'type' => 'int',          'type' => 'int',
767          'not null' => TRUE,          'not null' => FALSE,
         'default'  => 0,  
768          'unsigned' => TRUE,          'unsigned' => TRUE,
769          'description' =>'Also known as, links this author entry with others so you can have variation on the name, but listing by cid will find all other (aka) author entries',          'description' =>'Also known as, links this author entry with others so you can have variation on the name, but listing by cid will find all other (aka) author entries',
770          ),          ),
# Line 832  function biblio_schema() { Line 831  function biblio_schema() {
831          )          )
832    
833          ),          ),
834        'primary key' => array('cid','aka'),        'primary key' => array('cid'),
835        'indexes' => array(        'indexes' => array(
836            'lastname' => array('lastname'),            'lastname' => array('lastname'),
837            'firstname' => array('firstname'),            'firstname' => array('firstname'),
# Line 1443  function _id_by_name($table, $name, $id Line 1442  function _id_by_name($table, $name, $id
1442    static $result = NULL;    static $result = NULL;
1443    if (!empty($build)) { //refresh cache from table    if (!empty($build)) { //refresh cache from table
1444      unset($result[$build['tablename']]);      unset($result[$build['tablename']]);
1445      $res = db_query("SELECT ".$build['name_column'].", ".$build['id_column']." FROM {".$build['tablename']."}");      $res = db_query("SELECT ".$build['name_column'].", ".$build['id_column']." FROM {".$build['tablename']."}",array(), array('fetch' => PDO::FETCH_ASSOC));
1446      foreach ($res->fetchAssoc() as $row ){      foreach ($res as $row ){
1447        $result[$build['tablename']][$row[$build['name_column']]] = $row[$build['id_column']];        $result[$build['tablename']][$row[$build['name_column']]] = $row[$build['id_column']];
1448      }      }
1449      return;      return;
# Line 1963  function biblio_update_6022() { Line 1962  function biblio_update_6022() {
1962  }  }
1963  */  */
1964  function biblio_update_7000() {  function biblio_update_7000() {
1965        $result = array();
1966    
1967        db_drop_primary_key($result, 'biblio_contributor_data');
1968        db_add_primary_key($result, 'biblio_contributor_data', array('cid', 'aka'));
1969    
1970        return $result;
1971    
1972  }  }

Legend:
Removed from v.1.77.2.4  
changed lines
  Added in v.1.77.2.5

  ViewVC Help
Powered by ViewVC 1.1.3