Skip to content

Commit

Permalink
Merge branch 'release-2.10.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
krampstudio committed Mar 24, 2016
2 parents 8659ebc + 0223e30 commit 6171ac4
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 96 deletions.
8 changes: 0 additions & 8 deletions .htaccess

This file was deleted.

33 changes: 0 additions & 33 deletions index.php

This file was deleted.

2 changes: 1 addition & 1 deletion manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
'label' => 'Item core extension',
'description' => 'TAO Items extension',
'license' => 'GPL-2.0',
'version' => '2.9.6',
'version' => '2.10.0',
'author' => 'Open Assessment Technologies, CRP Henri Tudor',
'requires' => array(
'taoBackOffice' => '>=0.8'
Expand Down
38 changes: 2 additions & 36 deletions models/classes/class.ItemsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,7 @@ public function setItemContent(core_kernel_classes_Resource $item, $content, $la
$dataFile, tao_helpers_Uri::getUniqueId($item->getUri()).DIRECTORY_SEPARATOR.'itemContent'.DIRECTORY_SEPARATOR.$lang
);
$item->setPropertyValueByLg($this->itemContentProperty, $file->getUri(), $lang);
$file->setContent($content);
$returnValue = $file->add(true, true);
}

if($commitMessage != 'HOLD_COMMIT'){//hack to control commit or not
$returnValue = $file->commit($commitMessage);
$returnValue = $file->setContent($content);
}

return (bool) $returnValue;
Expand Down Expand Up @@ -587,14 +582,7 @@ public function deleteItemContent(core_kernel_classes_Resource $item){
foreach($files->getIterator() as $file){
if ($file instanceof core_kernel_classes_Resource) {
$file = new core_kernel_file_File($file);
if(core_kernel_versioning_File::isVersionedFile($file)){
$file = new core_kernel_versioning_File($file);
}
try{
$file->delete();
}catch(core_kernel_versioning_exception_FileUnversionedException $e){
// file was not versioned after all, ignore in delte
}
$file->delete();
}
}
}
Expand Down Expand Up @@ -633,28 +621,6 @@ public function getItemModelImplementation(core_kernel_classes_Resource $itemMod
return $returnValue;
}

/**
* Short description of method isItemVersioned
*
* @access public
* @author Joel Bout, <joel@taotesting.com>
* @param Resource item
* @return boolean
*/
public function isItemVersioned(core_kernel_classes_Resource $item){
$returnValue = (bool) false;

$files = $item->getPropertyValues($this->itemContentProperty);
foreach($files as $file){
// theoreticaly this should always be no or a single file
if($file->hasType(new core_kernel_classes_Class(CLASS_GENERIS_FILE))){
$returnValue = true;
}
}

return (bool) $returnValue;
}

/**
* Short description of method getItemFolder
*
Expand Down
2 changes: 1 addition & 1 deletion scripts/update/class.Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function update($initialVersion) {
$this->setVersion('2.8.1');
}

$this->skip('2.8.1','2.9.6');
$this->skip('2.8.1','2.10.0');

return null;
}
Expand Down
14 changes: 0 additions & 14 deletions test/ItemsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,20 +301,6 @@ public function testGetDefaultFileSource()


}


public function testIsItemVersioned()
{
$item = $this->prophesize('core_kernel_classes_Resource');
$file = $this->prophesize('core_kernel_classes_Resource');
$file->hasType(new core_kernel_classes_Class(CLASS_GENERIS_FILE))
->willReturn(true);
$item->getPropertyValues(Argument::which('getUri' , TAO_ITEM_CONTENT_PROPERTY))
->willReturn(array($file->reveal()));

$this->assertTrue($this->itemsService->isItemVersioned($item->reveal()));
}


public function testIsItemModelDefined()
{
Expand Down
2 changes: 1 addition & 1 deletion views/js/controller/runtime/itemRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ define(['jquery', 'lodash', 'iframeNotifier', 'urlParser'],
}).on('itemready', function() {
// item is ready, we can connect.
itemApi.connect($frame[0]);
}).on('imageloaded', function() {
}).on('itemcontentchange', function() {
setIframeHeight();
});

Expand Down
2 changes: 1 addition & 1 deletion views/js/controllers.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion views/js/controllers.min.js.map

Large diffs are not rendered by default.

0 comments on commit 6171ac4

Please sign in to comment.