--- /dev/null
+====================================
+ Kolab_Format Development TODO List
+====================================
+
+ - Find a decent way of handling tags within Horde 4
return;
}
- // Create horde category if needed
- if ($this->_create_categories &&
- class_exists('Horde_Prefs_CategoryManager') &&
- isset($prefs) && $prefs instanceof Horde_Prefs) {
- $cManager = new Horde_Prefs_CategoryManager();
- $horde_categories = $cManager->get();
- } else {
- $cManager = null;
- $horde_categories = null;
- }
-
$kolab_categories = explode(',', $object['categories']);
$primary_category = '';
$kolab_category = trim($kolab_category);
$valid_category = true;
- if ($cManager &&
- array_search($kolab_category, $horde_categories) === false) {
- // Unknown category -> Add
- if ($cManager->add($kolab_category) === false) {
- // categories might be locked
- $valid_category = false;
- }
- }
// First valid category becomes primary category
if ($valid_category && empty($primary_category)) {
*/
public function testCategoriesWithPrefs()
{
- global $registry, $prefs;
-
if (class_exists('Horde_Prefs')) {
- $registry = new DummyRegistry();
- $prefs = Horde_Prefs::singleton('Session');
-
/* Monkey patch to allw the value to be set. */
$prefs->_prefs['categories'] = array('v' => '');
. '/fixtures/contact_category.xml');
$object = $contact->load($xml);
$this->assertContains('Test', $object['categories']);
- $this->assertEquals('Test', $prefs->getValue('categories'));
}
}