diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-07-21 17:37:10 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-07-21 17:37:10 +0200 |
commit | f9d33888544ac8abdaf287cc8d558d057de01720 (patch) | |
tree | dafc4ebff833be164ea6db5e06f992ec4f5f0e67 /apps/contacts/appinfo | |
parent | d49b789348315be677e66593eaca43e0e399d3da (diff) | |
parent | 57207ddb82875f7e3e36b0dfb2811ab161a0f08c (diff) | |
download | nextcloud-server-f9d33888544ac8abdaf287cc8d558d057de01720.tar.gz nextcloud-server-f9d33888544ac8abdaf287cc8d558d057de01720.zip |
Merge branch 'master' into calendar_import
Diffstat (limited to 'apps/contacts/appinfo')
-rw-r--r-- | apps/contacts/appinfo/app.php | 2 | ||||
-rw-r--r-- | apps/contacts/appinfo/database.xml | 4 | ||||
-rw-r--r-- | apps/contacts/appinfo/migrate.php | 15 | ||||
-rw-r--r-- | apps/contacts/appinfo/remote.php | 4 | ||||
-rw-r--r-- | apps/contacts/appinfo/update.php | 2 | ||||
-rw-r--r-- | apps/contacts/appinfo/version | 2 |
6 files changed, 14 insertions, 15 deletions
diff --git a/apps/contacts/appinfo/app.php b/apps/contacts/appinfo/app.php index 33e89c3e9be..cbbbbc79e58 100644 --- a/apps/contacts/appinfo/app.php +++ b/apps/contacts/appinfo/app.php @@ -19,6 +19,6 @@ OCP\App::addNavigationEntry( array( 'name' => OC_L10N::get('contacts')->t('Contacts') )); -OCP\App::registerPersonal('contacts','settings'); +OCP\App::registerPersonal('contacts', 'settings'); OCP\Util::addscript('contacts', 'loader'); OC_Search::registerProvider('OC_Search_Provider_Contacts'); diff --git a/apps/contacts/appinfo/database.xml b/apps/contacts/appinfo/database.xml index 9b269d765dc..b814b0f1516 100644 --- a/apps/contacts/appinfo/database.xml +++ b/apps/contacts/appinfo/database.xml @@ -44,7 +44,7 @@ <type>text</type> <default></default> <notnull>false</notnull> - <length>100</length> + <length>200</length> </field> <field> @@ -118,7 +118,7 @@ <type>text</type> <default></default> <notnull>false</notnull> - <length>100</length> + <length>200</length> </field> <field> diff --git a/apps/contacts/appinfo/migrate.php b/apps/contacts/appinfo/migrate.php index 02026c5979c..2559b4ea456 100644 --- a/apps/contacts/appinfo/migrate.php +++ b/apps/contacts/appinfo/migrate.php @@ -2,7 +2,7 @@ class OC_Migration_Provider_Contacts extends OC_Migration_Provider{ // Create the xml for the user supplied - function export( ){ + function export( ) { $options = array( 'table'=>'contacts_addressbooks', 'matchcol'=>'userid', @@ -21,9 +21,8 @@ class OC_Migration_Provider_Contacts extends OC_Migration_Provider{ $ids2 = $this->content->copyRows( $options ); // If both returned some ids then they worked - if( is_array( $ids ) && is_array( $ids2 ) ) - { - return true; + if(is_array($ids) && is_array($ids2)) { + return true; } else { return false; } @@ -31,14 +30,14 @@ class OC_Migration_Provider_Contacts extends OC_Migration_Provider{ } // Import function for contacts - function import( ){ - switch( $this->appinfo->version ){ + function import( ) { + switch( $this->appinfo->version ) { default: // All versions of the app have had the same db structure, so all can use the same import function $query = $this->content->prepare( "SELECT * FROM contacts_addressbooks WHERE userid LIKE ?" ); $results = $query->execute( array( $this->olduid ) ); $idmap = array(); - while( $row = $results->fetchRow() ){ + while( $row = $results->fetchRow() ) { // Import each addressbook $addressbookquery = OCP\DB::prepare( "INSERT INTO *PREFIX*contacts_addressbooks (`userid`, `displayname`, `uri`, `description`, `ctag`) VALUES (?, ?, ?, ?, ?)" ); $addressbookquery->execute( array( $this->uid, $row['displayname'], $row['uri'], $row['description'], $row['ctag'] ) ); @@ -48,7 +47,7 @@ class OC_Migration_Provider_Contacts extends OC_Migration_Provider{ OC_Contacts_Addressbook::setActive($idmap[$row['id']], true); } // Now tags - foreach($idmap as $oldid => $newid){ + foreach($idmap as $oldid => $newid) { $query = $this->content->prepare( "SELECT * FROM contacts_cards WHERE addressbookid LIKE ?" ); $results = $query->execute( array( $oldid ) ); diff --git a/apps/contacts/appinfo/remote.php b/apps/contacts/appinfo/remote.php index 09c2de17990..fd5604aec6f 100644 --- a/apps/contacts/appinfo/remote.php +++ b/apps/contacts/appinfo/remote.php @@ -22,7 +22,7 @@ OCP\App::checkAppEnabled('contacts'); -if(substr($_SERVER["REQUEST_URI"],0,strlen(OC_App::getAppWebPath('contacts').'/carddav.php')) == OC_App::getAppWebPath('contacts').'/carddav.php'){ +if(substr($_SERVER["REQUEST_URI"], 0, strlen(OC_App::getAppWebPath('contacts').'/carddav.php')) == OC_App::getAppWebPath('contacts').'/carddav.php') { $baseuri = OC_App::getAppWebPath('contacts').'/carddav.php'; } @@ -45,7 +45,7 @@ $nodes = array( $server = new Sabre_DAV_Server($nodes); $server->setBaseUri($baseuri); // Add plugins -$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud')); +$server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend, 'ownCloud')); $server->addPlugin(new Sabre_CardDAV_Plugin()); $server->addPlugin(new Sabre_DAVACL_Plugin()); $server->addPlugin(new Sabre_DAV_Browser_Plugin(false)); // Show something in the Browser, but no upload diff --git a/apps/contacts/appinfo/update.php b/apps/contacts/appinfo/update.php index 873899f578b..21e736bb446 100644 --- a/apps/contacts/appinfo/update.php +++ b/apps/contacts/appinfo/update.php @@ -1,7 +1,7 @@ <?php $installedVersion=OCP\Config::getAppValue('contacts', 'installed_version'); -if (version_compare($installedVersion, '0.2.90', '<')) { +if (version_compare($installedVersion, '0.2.3', '<')) { // First set all address books in-active. $stmt = OCP\DB::prepare( 'UPDATE *PREFIX*contacts_addressbooks SET active=0' ); $result = $stmt->execute(array()); diff --git a/apps/contacts/appinfo/version b/apps/contacts/appinfo/version index 373f8c6f073..72f9fa82020 100644 --- a/apps/contacts/appinfo/version +++ b/apps/contacts/appinfo/version @@ -1 +1 @@ -0.2.3
\ No newline at end of file +0.2.4
\ No newline at end of file |