many fixes and updates
This commit is contained in:
@ -27,6 +27,8 @@ class BookmarksForms extends Forms {
|
||||
self::addHandler( 'editFolder', __CLASS__, 'editFolder' );
|
||||
self::addHandler( 'importBookmarks', __CLASS__, 'importBookmarks' );
|
||||
self::addHandler( 'exportBookmarks', __CLASS__, 'exportBookmarks' );
|
||||
self::addHandler( 'createDashboard', __CLASS__, 'createDashboard' );
|
||||
self::addHandler( 'editDashboard', __CLASS__, 'editDashboard' );
|
||||
}
|
||||
|
||||
public static function createBookmark() {
|
||||
@ -168,6 +170,44 @@ class BookmarksForms extends Forms {
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function createDashboard() {
|
||||
if ( ! Input::exists( 'submit' ) ) {
|
||||
return false;
|
||||
}
|
||||
if ( ! Input::exists( 'title' ) ) {
|
||||
Check::addUserError( 'You must include a title.' );
|
||||
return false;
|
||||
}
|
||||
if ( ! Input::exists( 'link_order' ) ) {
|
||||
Check::addUserError( 'You must include at least 1 link or folder.' );
|
||||
return false;
|
||||
}
|
||||
if ( !self::token() ) {
|
||||
Check::addUserError( 'There was an issue with your request.' );
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function editDashboard() {
|
||||
if ( ! Input::exists( 'submit' ) ) {
|
||||
return false;
|
||||
}
|
||||
if ( ! Input::exists( 'title' ) ) {
|
||||
Check::addUserError( 'You must include a title.' );
|
||||
return false;
|
||||
}
|
||||
if ( ! Input::exists( 'link_order' ) ) {
|
||||
Check::addUserError( 'You must include at least 1 link or folder.' );
|
||||
return false;
|
||||
}
|
||||
if ( !self::token() ) {
|
||||
Check::addUserError( 'There was an issue with your request.' );
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
new BookmarksForms;
|
Reference in New Issue
Block a user