Returns the notepads that should be used for syncing.
public static getSyncNotepads ( boolean $prune = false ) : array | ||
$prune | boolean | Remove notepads ids from the sync list that no longer exist. The values are pruned *after* the results are passed back to the client to give sync clients a chance to remove their entries. |
return | array | An array of notepad ids. |
/** * Returns a list of available sources. * * @param boolean $writeable If true, limits to writeable sources. * @param boolean $sync_only Only include synchable notepads. * * @return array An array of the available sources. Keys are source IDs, * values are source titles. * @since 4.2.0 */ public function sources($writeable = false, $sync_only = false) { $out = array(); foreach (Mnemo::listNotepads(false, $writeable ? Horde_Perms::EDIT : Horde_Perms::READ) as $key => $val) { $out[$key] = $val->get('name'); } if ($sync_only) { $syncable = Mnemo::getSyncNotepads(); $out = array_intersect_key($out, array_flip($syncable)); } return $out; }