Index: openid_ax.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/openid_ax/openid_ax.install,v retrieving revision 1.6 diff -u -p -r1.6 openid_ax.install --- openid_ax.install 10 Aug 2008 18:33:57 -0000 1.6 +++ openid_ax.install 9 Oct 2008 21:18:46 -0000 @@ -4,7 +4,7 @@ /** * @file Install for openid_ax module */ - + /** * Implementation of hook_install() */ @@ -44,8 +44,8 @@ function openid_ax_schema() { 'description' => t('URI placeholder of the attribute identifier.') ), ), - 'indexes' => array('ax_id' => array('ax_id')), - 'primary key' => array('identifier') + 'indexes' => array('ax_id' => array('ax_id')), + 'primary key' => array('identifier') ); $schema['openid_ax_persona'] = array( @@ -53,17 +53,17 @@ function openid_ax_schema() { 'fields' => array( 'uid' => array( 'type' => 'int', - 'size'=>'normal', + 'size' => 'normal', 'unsigned' => TRUE, 'not null' => TRUE, 'description' => t('{users}.uid') ), 'persona_id' => array( 'type' => 'int', - 'size'=>'normal', + 'size' => 'normal', 'unsigned' => TRUE, 'not null' => TRUE, - 'default'=>0, + 'default' => 0, 'description' => t('Id of the persona') ), 'persona_name' => array( @@ -74,8 +74,8 @@ function openid_ax_schema() { 'description' => t('Name of the persona.') ), ), - 'indexes' => array('uid' => array('uid')), - 'primary key' => array('uid','persona_name') + 'indexes' => array('uid' => array('uid')), + 'primary key' => array('uid', 'persona_name') ); $schema['openid_ax_values'] = array( @@ -87,26 +87,26 @@ function openid_ax_schema() { 'not null' => TRUE, 'description' => t('Primary key: Unique value id') ), - 'ax_id' => array( + 'ax_id' => array( 'type' => 'int', - 'size'=>'normal', + 'size' => 'normal', 'unsigned' => TRUE, 'not null' => TRUE, 'description' => t('ax_id from {openid_ax_attributes}.ax_id') ), 'uid' => array( 'type' => 'int', - 'size'=>'normal', + 'size' => 'normal', 'unsigned' => TRUE, 'not null' => TRUE, 'description' => t('uid from {users}.uid') ), 'persona_id' => array( 'type' => 'int', - 'size'=>'normal', + 'size' => 'normal', 'unsigned' => TRUE, 'not null' => TRUE, - 'default'=>0, + 'default' => 0, 'description' => t('persona_id from {openid_ax_persona}.persona_id') ), 'ax_values' => array( @@ -117,8 +117,8 @@ function openid_ax_schema() { ), 'server' => array( 'type' => 'int', - 'size'=>'tiny', - 'length'=>1, + 'size' => 'tiny', + 'length' => 1, 'not null' => TRUE, 'default' => 1 ) @@ -129,14 +129,14 @@ function openid_ax_schema() { return $schema; } - /** - * Insert values into table openid_ax_attributes - */ + +/** + * Insert values into table openid_ax_attributes + */ function _openid_ax_attributes_fill() { - $identifiers = _openid_ax_attributes_identifiers(); - $identifiers_string = implode("'),('",$identifiers); - $query = "INSERT INTO {openid_ax_attributes} (identifier) VALUES ('$identifiers_string') "; - db_query($query); + foreach (_openid_ax_attributes_identifiers() as $identifier) { + db_query("INSERT INTO {openid_ax_attributes} (identifier) VALUES ('%s')", $identifier); + } return; } @@ -148,70 +148,70 @@ function _openid_ax_attributes_fill() { */ function _openid_ax_attributes_identifiers() { $identifiers = array( - 'http://openid.net/schema/namePerson/prefix', - 'http://openid.net/schema/namePerson/first', - 'http://openid.net/schema/namePerson/last', - 'http://openid.net/schema/namePerson/middle', - 'http://openid.net/schema/namePerson/suffix', - 'http://openid.net/schema/namePerson/friendly', - 'http://openid.net/schema/person/guid', - 'http://openid.net/schema/birthDate/birthYear', - 'http://openid.net/schema/birthDate/birthMonth', - 'http://openid.net/schema/birthDate/birthday', - 'http://openid.net/schema/gender', - 'http://openid.net/schema/language/pref', - 'http://openid.net/schema/contact/phone/default', - 'http://openid.net/schema/contact/phone/home', - 'http://openid.net/schema/contact/phone/business', - 'http://openid.net/schema/contact/phone/cell', - 'http://openid.net/schema/contact/phone/fax', - 'http://openid.net/schema/contact/postaladdress/home', - 'http://openid.net/schema/contact/postaladdressadditional/home', - 'http://openid.net/schema/contact/city/home', - 'http://openid.net/schema/contact/state/home', - 'http://openid.net/schema/contact/country/home', - 'http://openid.net/schema/contact/postalcode/home', - 'http://openid.net/schema/contact/postaladdress/business', - 'http://openid.net/schema/contact/postaladdressadditional/business', - 'http://openid.net/schema/contact/city/business', - 'http://openid.net/schema/contact/state/business', - 'http://openid.net/schema/contact/country/business', - 'http://openid.net/schema/contact/postalcode/business', - 'http://openid.net/schema/contact/IM/default', - 'http://openid.net/schema/contact/IM/AIM', - 'http://openid.net/schema/contact/IM/ICQ', - 'http://openid.net/schema/contact/IM/MSN', - 'http://openid.net/schema/contact/IM/Yahoo', - 'http://openid.net/schema/contact/IM/Jabber', - 'http://openid.net/schema/contact/IM/Skype', - 'http://openid.net/schema/contact/internet/email', - 'http://openid.net/schema/contact/web/default', - 'http://openid.net/schema/contact/web/blog', - 'http://openid.net/schema/contact/web/Linkedin', - 'http://openid.net/schema/contact/web/Amazon', - 'http://openid.net/schema/contact/web/Flickr', - 'http://openid.net/schema/contact/web/Delicious', - 'http://openid.net/schema/company/name', - 'http://openid.net/schema/company/title', - 'http://openid.net/schema/media/spokenname', - 'http://openid.net/schema/media/greeting/audio', - 'http://openid.net/schema/media/greeting/video', - 'http://openid.net/schema/media/biography', - 'http://openid.net/schema/media/image', - 'http://openid.net/schema/media/image/16x16', - 'http://openid.net/schema/media/image/32x32', - 'http://openid.net/schema/media/image/48x48', - 'http://openid.net/schema/media/image/64x64', - 'http://openid.net/schema/media/image/80x80', - 'http://openid.net/schema/media/image/128x128', - 'http://openid.net/schema/media/image/160x120', - 'http://openid.net/schema/media/image/320x240', - 'http://openid.net/schema/media/image/640x480', - 'http://openid.net/schema/media/image/120x160', - 'http://openid.net/schema/media/image/240x320', - 'http://openid.net/schema/media/image/480x640', - 'http://openid.net/schema/media/image/favicon', - 'http://openid.net/schema/timezone' + 'http://openid.net/schema/namePerson/prefix', + 'http://openid.net/schema/namePerson/first', + 'http://openid.net/schema/namePerson/last', + 'http://openid.net/schema/namePerson/middle', + 'http://openid.net/schema/namePerson/suffix', + 'http://openid.net/schema/namePerson/friendly', + 'http://openid.net/schema/person/guid', + 'http://openid.net/schema/birthDate/birthYear', + 'http://openid.net/schema/birthDate/birthMonth', + 'http://openid.net/schema/birthDate/birthday', + 'http://openid.net/schema/gender', + 'http://openid.net/schema/language/pref', + 'http://openid.net/schema/contact/phone/default', + 'http://openid.net/schema/contact/phone/home', + 'http://openid.net/schema/contact/phone/business', + 'http://openid.net/schema/contact/phone/cell', + 'http://openid.net/schema/contact/phone/fax', + 'http://openid.net/schema/contact/postaladdress/home', + 'http://openid.net/schema/contact/postaladdressadditional/home', + 'http://openid.net/schema/contact/city/home', + 'http://openid.net/schema/contact/state/home', + 'http://openid.net/schema/contact/country/home', + 'http://openid.net/schema/contact/postalcode/home', + 'http://openid.net/schema/contact/postaladdress/business', + 'http://openid.net/schema/contact/postaladdressadditional/business', + 'http://openid.net/schema/contact/city/business', + 'http://openid.net/schema/contact/state/business', + 'http://openid.net/schema/contact/country/business', + 'http://openid.net/schema/contact/postalcode/business', + 'http://openid.net/schema/contact/IM/default', + 'http://openid.net/schema/contact/IM/AIM', + 'http://openid.net/schema/contact/IM/ICQ', + 'http://openid.net/schema/contact/IM/MSN', + 'http://openid.net/schema/contact/IM/Yahoo', + 'http://openid.net/schema/contact/IM/Jabber', + 'http://openid.net/schema/contact/IM/Skype', + 'http://openid.net/schema/contact/internet/email', + 'http://openid.net/schema/contact/web/default', + 'http://openid.net/schema/contact/web/blog', + 'http://openid.net/schema/contact/web/Linkedin', + 'http://openid.net/schema/contact/web/Amazon', + 'http://openid.net/schema/contact/web/Flickr', + 'http://openid.net/schema/contact/web/Delicious', + 'http://openid.net/schema/company/name', + 'http://openid.net/schema/company/title', + 'http://openid.net/schema/media/spokenname', + 'http://openid.net/schema/media/greeting/audio', + 'http://openid.net/schema/media/greeting/video', + 'http://openid.net/schema/media/biography', + 'http://openid.net/schema/media/image', + 'http://openid.net/schema/media/image/16x16', + 'http://openid.net/schema/media/image/32x32', + 'http://openid.net/schema/media/image/48x48', + 'http://openid.net/schema/media/image/64x64', + 'http://openid.net/schema/media/image/80x80', + 'http://openid.net/schema/media/image/128x128', + 'http://openid.net/schema/media/image/160x120', + 'http://openid.net/schema/media/image/320x240', + 'http://openid.net/schema/media/image/640x480', + 'http://openid.net/schema/media/image/120x160', + 'http://openid.net/schema/media/image/240x320', + 'http://openid.net/schema/media/image/480x640', + 'http://openid.net/schema/media/image/favicon', + 'http://openid.net/schema/timezone' ); return $identifiers; -} +} \ No newline at end of file