Skip to content

Commit

Permalink
Merge branch 'master' into ansel-ajax
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Apr 22, 2014
2 parents e621365 + ee87e97 commit f37c087
Show file tree
Hide file tree
Showing 46 changed files with 3,393 additions and 1,650 deletions.
6 changes: 5 additions & 1 deletion ansel/lib/View/Image.php
Expand Up @@ -207,6 +207,8 @@ public function html()
*/
protected function _prepare()
{
global $conf;

$this->_page = isset($this->_params['page']) ? $this->_params['page'] : 0;
$this->_slug = $this->gallery->get('slug');
$this->_date = $this->gallery->getDate();
Expand Down Expand Up @@ -254,13 +256,15 @@ protected function _prepare()
if ($this->gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::DELETE)) {
$this->_urls['delete'] = $imageActionUrl->copy()->add('actionID', 'delete');
}
if (!empty($conf['ecard']['enable']) && !empty($this->_urls['ecard'])) {

if (!empty($conf['ecard']['enable'])) {
$this->_urls['ecard'] = Horde::url('img/ecard.php')->add(
array_merge(array('gallery' => $this->gallery->id,
'image' => $this->resource->id),
$this->_date)
);
}

if ($this->gallery->canDownload()) {
$this->_urls['download'] = Horde::url('img/download.php', true)->add('image', $this->resource->id);
}
Expand Down
3 changes: 2 additions & 1 deletion components/lib/Components/Qc/Task/Unit.php
Expand Up @@ -48,7 +48,8 @@ public function getName()
*/
public function validate($options)
{
if (!class_exists('PHPUnit_TextUI_TestRunner')) {
if (!class_exists('Horde_Test_AllTests') ||
!class_exists('PHPUnit_TextUI_TestRunner')) {
return array('PHPUnit is not available!');
}
}
Expand Down
2 changes: 1 addition & 1 deletion framework/Auth/lib/Horde/Auth.php
Expand Up @@ -356,7 +356,7 @@ static public function genRandomPassword()
* 'upper', 'lower', 'number', and 'symbol'. For example: A
* password of 'p@ssw0rd' satisfies three classes ('number',
* 'lower', and 'symbol'), while 'passw0rd' only satisfies two
* classes ('lower' and 'symbols').
* classes ('lower' and 'number').
*
* - minClasses: Minimum number (0 through 4) of character
* classes.
Expand Down
Expand Up @@ -114,10 +114,12 @@ public function get($key)
return false;
}

if ($this->_mask & self::LZ4) {
$data = @horde_lz4_uncompress($data);
} elseif ($this->_mask & self::LZF) {
$data = @lzf_decompress($data);
if ($data) {
if ($this->_mask & self::LZ4) {
$data = @horde_lz4_uncompress($data);
} elseif ($this->_mask & self::LZF) {
$data = @lzf_decompress($data);
}
}

return ($data === false)
Expand Down
2 changes: 1 addition & 1 deletion framework/Feed/lib/Horde/Feed/Blogroll.php
Expand Up @@ -48,7 +48,7 @@ protected function _buildListItemCache()
{
$entries = array();
foreach ($this->_element->getElementsByTagName('outline') as $child) {
if ($child->attributes->getNamedItem('xmlurl')) {
if ($child->attributes->getNamedItem('xmlUrl')) {
$entries[] = $child;
}
}
Expand Down
6 changes: 3 additions & 3 deletions framework/Feed/test/Horde/Feed/BlogrollTest.php
Expand Up @@ -27,13 +27,13 @@ public function testValidBlogrolls($file)

$this->assertInstanceOf('Horde_Feed_Entry_Blogroll', $entry);
$this->assertGreaterThan(0, strlen($entry->text));
$this->assertGreaterThan(0, strlen($entry->xmlurl));
$this->assertGreaterThan(0, strlen($entry->xmlUrl));

$this->assertEquals($entry->text, $entry['text']);
$this->assertEquals($entry->description, $entry['description']);
$this->assertEquals($entry->title, $entry['title']);
$this->assertEquals($entry->htmlurl, $entry['htmlurl']);
$this->assertEquals($entry->xmlurl, $entry['xmlurl']);
$this->assertEquals($entry->htmlUrl, $entry['htmlUrl']);
$this->assertEquals($entry->xmlUrl, $entry['xmlUrl']);
}

public function testGroupedBlogrolls()
Expand Down
6 changes: 3 additions & 3 deletions framework/Imap_Client/composer.json
Expand Up @@ -11,16 +11,16 @@
"role": "lead"
}
],
"version": "2.19.2",
"time": "2014-04-03",
"version": "2.19.3",
"time": "2014-04-16",
"repositories": [
{
"type": "pear",
"url": "http://pear.horde.org"
}
],
"require": {
"php": ">=5.3.0",
"php": ">=5.3.0,<=6.0.0alpha1",
"pear-pear.horde.org/Horde_Exception": ">=2.0.0@stable,<=3.0.0alpha1@stable",
"pear-pear.horde.org/Horde_Mail": ">=2.0.0@stable,<=3.0.0alpha1@stable",
"pear-pear.horde.org/Horde_Mime": ">=2.3.0@stable,<=3.0.0alpha1@stable",
Expand Down
22 changes: 17 additions & 5 deletions framework/Imap_Client/package.xml
Expand Up @@ -10,9 +10,9 @@
<email>slusarz@horde.org</email>
<active>yes</active>
</lead>
<date>2014-04-03</date>
<date>2014-04-16</date>
<version>
<release>2.19.3</release>
<release>2.19.4</release>
<api>2.19.0</api>
</version>
<stability>
Expand All @@ -21,8 +21,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Fix parsing a reply/forward subject with no blob content.
* [mms] Ensure integer value returns from Horde_Imap_Client_Base#status() are truly integers.
*
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -2342,12 +2341,25 @@
<stability>
<release>stable</release>
<api>stable</api></stability>
<date>2014-04-02</date>
<date>2014-04-16</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Fix parsing a reply/forward subject with no blob content.
* [mms] Ensure integer value returns from Horde_Imap_Client_Base#status() are truly integers.
</notes>
</release>
<release>
<version>
<release>2.19.4</release>
<api>2.19.0</api></version>
<stability>
<release>stable</release>
<api>stable</api></stability>
<date>2014-04-16</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
</notes>
</release>
</changelog>
</package>
12 changes: 6 additions & 6 deletions framework/SessionHandler/lib/Horde/SessionHandler.php
Expand Up @@ -168,9 +168,9 @@ public function close()
public function read($id)
{
if (($result = $this->_storage->read($id)) == '') {
$this->_logger->log('Error retrieving session data (id = ' . $id . ')', 'DEBUG');
$this->_logger->log('Error retrieving session data (' . $id . ')', 'DEBUG');
} else {
$this->_logger->log('Read session data (id = ' . $id . ')', 'DEBUG');
$this->_logger->log('Read session data (' . $id . ')', 'DEBUG');
}

if (empty($this->_params['no_md5'])) {
Expand All @@ -196,10 +196,10 @@ public function write($id, $session_data)
(empty($this->_params['no_md5']) &&
($this->_sig != md5($session_data)))) {
if (!$this->_storage->write($id, $session_data)) {
$this->_logger->log('Failed to write session data (id = ' . $id . ')', 'DEBUG');
$this->_logger->log('Failed to write session data (' . $id . ')', 'DEBUG');
return false;
}
$this->_logger->log('Wrote session data (id = ' . $id . ')', 'DEBUG');
$this->_logger->log('Wrote session data (' . $id . ')', 'DEBUG');
}

return true;
Expand All @@ -217,11 +217,11 @@ public function write($id, $session_data)
public function destroy($id)
{
if ($this->_storage->destroy($id)) {
$this->_logger->log('Session data destroyed (id = ' . $id . ')', 'DEBUG');
$this->_logger->log('Session data destroyed (' . $id . ')', 'DEBUG');
return true;
}

$this->_logger->log('Failed to destroy session data (id = ' . $id . ')', 'DEBUG');
$this->_logger->log('Failed to destroy session data (' . $id . ')', 'DEBUG');
return false;
}

Expand Down
10 changes: 9 additions & 1 deletion framework/Test/lib/Horde/Test/AllTests.php
Expand Up @@ -12,7 +12,15 @@
* @link http://www.horde.org/components/Horde_Test
*/

require_once 'PHPUnit/Autoload.php';
if (!@include_once 'PHPUnit/Autoload.php') {
/* Try to load PHAR-based phpunit. */
set_include_path(get_include_path() . PATH_SEPARATOR . getenv('PATH'));
$GLOBALS['_SERVER']['SCRIPT_NAME'] = '-';
ob_start();
@include_once 'phpunit';
ob_end_clean();
restore_include_path();
}

/**
* Horde base test suite
Expand Down
4 changes: 2 additions & 2 deletions framework/Test/package.xml
Expand Up @@ -27,7 +27,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [mms] Fix loading PHPUnit from PHAR file.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -498,7 +498,7 @@
<date>2014-03-10</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [mms] Fix loading PHPUnit from PHAR file.
</notes>
</release>
</changelog>
Expand Down
2 changes: 1 addition & 1 deletion horde/config/prefs.php
Expand Up @@ -128,7 +128,7 @@
* Provides a checkbox (yes/no) entry.
*
* ADDITIONAL KEYS:
* - jdesc: (string) The description text to use on the preferences page.
* - desc: (string) The description text to use on the preferences page.
* - value: (integer) 0 (or false) for unchecked, 1 (or true) for checked.
*
* 'enum'
Expand Down
24 changes: 14 additions & 10 deletions imp/js/dimpbase.js
Expand Up @@ -2436,17 +2436,14 @@ var DimpBase = {
d = DragDrop.Drags.getDrag(id);

if (elt.hasClassName('vpRow')) {
args = { right: e.memo.isRightClick() };
d.selectIfNoDrag = false;

if (DimpCore.conf.from_link && e.memo.findElement('.msgFrom a')) {
DimpCore.compose('new_to', {
buid: this.viewport.createSelection('div', elt).get('uid').toViewportUidString(),
mailbox: this.view
});
d.fromClick = true;
return;
}

args = { right: e.memo.isRightClick() };
d.selectIfNoDrag = false;

// Handle selection first.
if (DimpCore.DMenu.operaCheck(e)) {
if (!this.isSelected('domid', id)) {
Expand Down Expand Up @@ -2507,9 +2504,16 @@ var DimpBase = {
var elt = e.element(),
id = elt.identify();

if (elt.hasClassName('vpRow') &&
DragDrop.Drags.getDrag(id).selectIfNoDrag) {
this.msgSelect(id, { right: e.memo.isRightClick() });
if (elt.hasClassName('vpRow')) {
d = DragDrop.Drags.getDrag(id);
if (d.fromClick) {
DimpCore.compose('new_to', {
buid: this.viewport.createSelection('div', elt).get('uid').toViewportUidString(),
mailbox: this.view
});
} else if (d.selectIfNoDrag) {
this.msgSelect(id, { right: e.memo.isRightClick() });
}
}
},

Expand Down
3 changes: 2 additions & 1 deletion imp/js/viewport.js
Expand Up @@ -562,7 +562,8 @@ var ViewPort = Class.create({

this.opts.list_container.setStyle({
cssFloat: 'none',
height: (h + (lh * this.page_size)) + 'px'
height: (h + (lh * this.page_size)) + 'px',
width: 'auto'
});
this.opts.content.setStyle({ width: 'auto' });
break;
Expand Down
6 changes: 5 additions & 1 deletion imp/lib/Contents.php
Expand Up @@ -1080,6 +1080,8 @@ public function isAttachment($mime_type)
*/
protected function _buildMessage($parts = null)
{
global $injector;

if (is_null($parts)) {
if ($this->_build) {
return;
Expand All @@ -1094,6 +1096,8 @@ protected function _buildMessage($parts = null)
$last_id = null;
$to_process = array();

$mv_factory = $injector->getInstance('IMP_Factory_MimeViewer');

foreach ($parts as $id) {
if (!is_null($last_id) &&
(strpos($id, $last_id) === 0)) {
Expand All @@ -1103,7 +1107,7 @@ protected function _buildMessage($parts = null)
$last_id = null;

$mime_part = $this->getMIMEPart($id, array('nocontents' => true));
$viewer = $GLOBALS['injector']->getInstance('IMP_Factory_MimeViewer')->create($mime_part, array('contents' => $this));
$viewer = $mv_factory->create($mime_part, array('contents' => $this));
if ($viewer->embeddedMimeParts()) {
$mime_part = $this->getMIMEPart($id);
$viewer->setMIMEPart($mime_part);
Expand Down

0 comments on commit f37c087

Please sign in to comment.