add bookmarks api and iimports, bugfixes

This commit is contained in:
Joey Kimsey
2024-12-07 01:55:13 -05:00
parent dcffa0a7fb
commit 755646ba30
10 changed files with 256 additions and 42 deletions

View File

@ -25,6 +25,7 @@ class BookmarksForms extends Forms {
self::addHandler( 'createFolder', __CLASS__, 'createFolder' );
self::addHandler( 'editBookmark', __CLASS__, 'editBookmark' );
self::addHandler( 'editFolder', __CLASS__, 'editFolder' );
self::addHandler( 'importBookmarks', __CLASS__, 'importBookmarks' );
}
public static function createBookmark() {
@ -117,6 +118,29 @@ class BookmarksForms extends Forms {
// }
return true;
}
public static function importBookmarks() {
if ( ! Input::exists( 'submit' ) ) {
return false;
}
// if ( ! Input::exists( 'title' ) ) {
// Check::addUserError( 'You must include a title.' );
// return false;
// }
// if ( ! Input::exists( 'color' ) ) {
// Check::addUserError( 'You must include a color.' );
// return false;
// }
// if ( ! Input::exists( 'privacy' ) ) {
// Check::addUserError( 'You must include a privacy.' );
// return false;
// }
// if ( !self::token() ) {
// Check::addUserError( 'token - comment out later.' );
// return false;
// }
return true;
}
}
new BookmarksForms;