mirror of
https://github.com/owncloud/bookmarks.git
synced 2025-01-18 14:52:10 +01:00
[Bookmark] More style fix
This commit is contained in:
parent
4405797476
commit
8949278e83
@ -31,8 +31,8 @@ require_once 'bookmarksHelper.php';
|
||||
|
||||
// Prep screen if we come from the bookmarklet
|
||||
$url ='';
|
||||
if(isset($_GET['url']) ){
|
||||
$url = $_GET['url'];
|
||||
if(isset($_GET['url'])) {
|
||||
$url = $_GET['url'];
|
||||
}
|
||||
if(!isset($_GET['title']) || trim($_GET['title']) == '') {
|
||||
$datas = getURLMetadata($url);
|
||||
|
@ -11,9 +11,13 @@ OC::$CLASSPATH['OC_Bookmarks_Bookmarks'] = 'apps/bookmarks/lib/bookmarks.php';
|
||||
OC::$CLASSPATH['OC_Search_Provider_Bookmarks'] = 'apps/bookmarks/lib/search.php';
|
||||
|
||||
$l = new OC_l10n('bookmarks');
|
||||
OCP\App::addNavigationEntry( array( 'id' => 'bookmarks_index', 'order' => 70, 'href' => OCP\Util::linkTo( 'bookmarks', 'index.php' ), 'icon' => OCP\Util::imagePath( 'bookmarks', 'bookmarks.png' ), 'name' => $l->t('Bookmarks')));
|
||||
OCP\App::addNavigationEntry( array( 'id' => 'bookmarks_index',
|
||||
'order' => 70, 'href' => OCP\Util::linkTo( 'bookmarks', 'index.php' ),
|
||||
'icon' => OCP\Util::imagePath( 'bookmarks', 'bookmarks.png' ),
|
||||
'name' => $l->t('Bookmarks')
|
||||
));
|
||||
|
||||
OCP\App::registerPersonal('bookmarks', 'settings');
|
||||
OCP\Util::addscript('bookmarks','bookmarksearch');
|
||||
OCP\Util::addscript('bookmarks', 'bookmarksearch');
|
||||
|
||||
OC_Search::registerProvider('OC_Search_Provider_Bookmarks');
|
||||
|
@ -21,8 +21,7 @@ class OC_Migration_Provider_Bookmarks extends OC_Migration_Provider{
|
||||
$ids2 = $this->content->copyRows( $options );
|
||||
|
||||
// If both returned some ids then they worked
|
||||
if( is_array( $ids ) && is_array( $ids2 ) )
|
||||
{
|
||||
if( is_array( $ids ) && is_array( $ids2 ) ) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@ -39,9 +38,14 @@ class OC_Migration_Provider_Bookmarks extends OC_Migration_Provider{
|
||||
$results = $query->execute( array( $this->olduid ) );
|
||||
$idmap = array();
|
||||
while( $row = $results->fetchRow() ) {
|
||||
// Import each bookmark, saving its id into the map
|
||||
$query = OCP\DB::prepare( "INSERT INTO `*PREFIX*bookmarks`(`url`, `title`, `user_id`, `public`, `added`, `lastmodified`) VALUES (?, ?, ?, ?, ?, ?)" );
|
||||
$query->execute( array( $row['url'], $row['title'], $this->uid, $row['public'], $row['added'], $row['lastmodified'] ) );
|
||||
// Import each bookmark, saving its id into the map
|
||||
$sql = "INSERT INTO `*PREFIX*bookmarks`
|
||||
(`url`, `title`, `user_id`, `public`, `added`, `lastmodified`) VALUES (?, ?, ?, ?, ?, ?)" ;
|
||||
$query = OCP\DB::prepare($sql;
|
||||
$query->execute(array(
|
||||
$row['url'], $row['title'], $this->uid, $row['public'],
|
||||
$row['added'], $row['lastmodified']
|
||||
) );
|
||||
// Map the id
|
||||
$idmap[$row['id']] = OCP\DB::insertid();
|
||||
}
|
||||
@ -56,7 +60,7 @@ class OC_Migration_Provider_Bookmarks extends OC_Migration_Provider{
|
||||
}
|
||||
}
|
||||
// All done!
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user