From: Michael M Slusarz Date: Fri, 31 Jul 2009 05:13:53 +0000 (-0600) Subject: Various Horde 4 fixes X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0395936f19ae533fdc096354b5b358da57ae8036;p=horde.git Various Horde 4 fixes --- diff --git a/ansel/browse.php b/ansel/browse.php index 72dd3f85f..265b2dd3f 100644 --- a/ansel/browse.php +++ b/ansel/browse.php @@ -1,7 +1,5 @@ getValue('myansel_layout'))); +$blocks = Horde_Block_Collection::singleton('myphotos', array('ansel')); +$layout = Horde_Block_Layout_Manager::singleton('myphotos', $blocks, @unserialize($prefs->getValue('myansel_layout'))); // Handle requested actions. $layout->handle(Horde_Util::getFormData('action'), diff --git a/ansel/config/conf.xml b/ansel/config/conf.xml index 7326e0309..dd587c3f0 100644 --- a/ansel/config/conf.xml +++ b/ansel/config/conf.xml @@ -1,5 +1,4 @@ - diff --git a/ansel/config/hooks.php.dist b/ansel/config/hooks.php.dist index 761c4ef02..1262313ad 100644 --- a/ansel/config/hooks.php.dist +++ b/ansel/config/hooks.php.dist @@ -5,15 +5,13 @@ * THE HOOKS PROVIDED IN THIS FILE ARE EXAMPLES ONLY. DO NOT ENABLE THEM * BLINDLY IF YOU DO NOT KNOW WHAT YOU ARE DOING. YOU HAVE TO CUSTOMIZE THEM * TO MATCH YOUR SPECIFIC NEEDS AND SYSTEM ENVIRONMENT. - * - * $Horde: ansel/config/hooks.php.dist,v 1.8 2009/07/27 14:52:51 mrubinsk Exp $ */ class Ansel_Hooks { /** * Here is an example _ansel_hook_user_age(). is called to get the user age - * when he/she tries to view an age limited content. This function must + * when he/she tries to view an age limited content. This function must * return an integer value of user age */ // function user_age() diff --git a/ansel/config/prefs.php.dist b/ansel/config/prefs.php.dist index 73b775b0d..4901d6077 100644 --- a/ansel/config/prefs.php.dist +++ b/ansel/config/prefs.php.dist @@ -1,7 +1,5 @@ _("Which EXIF fields should we automatically add as photo tags during upload?"), 'enum' => array('DateTimeOriginal' => _("Date Photo Taken"), 'ExposureTime' => _("Exposure Time")) -); \ No newline at end of file +); diff --git a/ansel/config/styles.php.dist b/ansel/config/styles.php.dist index 2e827cfb0..9fe03c3a9 100644 --- a/ansel/config/styles.php.dist +++ b/ansel/config/styles.php.dist @@ -1,7 +1,5 @@ getGallery($vars->get('gallery')); diff --git a/ansel/edit_dates.php b/ansel/edit_dates.php index f729e939e..1c8ddf718 100644 --- a/ansel/edit_dates.php +++ b/ansel/edit_dates.php @@ -1,7 +1,5 @@ */ -@define('ANSEL_BASE', dirname(__FILE__)); -require_once ANSEL_BASE . '/lib/base.php'; +require_once dirname(__FILE__) . '/lib/base.php'; $images = Horde_Util::getFormData('image', array()); $actionID = Horde_Util::getFormData('actionID'); @@ -59,7 +56,6 @@ if ($actionID == 'edit_dates') { continue; } } - require_once 'Horde/Date.php'; $newDate = new Horde_Date($vars->get('image_originalDate')); $image->originalDate = (int)$newDate->timestamp(); $image->save(); diff --git a/ansel/faces/custom.php b/ansel/faces/custom.php index 65b725b83..95fdc0f9c 100644 --- a/ansel/faces/custom.php +++ b/ansel/faces/custom.php @@ -64,7 +64,6 @@ $width = $y2 - $y1; $title = _("Create a new face"); -Horde::addScriptFile('prototype.js', 'horde', true); Horde::addScriptFile('builder.js'); Horde::addScriptFile('effects.js', 'horde', true); Horde::addScriptFile('controls.js', 'horde', true); diff --git a/ansel/faces/gallery.php b/ansel/faces/gallery.php index abf85ad07..36909c3a6 100644 --- a/ansel/faces/gallery.php +++ b/ansel/faces/gallery.php @@ -48,7 +48,6 @@ $pager = new Horde_UI_Pager( $pager->preserve('gallery', $gallery_id); $title = sprintf(_("Searching for faces in %s"), Horde::link(Ansel::getUrlFor('view', array('gallery' => $gallery_id, 'view' => 'Gallery'))) . $gallery->get('name') . ''); -Horde::addScriptFile('prototype.js', 'horde', true); Horde::addScriptFile('stripe.js', 'horde', true); require ANSEL_TEMPLATES . '/common-header.inc'; require ANSEL_TEMPLATES . '/menu.inc'; diff --git a/ansel/faces/search/all.php b/ansel/faces/search/all.php index bf1e6b6af..332b36a70 100644 --- a/ansel/faces/search/all.php +++ b/ansel/faces/search/all.php @@ -2,8 +2,6 @@ /** * Process an single image (to be called by ajax) * - * $Horde: ansel/faces/search/all.php,v 1.5 2009/06/10 00:33:02 mrubinsk Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you diff --git a/ansel/faces/search/image.php b/ansel/faces/search/image.php index cc54b7349..9cfe65115 100644 --- a/ansel/faces/search/image.php +++ b/ansel/faces/search/image.php @@ -2,8 +2,6 @@ /** * Process an single image (to be called by ajax) * - * $Horde: ansel/faces/search/image.php,v 1.11 2009/07/08 18:28:41 slusarz Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -76,4 +74,4 @@ if (empty($name)) { } } -require $registry->get('templates', 'horde') . '/common-footer.inc'; \ No newline at end of file +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/ansel/faces/search/image_define.php b/ansel/faces/search/image_define.php index c083f8143..35f60f688 100644 --- a/ansel/faces/search/image_define.php +++ b/ansel/faces/search/image_define.php @@ -2,8 +2,6 @@ /** * Process an single image (to be called by ajax) * - * $Horde: ansel/faces/search/image_define.php,v 1.8 2009/07/08 18:28:41 slusarz Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -48,7 +46,6 @@ if (count($faces) > 1) { $height = $x2 - $x1; $width = $y2 - $y1; -Horde::addScriptFile('prototype.js', 'horde', true); Horde::addScriptFile('scriptaculous.js', 'horde', true); Horde::addScriptFile('builder.js', 'ansel', true); Horde::addScriptFile('cropper.js', 'ansel', true); @@ -58,4 +55,4 @@ require ANSEL_TEMPLATES . '/common-header.inc'; require ANSEL_TEMPLATES . '/menu.inc'; require ANSEL_TEMPLATES . '/faces/define.inc'; -require $registry->get('templates', 'horde') . '/common-footer.inc'; \ No newline at end of file +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/ansel/faces/search/image_save.php b/ansel/faces/search/image_save.php index 08e8e1d38..c34e4f16c 100644 --- a/ansel/faces/search/image_save.php +++ b/ansel/faces/search/image_save.php @@ -2,8 +2,6 @@ /** * Process an single image * - * $Horde: ansel/faces/search/image_save.php,v 1.12 2009/07/08 18:28:41 slusarz Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -82,4 +80,4 @@ if (file_put_contents($path, $signature)) { $notification->push(_("Cannot save photo signature")); header('Location: ' . Horde::applicationUrl('faces/search/image.php')); -exit; \ No newline at end of file +exit; diff --git a/ansel/faces/search/image_search.php b/ansel/faces/search/image_search.php index 52a2f74be..d3775ffee 100644 --- a/ansel/faces/search/image_search.php +++ b/ansel/faces/search/image_search.php @@ -2,8 +2,6 @@ /** * Image search * - * $Horde: ansel/faces/search/image_search.php,v 1.6 2009/07/08 18:28:41 slusarz Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -50,4 +48,4 @@ $pager = new Horde_UI_Pager( require ANSEL_TEMPLATES . '/common-header.inc'; require ANSEL_TEMPLATES . '/menu.inc'; require ANSEL_TEMPLATES . '/faces/search.inc'; -require $registry->get('templates', 'horde') . '/common-footer.inc'; \ No newline at end of file +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/ansel/faces/search/img.php b/ansel/faces/search/img.php index 8d6cb5798..2590b7f59 100644 --- a/ansel/faces/search/img.php +++ b/ansel/faces/search/img.php @@ -2,8 +2,6 @@ /** * Process an single image (to be called by ajax) * - * $Horde: ansel/faces/search/img.php,v 1.8 2009/07/08 18:28:41 slusarz Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -23,4 +21,4 @@ $tmp = Horde::getTempDir(); $path = $tmp . '/search_face_' . ($thumb ? 'thumb_' : '') . Horde_Auth::getAuth() . Ansel_Faces::getExtension(); header('Content-type: image/' . $conf['image']['type']); -readfile($path); \ No newline at end of file +readfile($path); diff --git a/ansel/faces/search/name.php b/ansel/faces/search/name.php index 6232782f0..6c10f09a5 100644 --- a/ansel/faces/search/name.php +++ b/ansel/faces/search/name.php @@ -2,8 +2,6 @@ /** * Process an single image (to be called by ajax) * - * $Horde: ansel/faces/search/name.php,v 1.4 2009/06/10 00:33:02 mrubinsk Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -48,4 +46,4 @@ require ANSEL_TEMPLATES . '/menu.inc'; include ANSEL_TEMPLATES . '/faces/faces.inc'; -require $registry->get('templates', 'horde') . '/common-footer.inc'; \ No newline at end of file +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/ansel/faces/search/named.php b/ansel/faces/search/named.php index fee95b60a..3bae6979b 100644 --- a/ansel/faces/search/named.php +++ b/ansel/faces/search/named.php @@ -2,8 +2,6 @@ /** * Show all named faces. * - * $Horde: ansel/faces/search/named.php,v 1.5 2009/06/10 00:33:02 mrubinsk Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you diff --git a/ansel/faces/search/owner.php b/ansel/faces/search/owner.php index cf3e97d68..715efaf78 100644 --- a/ansel/faces/search/owner.php +++ b/ansel/faces/search/owner.php @@ -2,8 +2,6 @@ /** * Process an single image (to be called by ajax) * - * $Horde: ansel/faces/search/owner.php,v 1.6 2009/07/08 18:28:41 slusarz Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -44,4 +42,4 @@ require ANSEL_TEMPLATES . '/menu.inc'; include ANSEL_TEMPLATES . '/faces/faces.inc'; -require $registry->get('templates', 'horde') . '/common-footer.inc'; \ No newline at end of file +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/ansel/gallery.php b/ansel/gallery.php index 6656f7254..0b4fbe90a 100644 --- a/ansel/gallery.php +++ b/ansel/gallery.php @@ -1,7 +1,5 @@ */ -@define('ANSEL_BASE', dirname(__FILE__) . '/..'); -require_once ANSEL_BASE . '/lib/base.php'; +require_once dirname(__FILE__) . '/../lib/base.php'; $galleryId = Horde_Util::getFormData('gallery'); if (!$galleryId) { diff --git a/ansel/gallery/delete.php b/ansel/gallery/delete.php index 243e8b4f3..b94e7e4c8 100644 --- a/ansel/gallery/delete.php +++ b/ansel/gallery/delete.php @@ -1,7 +1,5 @@ */ -@define('ANSEL_BASE', dirname(__FILE__) . '/..'); -require_once ANSEL_BASE . '/lib/base.php'; +require_once dirname(__FILE__) . '/../lib/base.php'; // Delete/empty the gallery if we're provided with a valid galleryId. $actionID = Horde_Util::getPost('action'); @@ -69,4 +66,4 @@ if ($galleryId) { true)); exit; } -} \ No newline at end of file +} diff --git a/ansel/gallery/sort.php b/ansel/gallery/sort.php index 2187c293e..66129bab6 100644 --- a/ansel/gallery/sort.php +++ b/ansel/gallery/sort.php @@ -1,7 +1,5 @@ */ -@define('ANSEL_BASE', dirname(__FILE__) . '/..'); -require_once ANSEL_BASE . '/lib/base.php'; +require_once dirname(__FILE__) . '/../lib/base.php'; /* If we aren't provided with a gallery, redirect to the gallery * list. */ @@ -58,7 +55,6 @@ case 'Sort': exit; } -Horde::addScriptFile('prototype.js', 'horde', true); Horde::addScriptFile('effects.js', 'horde', true); Horde::addScriptFile('dragdrop.js', 'horde', true); $title = sprintf(_("%s :: Sort"), $gallery->get('name')); diff --git a/ansel/group.php b/ansel/group.php index 0d13ed92e..621f6ed07 100644 --- a/ansel/group.php +++ b/ansel/group.php @@ -1,7 +1,5 @@ */ -@define('ANSEL_BASE', dirname(__FILE__)); -require_once ANSEL_BASE . '/lib/base.php'; +require_once dirname(__FILE__) . '/lib/base.php'; // check for grouping $groupby = basename(Horde_Util::getFormData('groupby', $prefs->getValue('groupby'))); @@ -71,7 +68,6 @@ default: } // Set up pager. -require_once 'Horde/UI/Pager.php'; $vars = Horde_Variables::getDefaultVariables(); $group_pager = new Horde_UI_Pager('gbpage', $vars, array('num' => $num_groups, diff --git a/ansel/image.php b/ansel/image.php index 0a9692da2..db64b0f3e 100644 --- a/ansel/image.php +++ b/ansel/image.php @@ -3,8 +3,6 @@ * Responsible for making changes to image properties as well as making, * previewing and saving changes to the image. * - * $Horde: ansel/image.php,v 1.176 2009/07/08 18:28:40 slusarz Exp $ - * * Copyright 2003-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -14,8 +12,7 @@ * @author Michael J. Rubinsky */ -@define('ANSEL_BASE', dirname(__FILE__)); -require_once ANSEL_BASE . '/lib/base.php'; +require_once dirname(__FILE__) . '/lib/base.php'; require_once 'Horde/Form/Renderer.php'; /* Get all the form data */ @@ -32,7 +29,7 @@ $date = Ansel::getDateParameter(); /* Are we watermarking the image? */ if ($watermark) { require_once 'Horde/Identity.php'; - $identity = &Identity::singleton(); + $identity = Identity::singleton(); $name = $identity->getValue('fullname'); if (empty($name)) { $name = Horde_Auth::getAuth(); @@ -213,7 +210,6 @@ case 'save': $image->caption = $vars->get('image_desc'); $image->setTags(explode(',' , $vars->get('image_tags'))); - require_once 'Horde/Date.php'; $newDate = new Horde_Date($vars->get('image_originalDate')); $image->originalDate = (int)$newDate->timestamp(); @@ -319,7 +315,6 @@ case 'resizeedit': $y2 = $geometry['height']; /* js and css files */ - Horde::addScriptFile('prototype.js'); Horde::addScriptFile('builder.js'); Horde::addScriptFile('effects.js', 'horde', true); Horde::addScriptFile('controls.js', 'horde', true); @@ -330,7 +325,6 @@ case 'resizeedit': /* js and css files */ // TODO: Combine these cases $geometry = $image->getDimensions('full'); - Horde::addScriptFile('prototype.js'); Horde::addScriptFile('builder.js'); Horde::addScriptFile('effects.js', 'horde', true); Horde::addScriptFile('slider.js', 'horde', true); diff --git a/ansel/img/download.php b/ansel/img/download.php index bea925283..fab3bad79 100644 --- a/ansel/img/download.php +++ b/ansel/img/download.php @@ -1,7 +1,5 @@ hasFeature('rte')) { - require_once 'Horde/Editor.php'; $editor = Horde_Editor::factory('xinha', array('id' => 'ecard_comments')); $vars->set('rtemode', 1); $form->addHidden('', 'rtemode', 'text', false); diff --git a/ansel/img/full.php b/ansel/img/full.php index cb60ff2f0..3d4a93dbd 100644 --- a/ansel/img/full.php +++ b/ansel/img/full.php @@ -1,7 +1,5 @@ validate($vars)) { filesize($info['file' . $i]['file'])) { /* Check for a compressed file. */ - require_once 'Horde/Mime/Magic.php'; if (in_array($info['file' . $i]['type'], array('x-extension/zip', 'application/x-compressed', @@ -112,7 +109,6 @@ if ($form->validate($vars)) { $data = file_get_contents($info['file' . $i]['file']); /* Get the list of files in the zipfile. */ - require_once 'Horde/Compress.php'; $zip = Horde_Compress::factory('zip'); $files = $zip->decompress($data, array('action' => Horde_Compress::ZIP_LIST)); diff --git a/ansel/img/upload_preview.php b/ansel/img/upload_preview.php index d8fe9ebf6..2282a6c35 100644 --- a/ansel/img/upload_preview.php +++ b/ansel/img/upload_preview.php @@ -1,7 +1,5 @@ diff --git a/ansel/lib/Ajax/Imple/GallerySlugCheck.php b/ansel/lib/Ajax/Imple/GallerySlugCheck.php index b4717c1f1..2b3a6e9ad 100644 --- a/ansel/lib/Ajax/Imple/GallerySlugCheck.php +++ b/ansel/lib/Ajax/Imple/GallerySlugCheck.php @@ -13,7 +13,6 @@ class Ansel_Ajax_Imple_GallerySlugCheck extends Horde_Ajax_Imple_Base public function attach() { // Include the js - Horde::addScriptFile('prototype.js', 'horde'); Horde::addScriptFile('slugcheck.js'); $url = $this->_getUrl('GallerySlugCheck', 'ansel', array('input' => 'slug')); diff --git a/ansel/lib/Ajax/Imple/LocationAutoCompleter.php b/ansel/lib/Ajax/Imple/LocationAutoCompleter.php index bb46145e4..ec69f66c8 100644 --- a/ansel/lib/Ajax/Imple/LocationAutoCompleter.php +++ b/ansel/lib/Ajax/Imple/LocationAutoCompleter.php @@ -25,7 +25,6 @@ class Ansel_Ajax_Imple_LocationAutoCompleter extends Horde_Ajax_Imple_Base public function attach() { - Horde::addScriptFile('prototype.js', 'horde', true); Horde::addScriptFile('autocomplete.js', 'horde', true); Horde::addScriptFile('effects.js', 'horde', true); diff --git a/ansel/lib/Ajax/Imple/TagActions.php b/ansel/lib/Ajax/Imple/TagActions.php index 34bb4a574..36d561f1b 100644 --- a/ansel/lib/Ajax/Imple/TagActions.php +++ b/ansel/lib/Ajax/Imple/TagActions.php @@ -13,7 +13,6 @@ class Ansel_Ajax_Imple_TagActions extends Horde_Ajax_Imple_Base public function attach() { // Include the js - Horde::addScriptFile('prototype.js', 'horde'); Horde::addScriptFile('tagactions.js'); $url = $this->_getUrl('TagActions', 'ansel', array('input' => 'tags', diff --git a/ansel/lib/Ajax/Imple/ToggleGalleryActions.php b/ansel/lib/Ajax/Imple/ToggleGalleryActions.php index 9f019cd15..260cb12d5 100644 --- a/ansel/lib/Ajax/Imple/ToggleGalleryActions.php +++ b/ansel/lib/Ajax/Imple/ToggleGalleryActions.php @@ -13,7 +13,6 @@ class Ansel_Ajax_Imple_ToggleGalleryActions extends Horde_Ajax_Imple_Base public function attach() { // Include the js - Horde::addScriptFile('prototype.js', 'horde'); Horde::addScriptFile('togglewidget.js'); $url = $this->_getUrl('ToggleGalleryActions', 'ansel', array('input' => 'pref_value', 'sessionWrite' => true)); diff --git a/ansel/lib/Ajax/Imple/ToggleOtherGalleries.php b/ansel/lib/Ajax/Imple/ToggleOtherGalleries.php index 885c8d6c0..3ceacede2 100644 --- a/ansel/lib/Ajax/Imple/ToggleOtherGalleries.php +++ b/ansel/lib/Ajax/Imple/ToggleOtherGalleries.php @@ -13,7 +13,6 @@ class Ansel_Ajax_Imple_ToggleOtherGalleries extends Horde_Ajax_Imple_Base public function attach() { // Include the js - Horde::addScriptFile('prototype.js', 'horde'); Horde::addScriptFile('togglewidget.js'); $url = $this->_getUrl('ToggleOtherGalleries', 'ansel', array('input' => 'pref_value', 'sessionWrite' => true)); diff --git a/ansel/lib/Ansel.php b/ansel/lib/Ansel.php index 5157a9b21..cea2ba0f5 100644 --- a/ansel/lib/Ansel.php +++ b/ansel/lib/Ansel.php @@ -1,7 +1,5 @@ listGalleries($perm, $attributes, $parent, $allLevels, $from, $count); $tree = Horde_Tree::factory('gallery_tree', 'select'); @@ -254,7 +249,6 @@ class Ansel { !is_a($i, 'PEAR_Error') && $g->get('view_mode') == 'Date') { - require_once 'Horde/Date.php'; $imgDate = new Horde_Date($i->originalDate); $data['year'] = $imgDate->year; $data['month'] = $imgDate->month; @@ -521,7 +515,6 @@ class Ansel { function getImageObject($params = array()) { global $conf; - require_once 'Horde/Image.php'; $context = array('tmpdir' => Horde::getTempDir()); if (!empty($conf['image']['convert'])) { $context['convert'] = $conf['image']['convert']; @@ -551,7 +544,6 @@ class Ansel { global $conf; // Get the mime type of the file (and make sure it's an image). - require_once 'Horde/Mime/Magic.php'; $mime_type = Horde_Mime_Magic::analyzeFile($file, isset($conf['mime']['magic_db']) ? $conf['mime']['magic_db'] : null); if (strpos($mime_type, 'image') === false) { return PEAR::raiseError(sprintf(_("Can't get unknown file type \"%s\"."), $file)); @@ -715,13 +707,13 @@ class Ansel { if ($owner == Horde_Auth::getAuth()) { $owner_title = _("My Galleries"); } elseif (!empty($GLOBALS['conf']['gallery']['customlabel'])) { - $uprefs = &Prefs::singleton($GLOBALS['conf']['prefs']['driver'], - 'ansel', - $owner, '', null, false); + $uprefs = Prefs::singleton($GLOBALS['conf']['prefs']['driver'], + 'ansel', + $owner, '', null, false); $fullname = $uprefs->getValue('grouptitle'); if (!$fullname) { require_once 'Horde/Identity.php'; - $identity = &Identity::singleton('none', $owner); + $identity = Identity::singleton('none', $owner); $fullname = $identity->getValue('fullname'); if (!$fullname) { $fullname = $owner; @@ -1494,7 +1486,7 @@ class Ansel_Gallery extends Horde_Share_Object_sql_hierarchical { function getOwner() { require_once 'Horde/Identity.php'; - $identity = &Identity::singleton('none', $this->data['share_owner']); + $identity = Identity::singleton('none', $this->data['share_owner']); return $identity; } @@ -1743,7 +1735,6 @@ class Ansel_Gallery extends Horde_Share_Object_sql_hierarchical { * Returns this gallery's tags. */ function getTags() { - require_once ANSEL_BASE . '/lib/Tags.php'; if ($this->hasPermission(Horde_Auth::getAuth(), PERMS_READ)) { return Ansel_Tags::readTags($this->id, 'gallery'); } else { @@ -1758,7 +1749,6 @@ class Ansel_Gallery extends Horde_Share_Object_sql_hierarchical { */ function setTags($tags) { - require_once ANSEL_BASE . '/lib/Tags.php'; if ($this->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)) { return Ansel_Tags::writeTags($this->id, $tags, 'gallery'); } else { @@ -2156,7 +2146,6 @@ class Ansel_Image { if ($view == 'full' && $this->type) { $type = strpos($this->type, '/') === false ? 'image/' . $this->type : $this->type; - require_once 'Horde/Mime/Magic.php'; if ($ext = Horde_Mime_Magic::mimeToExt($type)) { $vfsname .= '.' . $ext; } @@ -2535,8 +2524,6 @@ class Ansel_Image { */ function _exifToTags($fields = array()) { - require_once 'Horde/Date.php'; - $tags = array(); foreach ($fields as $field) { if (!empty($this->_exif[$field])) { @@ -2734,7 +2721,6 @@ class Ansel_Image { $filename = $this->filename; if ($view != 'full') { - require_once 'Horde/Mime/Magic.php'; if ($ext = Horde_Mime_Magic::mimeToExt('image/' . $conf['image']['type'])) { $filename .= '.' . $ext; } @@ -2864,7 +2850,7 @@ class Ansel_Image { if (empty($watermark)) { require_once 'Horde/Identity.php'; - $identity = &Identity::singleton(); + $identity = Identity::singleton(); $name = $identity->getValue('fullname'); if (empty($name)) { $name = Horde_Auth::getAuth(); @@ -2923,7 +2909,6 @@ class Ansel_Image { if (count($this->_tags)) { return $this->_tags; } - require_once ANSEL_BASE . '/lib/Tags.php'; $gallery = $ansel_storage->getGallery($this->gallery); if (is_a($gallery, 'PEAR_Error')) { return $gallery; @@ -2950,8 +2935,6 @@ class Ansel_Image { { global $ansel_storage; - require_once ANSEL_BASE . '/lib/Tags.php'; - $gallery = $ansel_storage->getGallery(abs($this->gallery)); if ($gallery->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT)) { // Clear the local cache. @@ -2975,8 +2958,6 @@ class Ansel_Image { function getTile($parent = null, $style = null, $mini = false, $params = array()) { - require_once ANSEL_BASE . '/lib/Tile/Image.php'; - if (!is_null($parent) && is_null($style)) { $style = $parent->getStyle(); } else { @@ -3219,7 +3200,7 @@ class Ansel_Storage { if ($perms) { require_once 'Horde/Group.php'; - $groups = &Group::singleton(); + $groups = Group::singleton(); $group_list = $groups->getGroupMemberships(Horde_Auth::getAuth()); if (!is_a($group_list, 'PEAR_Error') && count($group_list)) { foreach ($group_list as $group_id => $group_name) { @@ -3660,8 +3641,6 @@ class Ansel_Storage { */ function listCategories($perm = PERMS_SHOW, $from = 0, $count = 0) { - require_once 'Horde/Array.php'; - $sql = 'SELECT DISTINCT attribute_category FROM ' . $this->shares->_table; $results = $this->shares->_db->query($sql); @@ -3840,7 +3819,6 @@ class Ansel_Storage { } if (count($json)) { - require_once 'Horde/Serialize.php'; return Horde_Serialize::serialize($json, Horde_Serialize::JSON, Horde_Nls::getCharset()); } else { return ''; diff --git a/ansel/lib/Block/cloud.php b/ansel/lib/Block/cloud.php index afa4b653f..5b64b40e3 100644 --- a/ansel/lib/Block/cloud.php +++ b/ansel/lib/Block/cloud.php @@ -5,8 +5,6 @@ $block_name = _("Tag Cloud"); /** * Display Tag Cloud * - * $Horde: ansel/lib/Block/cloud.php,v 1.15 2009/01/06 17:48:52 jan Exp $ - * * Copyright 2007-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -35,9 +33,7 @@ class Horde_Block_ansel_cloud extends Horde_Block { function _content() { - require_once 'Horde/UI/TagCloud.php'; require_once dirname(__FILE__) . '/../base.php'; - require_once ANSEL_BASE . '/lib/Tags.php'; global $registry; diff --git a/ansel/lib/Block/gallery.php b/ansel/lib/Block/gallery.php index c59d68296..91e3d41d7 100644 --- a/ansel/lib/Block/gallery.php +++ b/ansel/lib/Block/gallery.php @@ -6,8 +6,6 @@ $block_name = _("Gallery"); * This file provides a selected Ansel gallery through the Horde_Blocks, by * extending the Horde_Blocks class. * - * $Horde: ansel/lib/Block/gallery.php,v 1.56 2009/07/30 18:02:14 mrubinsk Exp $ - * * Copyright 2007-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you diff --git a/ansel/lib/Block/my_galleries.php b/ansel/lib/Block/my_galleries.php index b45a58296..32758b399 100644 --- a/ansel/lib/Block/my_galleries.php +++ b/ansel/lib/Block/my_galleries.php @@ -5,8 +5,6 @@ $block_name = _("My Galleries"); /** * Display summary information on top level galleries. * - * $Horde: ansel/lib/Block/my_galleries.php,v 1.28 2009/07/09 08:17:49 slusarz Exp $ - * * Copyright 2007-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you diff --git a/ansel/lib/Block/random_photo.php b/ansel/lib/Block/random_photo.php index 306f86a32..352bf407d 100644 --- a/ansel/lib/Block/random_photo.php +++ b/ansel/lib/Block/random_photo.php @@ -6,8 +6,6 @@ $block_name = _("Random photo"); * This file provides a random photo through the Horde_Blocks, by extending * the Horde_Blocks class. * - * $Horde: ansel/lib/Block/random_photo.php,v 1.39 2009/07/22 21:08:09 mrubinsk Exp $ - * * Copyright 2003-2007 Duck * * See the enclosed file COPYING for license information (GPL). If you diff --git a/ansel/lib/Block/recent_comments.php b/ansel/lib/Block/recent_comments.php index b57b79bfd..cdf80b2fd 100644 --- a/ansel/lib/Block/recent_comments.php +++ b/ansel/lib/Block/recent_comments.php @@ -8,8 +8,6 @@ if ($GLOBALS['registry']->call('images/hasComments') && /** * Display most recent image comments for galleries. * - * $Horde: ansel/lib/Block/recent_comments.php,v 1.34 2009/07/09 08:17:49 slusarz Exp $ - * * Copyright 2007-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you diff --git a/ansel/lib/Block/recently_added.php b/ansel/lib/Block/recently_added.php index 4c8d6a344..c93fc1ea0 100644 --- a/ansel/lib/Block/recently_added.php +++ b/ansel/lib/Block/recently_added.php @@ -5,8 +5,6 @@ $block_name = _("Recently Added Photos"); /** * Display most recently added images. * - * $Horde: ansel/lib/Block/recently_added.php,v 1.43 2009/07/09 08:17:49 slusarz Exp $ - * * Copyright 2007-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you diff --git a/ansel/lib/Block/recently_added_geodata.php b/ansel/lib/Block/recently_added_geodata.php index d47aa6db5..d2a883a8b 100644 --- a/ansel/lib/Block/recently_added_geodata.php +++ b/ansel/lib/Block/recently_added_geodata.php @@ -5,8 +5,6 @@ $block_name = _("Recently Geotagged"); /** * Display most recently geotagged images. * - * $Horde: ansel/lib/Block/recently_added_geodata.php,v 1.4 2009/07/30 16:19:00 mrubinsk Exp $ - * * Copyright 2007-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -54,7 +52,6 @@ class Horde_Block_ansel_recently_added_geodata extends Horde_Block { { require_once dirname(__FILE__) . '/../base.php'; - Horde::addScriptFile('prototype.js', 'horde'); Horde::addExternalScriptFile('http://maps.google.com/maps?file=api&v=2&sensor=false&key=' . $GLOBALS['conf']['api']['googlemaps'], 'ansel'); Horde::addExternalScriptFile('http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/1.1/src/markermanager.js', 'ansel'); Horde::addScriptFile('googlemap.js'); diff --git a/ansel/lib/Exif.php b/ansel/lib/Exif.php index 27fb8ff27..1f92d2659 100644 --- a/ansel/lib/Exif.php +++ b/ansel/lib/Exif.php @@ -5,8 +5,6 @@ * Works equally well with either the built in php exif functions (if PHP * compiled with exif support) or the (slower) bundled exif library. * - * $Horde: ansel/lib/Exif.php,v 1.58 2009/07/13 14:29:04 mrubinsk Exp $ - * * Copyright 2003-2009 The Horde Project (http://www.horde.org/) * * @author Michael J. Rubinsky diff --git a/ansel/lib/Exif/canon.php b/ansel/lib/Exif/canon.php index f2ec75ce0..250e4c43d 100644 --- a/ansel/lib/Exif/canon.php +++ b/ansel/lib/Exif/canon.php @@ -3,8 +3,6 @@ * Exifer * Extracts EXIF information from digital photos. * - * $Horde: ansel/lib/Exif/canon.php,v 1.11 2008/12/30 22:51:17 mrubinsk Exp $ - * * Copyright 2003 Jake Olefsky * http://www.offsky.com/software/exif/index.php * jake@olefsky.com @@ -529,4 +527,4 @@ function parseCanon($block, &$result, $seek, $globalOffset) $result['SubIFD']['MakerNote'][$tag_name] = $formated_data; } -} \ No newline at end of file +} diff --git a/ansel/lib/Exif/panasonic.php b/ansel/lib/Exif/panasonic.php index e846224c6..bf3412398 100644 --- a/ansel/lib/Exif/panasonic.php +++ b/ansel/lib/Exif/panasonic.php @@ -3,8 +3,6 @@ * Exifer * Extracts EXIF information from digital photos. * - * $Horde: ansel/lib/Exif/panasonic.php,v 1.4 2008/12/30 18:30:25 mrubinsk Exp $ - * * Copyright 2003 Jake Olefsky * http://www.offsky.com/software/exif/index.php * jake@olefsky.com @@ -400,4 +398,4 @@ function parsePanasonic($block, &$result) $result['SubIFD']['MakerNote'][$tag_name] = $formated_data; } -} \ No newline at end of file +} diff --git a/ansel/lib/Forms/Ecard.php b/ansel/lib/Forms/Ecard.php index 155e96d3d..6fc69a373 100644 --- a/ansel/lib/Forms/Ecard.php +++ b/ansel/lib/Forms/Ecard.php @@ -1,14 +1,5 @@ addVariable(_("Use the following return address:"), 'ecard_retaddr', 'text', true); } else { require_once 'Horde/Identity.php'; - $identity = &Identity::singleton(); + $identity = Identity::singleton(); $from_addr = $identity->getDefaultFromAddress(); $vars->set('ecard_retaddr', $from_addr); $this->addHidden('', 'ecard_retaddr', 'text', true); diff --git a/ansel/lib/Forms/Image.php b/ansel/lib/Forms/Image.php index e8cab6aa5..416a16fd0 100644 --- a/ansel/lib/Forms/Image.php +++ b/ansel/lib/Forms/Image.php @@ -1,7 +1,5 @@ */ - -/** Horde_Form **/ -require_once 'Horde/Form.php'; - class ImageForm extends Horde_Form { var $_useFormToken = false; @@ -70,4 +64,4 @@ class ImageForm extends Horde_Form { return round($size, 2) . ' ' . $val; } -} \ No newline at end of file +} diff --git a/ansel/lib/Forms/ImageDate.php b/ansel/lib/Forms/ImageDate.php index e3d99f2fb..a0944fd68 100644 --- a/ansel/lib/Forms/ImageDate.php +++ b/ansel/lib/Forms/ImageDate.php @@ -1,7 +1,5 @@ */ - -/** Horde_Form **/ -require_once 'Horde/Form.php'; - class ImageDateForm extends Horde_Form { var $_useFormToken = false; @@ -34,4 +28,4 @@ class ImageDateForm extends Horde_Form { array('start_year' => 1900)); } -} \ No newline at end of file +} diff --git a/ansel/lib/Forms/Upload.php b/ansel/lib/Forms/Upload.php index 20c8e74ba..d165a300e 100644 --- a/ansel/lib/Forms/Upload.php +++ b/ansel/lib/Forms/Upload.php @@ -1,14 +1,5 @@ */ - -/** Horde_Form **/ -require_once 'Horde/Form.php'; - class WatermarkForm extends Horde_Form { var $_useFormToken = false; @@ -57,4 +51,4 @@ class WatermarkForm extends Horde_Form { $wva->setDefault($prefs->getValue('watermark_vertical')); } -} \ No newline at end of file +} diff --git a/ansel/lib/GalleryMode/Date.php b/ansel/lib/GalleryMode/Date.php index cd1a523c8..1c8f16475 100644 --- a/ansel/lib/GalleryMode/Date.php +++ b/ansel/lib/GalleryMode/Date.php @@ -1,6 +1,7 @@ */ - -/** Horde_Date **/ -require_once 'Horde/Date.php'; - -/** - * Ansel_GalleryMode_Date:: Class for encapsulating gallery methods that - * depend on the current display mode of the gallery being Date. - */ class Ansel_GalleryMode_Date { /** @@ -555,7 +548,6 @@ class Ansel_GalleryMode_Date { /* Clear the image's faces */ if ($image->facesCount) { - require_once ANSEL_BASE . '/lib/Faces.php'; Ansel_Faces::delete($image); } @@ -715,7 +707,6 @@ class Ansel_Gallery_Date { */ function _setModeHelper() { - require_once ANSEL_BASE . '/lib/GalleryMode/Date.php'; $this->_modeHelper = new Ansel_GalleryMode_Date($this); } @@ -788,7 +779,6 @@ class Ansel_Gallery_Date { function getTile($parent = null, $style = null, $mini = false, $params = array()) { - require_once ANSEL_BASE . '/lib/Tile/DateGallery.php'; if (!is_null($parent) && is_null($style)) { $style = $parent->getStyle(); } else { diff --git a/ansel/lib/GalleryMode/Normal.php b/ansel/lib/GalleryMode/Normal.php index 732aa959d..f3ac1b7cb 100644 --- a/ansel/lib/GalleryMode/Normal.php +++ b/ansel/lib/GalleryMode/Normal.php @@ -3,8 +3,6 @@ * Ansel_Gallery_Mode_Normal:: Class for encapsulating gallery methods that * depend on the current display mode of the gallery. * - * $Horde: ansel/lib/GalleryMode/Normal.php,v 1.17 2009/07/17 17:26:40 mrubinsk Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -257,7 +255,6 @@ class Ansel_GalleryMode_Normal { /* Clear the image's faces */ if ($image->facesCount) { - require_once ANSEL_BASE . '/lib/Faces.php'; Ansel_Faces::delete($image); } diff --git a/ansel/lib/GalleryMode/RemoteVimeo.php b/ansel/lib/GalleryMode/RemoteVimeo.php index c4b25e3b6..94245bdf9 100644 --- a/ansel/lib/GalleryMode/RemoteVimeo.php +++ b/ansel/lib/GalleryMode/RemoteVimeo.php @@ -3,8 +3,6 @@ * Ansel_Gallery_Mode_Normal:: Class for encapsulating gallery methods that * depend on the current display mode of the gallery. * - * $Horde: ansel/lib/GalleryMode/Normal.php,v 1.9 2009/01/06 17:48:53 jan Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -256,4 +254,4 @@ class Ansel_GalleryMode_RemoteVimeo { return count($this->_thumbs); } -} \ No newline at end of file +} diff --git a/ansel/lib/ImageView.php b/ansel/lib/ImageView.php index 7e9f67b2c..55d2902d7 100644 --- a/ansel/lib/ImageView.php +++ b/ansel/lib/ImageView.php @@ -2,8 +2,6 @@ /** * Class to abstract the creation of various image views. * - * $Horde: ansel/lib/ImageView.php,v 1.8 2009/01/06 17:48:51 jan Exp $ - * * Copyright 2007-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -15,10 +13,8 @@ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. * * @author Michael J. Rubinsky - * * @package Ansel */ - class Ansel_ImageView { /** @@ -167,4 +163,4 @@ class Ansel_ImageView { return array_reverse($images); } -} \ No newline at end of file +} diff --git a/ansel/lib/ImageView/mini.php b/ansel/lib/ImageView/mini.php index bc9b1661e..705658772 100755 --- a/ansel/lib/ImageView/mini.php +++ b/ansel/lib/ImageView/mini.php @@ -2,8 +2,6 @@ /** * ImageView to create the mini view. * - * $Horde: ansel/lib/ImageView/mini.php,v 1.2 2007/11/14 16:11:27 chuck Exp $ - * * @author Michael J. Rubinsky * @package Ansel */ diff --git a/ansel/lib/ImageView/plainstack.php b/ansel/lib/ImageView/plainstack.php index d2c8edc56..b4bbf1088 100644 --- a/ansel/lib/ImageView/plainstack.php +++ b/ansel/lib/ImageView/plainstack.php @@ -2,8 +2,6 @@ /** * ImageView to create the gallery image stacks. * - * $Horde: ansel/lib/ImageView/plainstack.php,v 1.10 2009/05/27 18:07:28 mrubinsk Exp $ - * * @author Michael J. Rubinsky * @package Ansel */ diff --git a/ansel/lib/ImageView/polaroidstack.php b/ansel/lib/ImageView/polaroidstack.php index 03db508d2..4c0d25199 100644 --- a/ansel/lib/ImageView/polaroidstack.php +++ b/ansel/lib/ImageView/polaroidstack.php @@ -2,8 +2,6 @@ /** * ImageView to create the gallery polaroid stacks. * - * $Horde: ansel/lib/ImageView/polaroidstack.php,v 1.11 2009/05/27 18:07:28 mrubinsk Exp $ - * * @author Michael J. Rubinsky * @package Ansel */ diff --git a/ansel/lib/ImageView/polaroidthumb.php b/ansel/lib/ImageView/polaroidthumb.php index 1de49ffb3..7d4572e8a 100644 --- a/ansel/lib/ImageView/polaroidthumb.php +++ b/ansel/lib/ImageView/polaroidthumb.php @@ -2,8 +2,6 @@ /** * ImageView to create the shadowsharpthumb view (sharp corners, shadowed) * - * $Horde: ansel/lib/ImageView/polaroidthumb.php,v 1.4 2009/05/27 18:07:28 mrubinsk Exp $ - * * @author Michael J. Rubinsky * @package Ansel */ diff --git a/ansel/lib/ImageView/prettythumb.php b/ansel/lib/ImageView/prettythumb.php index 79a2f7ca8..7f3cf7ea0 100644 --- a/ansel/lib/ImageView/prettythumb.php +++ b/ansel/lib/ImageView/prettythumb.php @@ -2,8 +2,6 @@ /** * ImageView to create the prettythumb view (rounded, shadowed thumbnails). * - * $Horde: ansel/lib/ImageView/prettythumb.php,v 1.7 2009/05/27 18:07:28 mrubinsk Exp $ - * * @author Michael J. Rubinsky * @package Ansel */ diff --git a/ansel/lib/ImageView/roundedstack.php b/ansel/lib/ImageView/roundedstack.php index 361fefeac..2a6467212 100644 --- a/ansel/lib/ImageView/roundedstack.php +++ b/ansel/lib/ImageView/roundedstack.php @@ -2,8 +2,6 @@ /** * ImageView to create the gallery image stacks. * - * $Horde: ansel/lib/ImageView/roundedstack.php,v 1.11 2009/05/27 18:07:28 mrubinsk Exp $ - * * @author Michael J. Rubinsky * @package Ansel * diff --git a/ansel/lib/ImageView/screen.php b/ansel/lib/ImageView/screen.php index 0612f4ce7..255cf823c 100755 --- a/ansel/lib/ImageView/screen.php +++ b/ansel/lib/ImageView/screen.php @@ -2,8 +2,6 @@ /** * ImageView to create the screen view - image sized for slideshow view. * - * $Horde: ansel/lib/ImageView/screen.php,v 1.2 2007/11/13 06:24:11 mrubinsk Exp $ - * * @author Michael J. Rubinsky * @package Ansel */ diff --git a/ansel/lib/ImageView/shadowsharpthumb.php b/ansel/lib/ImageView/shadowsharpthumb.php index 6e759c3ad..1b77699d7 100644 --- a/ansel/lib/ImageView/shadowsharpthumb.php +++ b/ansel/lib/ImageView/shadowsharpthumb.php @@ -2,8 +2,6 @@ /** * ImageView to create the shadowsharpthumb view (sharp corners, shadowed) * - * $Horde: ansel/lib/ImageView/shadowsharpthumb.php,v 1.7 2009/05/27 18:07:28 mrubinsk Exp $ - * * @author Michael J. Rubinsky * @package Ansel */ diff --git a/ansel/lib/ImageView/thumb.php b/ansel/lib/ImageView/thumb.php index 098c53961..8865df0d2 100755 --- a/ansel/lib/ImageView/thumb.php +++ b/ansel/lib/ImageView/thumb.php @@ -2,8 +2,6 @@ /** * ImageView to create the thumb view (plain, resized thumbnails). * - * $Horde: ansel/lib/ImageView/thumb.php,v 1.2 2007/11/14 16:11:27 chuck Exp $ - * * @author Michael J. Rubinsky * @package Ansel */ diff --git a/ansel/lib/ImageView/vimeothumb.php b/ansel/lib/ImageView/vimeothumb.php index 5c838f704..ed1de2283 100644 --- a/ansel/lib/ImageView/vimeothumb.php +++ b/ansel/lib/ImageView/vimeothumb.php @@ -2,8 +2,6 @@ /** * ImageView to create the shadowsharpthumb view (sharp corners, shadowed) * - * $Horde: ansel/lib/ImageView/shadowsharpthumb.php,v 1.6 2008/01/16 01:30:58 mrubinsk Exp $ - * * @author Michael J. Rubinsky * @package Ansel */ diff --git a/ansel/lib/Report.php b/ansel/lib/Report.php index dc34f7fa7..f252f157e 100644 --- a/ansel/lib/Report.php +++ b/ansel/lib/Report.php @@ -2,8 +2,6 @@ /** * Reporting abstraction class * - * $Horde: ansel/lib/Report.php,v 1.12 2009/07/14 00:25:28 mrubinsk Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -34,7 +32,6 @@ class Ansel_Report { $params = $GLOBALS['conf']['report_content']; } - require_once ANSEL_BASE . '/lib/Report/' . $driver . '.php'; $class_name = 'Ansel_Report_' . $driver; if (!class_exists($class_name)) { return PEAR::RaiseError(_("Report driver does not exist.")); @@ -61,7 +58,7 @@ class Ansel_Report { require_once 'Horde/Identity.php'; // Get user email - $identity = &Identity::singleton('none', $user); + $identity = Identity::singleton('none', $user); return $identity->getValue('from_addr'); } diff --git a/ansel/lib/Report/letter.php b/ansel/lib/Report/letter.php index 6a4f27718..59e1321e5 100755 --- a/ansel/lib/Report/letter.php +++ b/ansel/lib/Report/letter.php @@ -2,8 +2,6 @@ /** * Report by letter api class * - * $Horde: ansel/lib/Report/letter.php,v 1.5 2008/07/03 04:13:35 mrubinsk Exp $ - * * @author Duck * @package Ansel */ diff --git a/ansel/lib/Report/mail.php b/ansel/lib/Report/mail.php index e24d94caf..cf32e9b33 100644 --- a/ansel/lib/Report/mail.php +++ b/ansel/lib/Report/mail.php @@ -2,8 +2,6 @@ /** * Report by email class * - * $Horde: ansel/lib/Report/mail.php,v 1.10 2009/02/04 23:51:08 jan Exp $ - * * @author Duck * @package Ansel */ diff --git a/ansel/lib/Report/tickets.php b/ansel/lib/Report/tickets.php index 70c93c6e8..3c91be91f 100755 --- a/ansel/lib/Report/tickets.php +++ b/ansel/lib/Report/tickets.php @@ -2,8 +2,6 @@ /** * Report using tickets * - * $Horde: ansel/lib/Report/tickets.php,v 1.3 2008/05/07 01:45:56 chuck Exp $ - * * @author Duck * @package Ansel */ diff --git a/ansel/lib/Search.php b/ansel/lib/Search.php index 2423f2bff..0d7b6cbea 100644 --- a/ansel/lib/Search.php +++ b/ansel/lib/Search.php @@ -3,8 +3,6 @@ * Ansel_Search:: Provides a generic interface for various types of image * searches that are to be displayed in a paged results view. * - * $Horde: ansel/lib/Search.php,v 1.2 2009/01/06 17:48:51 jan Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -102,4 +100,4 @@ class Ansel_Search { { } -} \ No newline at end of file +} diff --git a/ansel/lib/Search/exif.php b/ansel/lib/Search/exif.php index af9bda7e2..773275c67 100644 --- a/ansel/lib/Search/exif.php +++ b/ansel/lib/Search/exif.php @@ -2,8 +2,6 @@ /** * Ansel_Search_exif Provides an interface for searching image exif data. * - * $Horde: ansel/lib/Search/exif.php,v 1.2 2009/01/06 17:48:53 jan Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -43,4 +41,4 @@ class Ansel_Search_exif { { } -} \ No newline at end of file +} diff --git a/ansel/lib/Tags.php b/ansel/lib/Tags.php index be5ad1f3c..0d8d3550e 100644 --- a/ansel/lib/Tags.php +++ b/ansel/lib/Tags.php @@ -2,8 +2,6 @@ /** * Classes for dealing with tags within Ansel * - * $Horde: ansel/lib/Tags.php,v 1.96 2009/07/09 08:17:49 slusarz Exp $ - * * Copyright 2007-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you diff --git a/ansel/lib/Tile/DateGallery.php b/ansel/lib/Tile/DateGallery.php index 4d7919169..6b168dc39 100644 --- a/ansel/lib/Tile/DateGallery.php +++ b/ansel/lib/Tile/DateGallery.php @@ -3,15 +3,9 @@ * Ansel_Tile_DateGallery:: class wraps display of thumbnail tile for the * DateGallery psuedo gallery. * - * $Horde: ansel/lib/Tile/DateGallery.php,v 1.15 2009/07/13 14:29:05 mrubinsk Exp $ - * * @author Michael Rubinsky * @package Ansel */ - -/** Horde_Date **/ -require_once 'Horde/Date.php'; - class Ansel_Tile_DateGallery { /** diff --git a/ansel/lib/Tile/Gallery.php b/ansel/lib/Tile/Gallery.php index fd9cb4035..33d760c89 100644 --- a/ansel/lib/Tile/Gallery.php +++ b/ansel/lib/Tile/Gallery.php @@ -3,8 +3,6 @@ * Ansel_Tile_Gallery:: class wraps display of thumbnail 'tiles' displayed * for a gallery on the Ansel_View_Gallery view. * - * $Horde: ansel/lib/Tile/Gallery.php,v 1.43 2009/07/13 17:18:40 mrubinsk Exp $ - * * @author Michael Rubinsky * @package Ansel */ diff --git a/ansel/lib/Tile/Image.php b/ansel/lib/Tile/Image.php index ae9972475..d25a8f8c2 100644 --- a/ansel/lib/Tile/Image.php +++ b/ansel/lib/Tile/Image.php @@ -3,8 +3,6 @@ * Ansel_Tile_Image:: class wraps display of thumbnails displayed * for a image on the Ansel_View_Gallery view. * - * $Horde: ansel/lib/Tile/Image.php,v 1.55 2009/07/29 03:08:44 mrubinsk Exp $ - * * @author Michael Rubinsky * @package Ansel */ diff --git a/ansel/lib/Views/Abstract.php b/ansel/lib/Views/Abstract.php index beb9b3235..acbf521e9 100644 --- a/ansel/lib/Views/Abstract.php +++ b/ansel/lib/Views/Abstract.php @@ -2,8 +2,6 @@ /** * The Ansel_View_Abstract:: Parent class for the various Ansel_View classes * - * $Horde: ansel/lib/Views/Abstract.php,v 1.46 2009/07/13 14:29:05 mrubinsk Exp $ - * * @author Chuck Hagenbuch * @author Michael J. Rubinsky * @package Ansel @@ -176,7 +174,6 @@ class Ansel_View_Abstract { $json[] = $data; } - require_once 'Horde/Serialize.php'; return Horde_Serialize::serialize($json, Horde_Serialize::JSON, Horde_Nls::getCharset()); } diff --git a/ansel/lib/Views/Embedded.php b/ansel/lib/Views/Embedded.php index 1b6bfbdce..7d303df71 100644 --- a/ansel/lib/Views/Embedded.php +++ b/ansel/lib/Views/Embedded.php @@ -7,8 +7,6 @@ * EmbeddedRenderers/*.php files which are called from the Ajax_Imple_Embed * class when it handles the request. * - * $Horde: ansel/lib/Views/Embedded.php,v 1.16 2009/07/30 18:02:14 mrubinsk Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you diff --git a/ansel/lib/Views/EmbeddedRenderers/Carousel.php b/ansel/lib/Views/EmbeddedRenderers/Carousel.php index ea55826ff..730ff52a0 100644 --- a/ansel/lib/Views/EmbeddedRenderers/Carousel.php +++ b/ansel/lib/Views/EmbeddedRenderers/Carousel.php @@ -6,8 +6,6 @@ require_once ANSEL_BASE . '/lib/Views/Gallery.php'; /** * Ansel_View_EmbeddedRenderer_Carousel * - * $Horde: ansel/lib/Views/EmbeddedRenderers/Carousel.php,v 1.2 2009/01/06 17:48:54 jan Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -45,4 +43,4 @@ class Ansel_View_EmbeddedRenderer_Carousel extends Ansel_View_Gallery { } -} \ No newline at end of file +} diff --git a/ansel/lib/Views/EmbeddedRenderers/GalleryLink.php b/ansel/lib/Views/EmbeddedRenderers/GalleryLink.php index 998e62303..34799fcd2 100644 --- a/ansel/lib/Views/EmbeddedRenderers/GalleryLink.php +++ b/ansel/lib/Views/EmbeddedRenderers/GalleryLink.php @@ -6,8 +6,6 @@ require_once ANSEL_BASE . '/lib/Views/Gallery.php'; /** * Ansel_View_EmbeddedRenderer_GalleryLink * - * $Horde: ansel/lib/Views/EmbeddedRenderers/GalleryLink.php,v 1.10 2009/07/30 18:02:15 mrubinsk Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -149,4 +147,4 @@ EOT; return $html; } -} \ No newline at end of file +} diff --git a/ansel/lib/Views/EmbeddedRenderers/Mini.php b/ansel/lib/Views/EmbeddedRenderers/Mini.php index e2227e6c1..2abaf4064 100644 --- a/ansel/lib/Views/EmbeddedRenderers/Mini.php +++ b/ansel/lib/Views/EmbeddedRenderers/Mini.php @@ -6,8 +6,6 @@ require_once ANSEL_BASE . '/lib/Views/Gallery.php'; /** * Ansel_View_EmbeddedRenderer_Mini * - * $Horde: ansel/lib/Views/EmbeddedRenderers/Mini.php,v 1.18 2009/07/08 18:28:45 slusarz Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you diff --git a/ansel/lib/Views/EmbeddedRenderers/Slideshow.php b/ansel/lib/Views/EmbeddedRenderers/Slideshow.php index e2fa5cbf1..9a624fed2 100644 --- a/ansel/lib/Views/EmbeddedRenderers/Slideshow.php +++ b/ansel/lib/Views/EmbeddedRenderers/Slideshow.php @@ -6,8 +6,6 @@ require_once ANSEL_BASE . '/lib/Views/Gallery.php'; /** * Ansel_View_EmbeddedRenderer_Slideshow * - * $Horde: ansel/lib/Views/EmbeddedRenderers/Slideshow.php,v 1.2 2009/01/06 17:48:54 jan Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -45,4 +43,4 @@ class Ansel_View_EmbeddedRenderer_Slideshow extends Ansel_View_Gallery { } -} \ No newline at end of file +} diff --git a/ansel/lib/Views/Gallery.php b/ansel/lib/Views/Gallery.php index f3e57f127..a08559e63 100644 --- a/ansel/lib/Views/Gallery.php +++ b/ansel/lib/Views/Gallery.php @@ -1,19 +1,11 @@ _renderer = new $classname($view); $view->_renderer->init(); diff --git a/ansel/lib/Views/GalleryRenderer.php b/ansel/lib/Views/GalleryRenderer.php index a29030989..3056fd4fa 100644 --- a/ansel/lib/Views/GalleryRenderer.php +++ b/ansel/lib/Views/GalleryRenderer.php @@ -2,8 +2,6 @@ /** * Ansel_View_GalleryRenderer:: Base class for all gallery renderers. * - * $Horde: ansel/lib/Views/GalleryRenderer.php,v 1.14 2009/07/13 14:29:05 mrubinsk Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -147,8 +145,6 @@ class Ansel_View_GalleryRenderer { /* Include any widgets */ if (!empty($this->style['widgets'])) { - require_once ANSEL_BASE . '/lib/Widget.php'; - /* Special case widgets - these are built in */ if (array_key_exists('Actions', $this->style['widgets'])) { /* Don't show action widget if no actions */ diff --git a/ansel/lib/Views/GalleryRenderers/Gallery.php b/ansel/lib/Views/GalleryRenderers/Gallery.php index 54fe20ada..af87d8206 100644 --- a/ansel/lib/Views/GalleryRenderers/Gallery.php +++ b/ansel/lib/Views/GalleryRenderers/Gallery.php @@ -3,8 +3,6 @@ * Ansel_View_GalleryRenderer_Gallery:: Class wraps display of the traditional * Gallery View. * - * $Horde: ansel/lib/Views/GalleryRenderers/Gallery.php,v 1.29 2009/07/08 18:28:45 slusarz Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you diff --git a/ansel/lib/Views/GalleryRenderers/GalleryLightbox.php b/ansel/lib/Views/GalleryRenderers/GalleryLightbox.php index 330c3e204..3e8e8559a 100644 --- a/ansel/lib/Views/GalleryRenderers/GalleryLightbox.php +++ b/ansel/lib/Views/GalleryRenderers/GalleryLightbox.php @@ -3,8 +3,6 @@ * Ansel_View_GalleryRenderer_GalleryLightbox:: Class wraps display of the lightbox * style gallery views. * - * $Horde: ansel/lib/Views/GalleryRenderers/GalleryLightbox.php,v 1.33 2009/07/08 18:28:45 slusarz Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -31,7 +29,6 @@ class Ansel_View_GalleryRenderer_GalleryLightbox extends Ansel_View_GalleryRende // Attach the script and CSS files here if we aren't being called via the api if (empty($this->view->_params['api'])) { Ansel::attachStylesheet('lightbox.css'); - Horde::addScriptFile('prototype.js', 'horde', true); Horde::addScriptFile('effects.js', 'horde', true); Horde::addScriptFile('lightbox.js', 'ansel', true); } @@ -141,7 +138,6 @@ class Ansel_View_GalleryRenderer_GalleryLightbox extends Ansel_View_GalleryRende Ansel::attachStylesheet('lightbox.css', true); $includes = new Horde_Script_Files(); $includes->disableAutoloadHordeJS(); - $includes->_add('prototype.js', 'horde', true, true); $includes->_add('accesskeys.js', 'horde', true, true); $includes->_add('effects.js', 'horde', true, true); $includes->_add('lightbox.js', 'ansel', true, true); diff --git a/ansel/lib/Views/GalleryRenderers/GalleryVimeo.php b/ansel/lib/Views/GalleryRenderers/GalleryVimeo.php index 87d952080..db0602449 100644 --- a/ansel/lib/Views/GalleryRenderers/GalleryVimeo.php +++ b/ansel/lib/Views/GalleryRenderers/GalleryVimeo.php @@ -5,8 +5,6 @@ * video service, and displays them as a gallery. The videos are viewed in a * redbox overlay when the thumbnails are clicked. * - * $Horde: $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you @@ -33,7 +31,6 @@ class Ansel_View_GalleryRenderer_GalleryVimeo extends Ansel_View_GalleryRenderer { // Attach the script and CSS files here if we aren't being called via the api if (empty($this->view->_params['api'])) { - Horde::addScriptFile('prototype.js', 'horde', true); Horde::addScriptFile('effects.js', 'horde', true); Horde::addScriptFile('redbox.js', 'horde', true); } @@ -167,7 +164,6 @@ class Ansel_View_GalleryRenderer_GalleryVimeo extends Ansel_View_GalleryRenderer if (!empty($this->view->_params['api'])) { $includes = new Horde_Script_Files(); $includes->disableAutoloadHordeJS(); - $includes->_add('prototype.js', 'horde', true, true); $includes->_add('redbox.js', 'horde', true, true); $includes->includeFiles(); } diff --git a/ansel/lib/Views/Image.php b/ansel/lib/Views/Image.php index 523c35f2c..69a116839 100644 --- a/ansel/lib/Views/Image.php +++ b/ansel/lib/Views/Image.php @@ -2,8 +2,6 @@ /** * The Ansel_View_Image:: class wraps display of individual images. * - * $Horde: ansel/lib/Views/Image.php,v 1.86 2009/07/30 13:15:10 mrubinsk Exp $ - * * @author Chuck Hagenbuch * @package Ansel */ @@ -11,9 +9,6 @@ /** Ansel_View_Abstract */ require_once ANSEL_BASE . '/lib/Views/Abstract.php'; -/** Tags **/ -require_once ANSEL_BASE . '/lib/Tags.php'; - class Ansel_View_Image extends Ansel_View_Abstract { /** @@ -108,7 +103,6 @@ class Ansel_View_Image extends Ansel_View_Abstract { /* Any script files we may need if not calling via the api */ if (empty($view->_params['api'])) { - Horde::addScriptFile('prototype.js', 'horde', true); Horde::addScriptFile('effects.js', 'horde', true); Horde::addScriptFile('stripe.js', 'horde', true); } @@ -341,8 +335,6 @@ class Ansel_View_Image extends Ansel_View_Abstract { /* These items currently don't work when viewing through the api */ if (empty($this->_params['api'])) { /* Add the widgets */ - require_once ANSEL_BASE . '/lib/Widget.php'; - // Tag widget $this->addWidget(Ansel_Widget::factory('Tags', array('view' => 'image'))); diff --git a/ansel/lib/Views/List.php b/ansel/lib/Views/List.php index 1a2402e10..7882bf220 100644 --- a/ansel/lib/Views/List.php +++ b/ansel/lib/Views/List.php @@ -1,22 +1,11 @@ _owner = Horde_Util::getFormData('owner', null); $this->_search = Ansel_Tags::getSearch(null, $this->_owner); } diff --git a/ansel/lib/Views/Slideshow.php b/ansel/lib/Views/Slideshow.php index f0f80196a..038a5f8ca 100644 --- a/ansel/lib/Views/Slideshow.php +++ b/ansel/lib/Views/Slideshow.php @@ -2,11 +2,8 @@ /** * The Ansel_View_Slideshow:: class wraps display of the gallery slideshow. * - * $Horde: ansel/lib/Views/Slideshow.php,v 1.16 2009/06/16 00:34:39 mrubinsk Exp $ - * * @author Chuck Hagenbuch * @author Michael J. Rubinsky - * * @package Ansel */ @@ -97,7 +94,6 @@ class Ansel_View_Slideshow extends Ansel_View_Abstract { } - Horde::addScriptFile('prototype.js', 'horde', true); Horde::addScriptFile('effects.js', 'horde', true); Horde::addScriptFile('stripe.js', 'horde', true); Horde::addScriptFile('slideshow.js', 'ansel', true); diff --git a/ansel/lib/Widget/Actions.php b/ansel/lib/Widget/Actions.php index 06b7269b8..af303936d 100644 --- a/ansel/lib/Widget/Actions.php +++ b/ansel/lib/Widget/Actions.php @@ -2,8 +2,6 @@ /** * Ansel_Widget_Actions:: class to wrap the display of gallery actions * - * $Horde: ansel/lib/Widget/Actions.php,v 1.54 2009/07/27 17:07:34 mrubinsk Exp $ - * * @author Michael J. Rubinsky * @package Ansel */ diff --git a/ansel/lib/Widget/Base.php b/ansel/lib/Widget/Base.php index ae33827fc..126f47f2e 100644 --- a/ansel/lib/Widget/Base.php +++ b/ansel/lib/Widget/Base.php @@ -3,8 +3,6 @@ * Ansel_Widget:: class wraps the display of widgets to be displayed in various * Ansel_Views. * - * $Horde: ansel/lib/Widget.php,v 1.10 2009/06/19 22:32:18 mrubinsk Exp $ - * * Copyright 2008-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you diff --git a/ansel/lib/Widget/Geodata.php b/ansel/lib/Widget/Geodata.php index 364705e4d..3164d978b 100644 --- a/ansel/lib/Widget/Geodata.php +++ b/ansel/lib/Widget/Geodata.php @@ -41,7 +41,6 @@ class Ansel_Widget_Geodata extends Ansel_Widget_Base { global $ansel_storage; - Horde::addScriptFile('prototype.js', 'horde'); Horde::addScriptFile('popup.js', 'horde'); $geodata = $ansel_storage->getImagesGeodata($this->_params['images']); diff --git a/ansel/lib/XPPublisher.php b/ansel/lib/XPPublisher.php index d38f2b4bb..313fde91b 100644 --- a/ansel/lib/XPPublisher.php +++ b/ansel/lib/XPPublisher.php @@ -1,17 +1,10 @@ + * @author Chuck Hagenbuch */ class Horde_XPPublisher { @@ -39,7 +32,6 @@ class Horde_XPPublisher { */ function sendRegFile($appKey, $displayName, $description, $href, $icon) { - require_once 'Horde/Browser.php'; $browser = Horde_Browser::singleton(); $browser->downloadHeaders('install_registry.reg', 'application/octet-stream'); diff --git a/ansel/lib/api.php b/ansel/lib/api.php index 2511c3a25..cdfe0b3c4 100644 --- a/ansel/lib/api.php +++ b/ansel/lib/api.php @@ -2,17 +2,14 @@ /** * Ansel external API interface. * - * $Horde: ansel/lib/api.php,v 1.139 2009/07/28 20:16:50 jan Exp $ - * * Copyright 2004-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (GPL). If you * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. * - * @author Jan Schneider - * @author Chuck Hagenbuch - * @author Michael J. Rubinsky - * + * @author Jan Schneider + * @author Chuck Hagenbuch + * @author Michael J. Rubinsky * @package Ansel */ diff --git a/ansel/lib/base.php b/ansel/lib/base.php index 87ba99b20..3f0cd1018 100644 --- a/ansel/lib/base.php +++ b/ansel/lib/base.php @@ -20,12 +20,20 @@ require_once dirname(__FILE__) . '/base.load.php'; // Load the Horde Framework core, and set up inclusion paths. require_once HORDE_BASE . '/lib/core.php'; -// Registry -$registry = Horde_Registry::singleton(); +// Registry. +$s_ctrl = 0; +switch (Horde_Util::nonInputVar('imp_session_control')) { +case 'readonly': + $s_ctrl = Horde_Registry::SESSION_READONLY; + break; +} +$registry = Horde_Registry::singleton($s_ctrl); + +// Authentication try { $registry->pushApp('ansel', array('check_perms' => (Horde_Util::nonInputVar('ansel_authentication') != 'none'), 'logintasks' => true)); } catch (Horde_Exception $e) { - Horde_Auth::authenticationFailureRedirect('ansel', $e); + Horde_Auth::authenticationFailureRedirect('ansel', $e); } $conf = $GLOBALS['conf']; define('ANSEL_TEMPLATES', $registry->get('templates')); @@ -34,9 +42,6 @@ define('ANSEL_TEMPLATES', $registry->get('templates')); $GLOBALS['notification'] = Horde_Notification::singleton(); $GLOBALS['notification']->attach('status'); -// Ansel base libraries. -require_once ANSEL_BASE . '/lib/Ansel.php'; - // Create a cache object if we need it. if ($conf['ansel_cache']['usecache']) { $GLOBALS['cache'] = Horde_Cache::singleton($conf['cache']['driver'], diff --git a/ansel/lib/prefs.php b/ansel/lib/prefs.php index 533dc8e88..75b739ea5 100644 --- a/ansel/lib/prefs.php +++ b/ansel/lib/prefs.php @@ -1,7 +1,5 @@ - diff --git a/ansel/locale/es_ES/help.xml b/ansel/locale/es_ES/help.xml index a98ee94c2..f1d22b738 100755 --- a/ansel/locale/es_ES/help.xml +++ b/ansel/locale/es_ES/help.xml @@ -1,5 +1,4 @@ - diff --git a/ansel/locale/fi_FI/help.xml b/ansel/locale/fi_FI/help.xml index 05d513fdf..83e950d0d 100755 --- a/ansel/locale/fi_FI/help.xml +++ b/ansel/locale/fi_FI/help.xml @@ -1,5 +1,4 @@ - Yleiskuva diff --git a/ansel/map_edit.php b/ansel/map_edit.php index 3313b1053..4eb0b2992 100644 --- a/ansel/map_edit.php +++ b/ansel/map_edit.php @@ -1,7 +1,5 @@ */ -@define('ANSEL_BASE', dirname(__FILE__)); -require_once ANSEL_BASE . '/lib/base.php'; + +require_once dirname(__FILE__) . '/lib/base.php'; /* Script includes */ Horde::addExternalScriptFile('http://maps.google.com/maps?file=api&v=2&sensor=false&key=' . $GLOBALS['conf']['api']['googlemaps'], 'ansel'); -Horde::addScriptFile('prototype.js', 'horde'); -Horde::addScriptFile('googlemap.js'); -Horde::addScriptFile('googlemap_edit.js'); +Horde::addScriptFile('googlemap.js', 'ansel'); +Horde::addScriptFile('googlemap_edit.js', 'ansel'); $image_id = Horde_Util::getFormData('image'); diff --git a/ansel/perms.php b/ansel/perms.php index 540d2e13c..36a53355b 100644 --- a/ansel/perms.php +++ b/ansel/perms.php @@ -1,7 +1,5 @@ */ -$fieldsList['show'] = 0; -$fieldsList['read'] = 1; -$fieldsList['edit'] = 2; -$fieldsList['delete'] = 3; +$fieldsList = array( + 'show' => 0, + 'read' => 1, + 'edit' => 2, + 'delete' => 3 +); -define('ANSEL_BASE', dirname(__FILE__)); -require_once ANSEL_BASE . '/lib/base.php'; +require_once dirname(__FILE__) . '/lib/base.php'; require_once 'Horde/Group.php'; -$groups = &Group::singleton(); +$groups = Group::singleton(); $auth = Horde_Auth::singleton($conf['auth']['driver']); $form = null; diff --git a/ansel/preview.php b/ansel/preview.php index c989427f4..3760849b2 100644 --- a/ansel/preview.php +++ b/ansel/preview.php @@ -1,7 +1,5 @@ */ -@define('ANSEL_BASE', dirname(__FILE__)); -require_once ANSEL_BASE . '/lib/base.php'; +require_once dirname(__FILE__) . '/lib/base.php'; $imageId = Horde_Util::getFormData('image'); $image = &$ansel_storage->getImage($imageId); if (is_a($image, 'PEAR_Error')) { diff --git a/ansel/protect.php b/ansel/protect.php index 337c1667d..db7e481f4 100644 --- a/ansel/protect.php +++ b/ansel/protect.php @@ -1,7 +1,5 @@ * @package Ansel */ -$session_control = 'readonly'; +$ansel_session_control = 'readonly'; require_once dirname(__FILE__) . '/lib/base.php'; require_once ANSEL_BASE . '/lib/version.php'; @@ -143,7 +141,7 @@ if (empty($rss)) { $images = $ansel_storage->getRecentImages($galleries); if (!is_a($images, 'PEAR_Error') && count($images)) { require_once('Horde/Identity.php'); - $owner = &Identity::singleton('none', $id); + $owner = Identity::singleton('none', $id); $name = $owner->getValue('fullname'); $author = $owner->getValue('from_addr'); if (!$name) { @@ -173,7 +171,6 @@ if (empty($rss)) { break; case 'tag': - require_once ANSEL_BASE . '/lib/Tags.php'; $tag_id = array_values(Ansel_Tags::getTagIds(array($id))); $images = Ansel_Tags::searchTagsById($tag_id, 10, 0, 'images'); $tag_id = array_pop($tag_id); diff --git a/ansel/scripts/all_images_exif_to_tags.php b/ansel/scripts/all_images_exif_to_tags.php index 8c67bf25c..0deb7a9b9 100755 --- a/ansel/scripts/all_images_exif_to_tags.php +++ b/ansel/scripts/all_images_exif_to_tags.php @@ -1,8 +1,6 @@ #!/usr/bin/env php */ -@define('AUTH_HANDLER', true); -@define('HORDE_BASE', dirname(__FILE__) . '/../..'); -@define('ANSEL_BASE', HORDE_BASE . '/ansel'); // Do CLI checks and environment setup first. +require_once dirname(__FILE__) . '/../../lib/base.load.php'; require_once HORDE_BASE . '/lib/core.php'; // Make sure no one runs this from the web. @@ -24,10 +20,9 @@ if (!Horde_Cli::runningFromCLI()) { // Load the CLI environment. Horde_Cli::init(); -$cli = &Horde_Cli::singleton(); +$cli = Horde_Cli::singleton(); /* Command line options */ -require_once 'Console/Getopt.php'; $ret = Console_Getopt::getopt(Console_Getopt::readPHPArgv(), 'hu:p:f:', array('help', 'username=', 'password=', 'fields=')); @@ -67,6 +62,7 @@ foreach ($opts as $opt) { } } +$ansel_authentication = 'none'; require_once ANSEL_BASE . '/lib/base.php'; // Login to horde if username & password are set. diff --git a/ansel/scripts/ansel.php b/ansel/scripts/ansel.php index 260dd529d..9568c7e63 100755 --- a/ansel/scripts/ansel.php +++ b/ansel/scripts/ansel.php @@ -1,8 +1,6 @@ #!/usr/bin/php */ -@define('HORDE_BASE', dirname(__FILE__) . '/../..'); -@define('ANSEL_BASE', HORDE_BASE . '/ansel'); // Do CLI checks and environment setup first. +require_once dirname(__FILE__) . '/../../lib/base.load.php'; require_once HORDE_BASE . '/lib/core.php'; // Make sure no one runs this from the web. @@ -23,14 +20,13 @@ if (!Horde_Cli::runningFromCLI()) { // Load the CLI environment. Horde_Cli::init(); -$cli = &Horde_Cli::singleton(); +$cli = Horde_Cli::singleton(); // Load Ansel. $ansel_authentication = 'none'; require_once ANSEL_BASE . '/lib/base.php'; // We accept the user name on the command-line. -require_once 'Console/Getopt.php'; $ret = Console_Getopt::getopt(Console_Getopt::readPHPArgv(), 'hu:p:lc:g:a:d:t:', array('help', 'username=', 'password=', 'list', diff --git a/ansel/scripts/garbage_collection.php b/ansel/scripts/garbage_collection.php index 9a104a0cd..bc08260bd 100755 --- a/ansel/scripts/garbage_collection.php +++ b/ansel/scripts/garbage_collection.php @@ -1,8 +1,6 @@ #!/usr/bin/php */ -@define('HORDE_BASE', dirname(__FILE__) . '/../..'); -@define('ANSEL_BASE', HORDE_BASE . '/ansel'); // Do CLI checks and environment setup first. +require_once dirname(__FILE__) . '/../../lib/base.load.php'; require_once HORDE_BASE . '/lib/core.php'; // Make sure no one runs this from the web. @@ -23,14 +20,13 @@ if (!Horde_Cli::runningFromCLI()) { // Load the CLI environment. Horde_Cli::init(); -$cli = &Horde_Cli::singleton(); +$cli = Horde_Cli::singleton(); // Load Ansel. $ansel_authentication = 'none'; require_once ANSEL_BASE . '/lib/base.php'; // We accept the user name on the command-line. -require_once 'Console/Getopt.php'; $ret = Console_Getopt::getopt(Console_Getopt::readPHPArgv(), 'hu:p:lc:g:a:d:k', array('help', 'username=', 'password=', 'dir=', 'keep')); diff --git a/ansel/scripts/remote_import.php b/ansel/scripts/remote_import.php index 3033ea385..34c041b48 100755 --- a/ansel/scripts/remote_import.php +++ b/ansel/scripts/remote_import.php @@ -1,8 +1,6 @@ #!/usr/bin/env php */ -/* Edit this to include your horde libs if they are not in your path */ -ini_set('include_path', '/var/www/pear' . PATH_SEPARATOR . ini_get('include_path')); - -/* Horde autoloading */ -require_once 'Horde/Autoloader.php'; +require_once dirname(__FILE__) . '/../lib/base.load.php'; +require_once HORDE_BASE . '/lib/core.php'; /* Horde_CLI */ if (!Horde_Cli::runningFromCLI()) { exit("Must be run from the command line\n"); } Horde_Cli::init(); -$cli = &Horde_Cli::singleton(); +$cli = Horde_Cli::singleton(); /* Command line options */ $ret = Console_Getopt::getopt(Console_Getopt::readPHPArgv(), 'hu:p:g:s:d:kr:zl', diff --git a/ansel/scripts/sql/ansel.pgsql.sql b/ansel/scripts/sql/ansel.pgsql.sql index f1194f94c..7679857cd 100644 --- a/ansel/scripts/sql/ansel.pgsql.sql +++ b/ansel/scripts/sql/ansel.pgsql.sql @@ -1,5 +1,3 @@ --- $Horde: ansel/scripts/sql/ansel.pgsql.sql,v 1.11 2009/07/06 19:55:20 mrubinsk Exp $ - CREATE TABLE ansel_images ( image_id INT NOT NULL, gallery_id INT NOT NULL, diff --git a/ansel/scripts/sql/ansel.sql b/ansel/scripts/sql/ansel.sql index 22fbc42a1..af7444a9c 100644 --- a/ansel/scripts/sql/ansel.sql +++ b/ansel/scripts/sql/ansel.sql @@ -1,5 +1,3 @@ --- $Horde: ansel/scripts/sql/ansel.sql,v 1.38 2009/07/07 17:13:50 mrubinsk Exp $ - CREATE TABLE ansel_images ( image_id INT NOT NULL, gallery_id INT NOT NULL, diff --git a/ansel/scripts/upgrades/1.0_to_1.1.php b/ansel/scripts/upgrades/1.0_to_1.1.php index eb8bb4a6e..ad0989566 100644 --- a/ansel/scripts/upgrades/1.0_to_1.1.php +++ b/ansel/scripts/upgrades/1.0_to_1.1.php @@ -8,13 +8,10 @@ * * @author Michael J. Rubinsky */ -@define('AUTH_HANDLER', true); -@define('HORDE_BASE', dirname(__FILE__) . '/../../../'); -@define('ANSEL_BASE', HORDE_BASE . '/ansel'); // Do CLI checks and environment setup first. +require_once dirname(__FILE__) . '/../../lib/base.load.php'; require_once HORDE_BASE . '/lib/core.php'; -require_once 'Horde/CLI.php'; // Make sure no one runs this from the web. if (!Horde_CLI::runningFromCLI()) { @@ -23,8 +20,9 @@ if (!Horde_CLI::runningFromCLI()) { // Load the CLI environment. Horde_CLI::init(); -$cli = &Horde_CLI::singleton(); +$cli = Horde_CLI::singleton(); +$ansel_authentication = 'none'; require_once ANSEL_BASE . '/lib/base.php'; // First update the tables diff --git a/ansel/scripts/upgrades/2008-09-16_add_original_date_values.php b/ansel/scripts/upgrades/2008-09-16_add_original_date_values.php index b1ff7225d..b962db21b 100755 --- a/ansel/scripts/upgrades/2008-09-16_add_original_date_values.php +++ b/ansel/scripts/upgrades/2008-09-16_add_original_date_values.php @@ -1,8 +1,6 @@ #!/usr/bin/env php */ -@define('HORDE_BASE', dirname(__FILE__) . '/../../../'); -@define('ANSEL_BASE', HORDE_BASE . '/ansel'); // Do CLI checks and environment setup first. +require_once dirname(__FILE__) . '/../../lib/base.load.php'; require_once HORDE_BASE . '/lib/core.php'; // Make sure no one runs this from the web. @@ -25,7 +22,7 @@ if (!Horde_Cli::runningFromCLI()) { // Load the CLI environment. Horde_Cli::init(); -$cli = &Horde_Cli::singleton(); +$cli Horde_Cli::singleton(); $ansel_authentication = 'none'; require_once ANSEL_BASE . '/lib/base.php'; diff --git a/ansel/scripts/upgrades/2008-12-5_add_geolocation_tables.sql b/ansel/scripts/upgrades/2008-12-5_add_geolocation_tables.sql index e69bf9310..c57f8d224 100644 --- a/ansel/scripts/upgrades/2008-12-5_add_geolocation_tables.sql +++ b/ansel/scripts/upgrades/2008-12-5_add_geolocation_tables.sql @@ -1,5 +1,3 @@ --- $Horde: ansel/scripts/upgrades/2008-12-5_add_geolocation_tables.sql,v 1.1 2008/12/05 19:42:23 mrubinsk Exp $ - CREATE TABLE ansel_images_geolocation ( image_id INT NOT NULL, image_latitude varchar(32), diff --git a/ansel/scripts/upgrades/2009-06-14_fix_geolocation_values.php b/ansel/scripts/upgrades/2009-06-14_fix_geolocation_values.php index 94535993b..cd8849413 100755 --- a/ansel/scripts/upgrades/2009-06-14_fix_geolocation_values.php +++ b/ansel/scripts/upgrades/2009-06-14_fix_geolocation_values.php @@ -8,10 +8,9 @@ * * @author Michael J. Rubinsky */ -@define('HORDE_BASE', dirname(__FILE__) . '/../../../'); -@define('ANSEL_BASE', HORDE_BASE . '/ansel'); // Do CLI checks and environment setup first. +require_once dirname(__FILE__) . '/../../base.load.php'; require_once HORDE_BASE . '/lib/core.php'; // Make sure no one runs this from the web. @@ -21,7 +20,7 @@ if (!Horde_Cli::runningFromCLI()) { // Load the CLI environment. Horde_Cli::init(); -$cli = &Horde_Cli::singleton(); +$cli = Horde_Cli::singleton(); $ansel_authentication = 'none'; require_once ANSEL_BASE . '/lib/base.php'; @@ -47,4 +46,4 @@ foreach ($results as $image) { // Add the location column. $sql = 'ALTER TABLE ansel_images_geolocation ADD COLUMN image_location VARCHAR(255)'; $ansel_db->exec($sql); -$cli->message('Done.', 'cli.success'); \ No newline at end of file +$cli->message('Done.', 'cli.success'); diff --git a/ansel/scripts/upgrades/2009-06-22_move_geolocation_values.php b/ansel/scripts/upgrades/2009-06-22_move_geolocation_values.php index d9d73df56..85b4b33db 100644 --- a/ansel/scripts/upgrades/2009-06-22_move_geolocation_values.php +++ b/ansel/scripts/upgrades/2009-06-22_move_geolocation_values.php @@ -8,10 +8,9 @@ * * @author Michael J. Rubinsky */ -@define('HORDE_BASE', dirname(__FILE__) . '/../../../'); -@define('ANSEL_BASE', HORDE_BASE . '/ansel'); // Do CLI checks and environment setup first. +require_once dirname(__FILE__) . '/lib/base.load.php'; require_once HORDE_BASE . '/lib/core.php'; // Make sure no one runs this from the web. @@ -21,7 +20,7 @@ if (!Horde_Cli::runningFromCLI()) { // Load the CLI environment. Horde_Cli::init(); -$cli = &Horde_Cli::singleton(); +$cli = Horde_Cli::singleton(); $ansel_authentication = 'none'; require_once ANSEL_BASE . '/lib/base.php'; diff --git a/ansel/templates/image/upload.inc b/ansel/templates/image/upload.inc index b23932096..11eaf7db6 100644 --- a/ansel/templates/image/upload.inc +++ b/ansel/templates/image/upload.inc @@ -8,7 +8,6 @@ if ($browser->getPlatform() == 'win' && Horde::showService('help')) { } if (!empty($haveImages)) { - Horde::addScriptFile('prototype.js', 'horde', true); Horde::addScriptFile('effects.js', 'horde', true); Horde::addScriptFile('carousel.js', 'ansel', true); } @@ -177,4 +176,4 @@ Event.observe(window, "resize", resized); } - \ No newline at end of file + diff --git a/ansel/test.php b/ansel/test.php index 5de965b44..5ac15973b 100644 --- a/ansel/test.php +++ b/ansel/test.php @@ -1,7 +1,5 @@ array( - 'error' => 'Ansel requires at least Horde 3.2.2', - 'version' => '3.2.2' + 'error' => 'Ansel requires at least Horde 4.0', + 'version' => '4.0' ), 'agora' => array( 'error' => 'Agora provides the ability for users to comment on images.', @@ -75,7 +74,7 @@ $module_list = array( 'zip' => array( 'descrip' => 'Zip Support', 'required' => false, - 'error' => 'Ansel can make use of PHP\'s Zip extension for more efficiently processing uploaded ZIP files..' + 'error' => 'Ansel can make use of PHP\'s Zip extension for more efficiently processing uploaded ZIP files.' ), 'opencv' => array( 'descrip' => 'OpenCV Library', diff --git a/ansel/themes/screen.css b/ansel/themes/screen.css index 2710d007a..9d94b7ac4 100644 --- a/ansel/themes/screen.css +++ b/ansel/themes/screen.css @@ -1,7 +1,3 @@ -/** - * $Horde: ansel/themes/screen.css,v 1.82 2009/07/16 19:20:55 mrubinsk Exp $ - */ - /* Table CSS. */ th { text-align: left; diff --git a/ansel/view.php b/ansel/view.php index a5e52acdb..1d7eab108 100644 --- a/ansel/view.php +++ b/ansel/view.php @@ -1,7 +1,5 @@ */ -@define('ANSEL_BASE', dirname(__FILE__)); -require_once ANSEL_BASE . '/lib/base.php'; +require_once dirname(__FILE__) . '/lib/base.php'; $viewname = basename(Horde_Util::getFormData('view', 'Gallery')); include_once ANSEL_BASE . '/lib/Views/' . $viewname . '.php'; diff --git a/ansel/xppublish.php b/ansel/xppublish.php index 18172493e..d23efa406 100644 --- a/ansel/xppublish.php +++ b/ansel/xppublish.php @@ -1,7 +1,5 @@ */ -@define('AUTH_HANDLER', true); -@define('ANSEL_BASE', dirname(__FILE__)); -require_once ANSEL_BASE . '/lib/base.php'; +$ansel_authentication = 'none'; +require_once dirname(__FILE__) . '/lib/base.php'; require_once ANSEL_BASE . '/lib/XPPublisher.php'; $cmd = Horde_Util::getFormData('cmd');