editionguard_drm - Version 1.0.0.1

Version Notes

Initial release.

Download this release

Release Info

Developer EditionGuard
Extension editionguard_drm
Version 1.0.0.1
Comparing to
See all releases


Code changes from version 1.0.0.0 to 1.0.0.1

app/code/community/Editionguard/Editionguard/Model/Downloadable/Link.php CHANGED
@@ -29,7 +29,7 @@ class Editionguard_Editionguard_Model_Downloadable_Link extends Mage_Downloadabl
29
  $new_file = $this->_changingLinkFile;
30
 
31
  $this->_ensureOrigData();
32
-
33
  if ($new || $add_editionguard || $new_file)
34
  {
35
  // The file is new to editionguard.
@@ -63,17 +63,20 @@ class Editionguard_Editionguard_Model_Downloadable_Link extends Mage_Downloadabl
63
  // Upload the file to EditionGuard.
64
  $filepath = Mage_Downloadable_Model_Link::getBasePath() . $this->getLinkFile();
65
  $filedata = file_get_contents($filepath);
 
 
66
  $editionguard = Mage::helper('editionguard')->sendToEditionguard(
67
  $this->getEditionguardResource(),
68
- $this->getTitle(),
69
  basename($this->getLinkFile()),
70
  $filedata
71
  );
72
 
73
  // Remember the response information
74
- $this->setEditionguardResource($editionguard['resource']);
75
- $this->setEditionguardSrc($editionguard['src']);
76
-
 
77
  } catch (Editionguard_Editionguard_Model_Exception $e) {
78
  // Got an error from EditionGuard. Can't save. Pass it on.
79
  throw $e;
29
  $new_file = $this->_changingLinkFile;
30
 
31
  $this->_ensureOrigData();
32
+
33
  if ($new || $add_editionguard || $new_file)
34
  {
35
  // The file is new to editionguard.
63
  // Upload the file to EditionGuard.
64
  $filepath = Mage_Downloadable_Model_Link::getBasePath() . $this->getLinkFile();
65
  $filedata = file_get_contents($filepath);
66
+ // Get the product object for its name
67
+ $product = Mage::getModel('catalog/product')->load($this->_data['product_id']);
68
  $editionguard = Mage::helper('editionguard')->sendToEditionguard(
69
  $this->getEditionguardResource(),
70
+ $product->_data['name'],
71
  basename($this->getLinkFile()),
72
  $filedata
73
  );
74
 
75
  // Remember the response information
76
+ if($new) {
77
+ $this->setEditionguardResource($editionguard['resource']);
78
+ $this->setEditionguardSrc($editionguard['src']);
79
+ }
80
  } catch (Editionguard_Editionguard_Model_Exception $e) {
81
  // Got an error from EditionGuard. Can't save. Pass it on.
82
  throw $e;
app/code/community/Editionguard/Editionguard/etc/config.xml CHANGED
@@ -14,7 +14,7 @@
14
  <config>
15
  <modules>
16
  <Editionguard_Editionguard>
17
- <version>1.0.0.0</version>
18
  </Editionguard_Editionguard>
19
  </modules>
20
  <frontend>
14
  <config>
15
  <modules>
16
  <Editionguard_Editionguard>
17
+ <version>1.0.0.1</version>
18
  </Editionguard_Editionguard>
19
  </modules>
20
  <frontend>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>editionguard_drm</name>
4
- <version>1.0.0.0</version>
5
  <stability>stable</stability>
6
  <license>New BSD</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>This extension will allow you to create eBooks protected with the industry standard Adobe Content Server 4 DRM through the EditionGuard APIs. Through the admin interface, you will be able to manage your DRM enabled eBooks and put them up for sale as Downloadable Products. Your clients will then be able to purchase your eBooks, download them securely on the frontend and open them in Adobe Digital Editions.</description>
11
  <notes>Initial release.</notes>
12
  <authors><author><name>EditionGuard</name><user>EditionGuard</user><email>support@editionguard.com</email></author></authors>
13
- <date>2012-10-15</date>
14
- <time>01:26:13</time>
15
- <contents><target name="magecommunity"><dir><dir name="Editionguard"><dir name="Editionguard"><dir name="Block"><dir name="Downloadable"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><dir name="Downloadable"><file name="Links.php" hash="d5cc57710639854da0b3af6924195b8c"/></dir></dir></dir></dir></dir></dir><dir name="Customer"><dir name="Products"><file name="List.php" hash="5b46f7d767d2976b3a03d0aac3599c76"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="ae7497261a9e9e5490e4ab580dfa645b"/></dir><dir name="Model"><dir name="Downloadable"><file name="Link.php" hash="90c14f16cbfc68012fc2e522d0b106c0"/></dir><file name="Exception.php" hash="18afd5abedb9a0413481ea5255a89a53"/><dir name="Mysql4"><dir name="Editionguard"><file name="Collection.php" hash="de7c2d9c3aa413612a6473dafdf2f779"/></dir><file name="Editionguard.php" hash="adaa5e0d1718f506e89c657420c4d31a"/></dir><dir name="Resource"><dir name="Downloadable"><file name="Link.php" hash="cfc4b1417f2fd0adf93daf15b24681e1"/></dir><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="ff76c3213b9b428220578ba48a667365"/></dir></dir></dir></dir><dir name="controllers"><file name="DownloadController.php" hash="22ef464060c9ffb33b9f031e9ece1752"/></dir><dir name="etc"><file name="config.xml" hash="75cff1d36221ef4fb96fb77afe2cc3c5"/><file name="system.xml" hash="68627dce272876b4b8e76511937d21b4"/></dir><dir name="sql"><dir name="editionguard_setup"><file name="install-1.0.0.0.php" hash="9e9ccd8e5fb5f5f63b32fa6ccea92ce6"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="editionguard"><dir name="downloadable"><dir name="product"><dir name="edit"><dir name="downloadable"><file name="links.phtml" hash="f2d9b8635fd3ea05e23f62ee5e916782"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Editionguard_Editionguard.xml" hash="1d6aac7609bf2b57392b64213f3722ca"/></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.17</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>editionguard_drm</name>
4
+ <version>1.0.0.1</version>
5
  <stability>stable</stability>
6
  <license>New BSD</license>
7
  <channel>community</channel>
10
  <description>This extension will allow you to create eBooks protected with the industry standard Adobe Content Server 4 DRM through the EditionGuard APIs. Through the admin interface, you will be able to manage your DRM enabled eBooks and put them up for sale as Downloadable Products. Your clients will then be able to purchase your eBooks, download them securely on the frontend and open them in Adobe Digital Editions.</description>
11
  <notes>Initial release.</notes>
12
  <authors><author><name>EditionGuard</name><user>EditionGuard</user><email>support@editionguard.com</email></author></authors>
13
+ <date>2012-12-19</date>
14
+ <time>13:21:43</time>
15
+ <contents><target name="magecommunity"><dir><dir name="Editionguard"><dir name="Editionguard"><dir name="Block"><dir name="Downloadable"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><dir name="Downloadable"><file name="Links.php" hash="d5cc57710639854da0b3af6924195b8c"/></dir></dir></dir></dir></dir></dir><dir name="Customer"><dir name="Products"><file name="List.php" hash="5b46f7d767d2976b3a03d0aac3599c76"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="ae7497261a9e9e5490e4ab580dfa645b"/></dir><dir name="Model"><dir name="Downloadable"><file name="Link.php" hash="85bec88744d31a81853c8e76c3ff55c6"/></dir><file name="Exception.php" hash="18afd5abedb9a0413481ea5255a89a53"/><dir name="Mysql4"><dir name="Editionguard"><file name="Collection.php" hash="de7c2d9c3aa413612a6473dafdf2f779"/></dir><file name="Editionguard.php" hash="adaa5e0d1718f506e89c657420c4d31a"/></dir><dir name="Resource"><dir name="Downloadable"><file name="Link.php" hash="cfc4b1417f2fd0adf93daf15b24681e1"/></dir><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="ff76c3213b9b428220578ba48a667365"/></dir></dir></dir></dir><dir name="controllers"><file name="DownloadController.php" hash="22ef464060c9ffb33b9f031e9ece1752"/></dir><dir name="etc"><file name="config.xml" hash="77637b52e48cadd90d724667d08991b5"/><file name="system.xml" hash="68627dce272876b4b8e76511937d21b4"/></dir><dir name="sql"><dir name="editionguard_setup"><file name="install-1.0.0.0.php" hash="9e9ccd8e5fb5f5f63b32fa6ccea92ce6"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="editionguard"><dir name="downloadable"><dir name="product"><dir name="edit"><dir name="downloadable"><file name="links.phtml" hash="f2d9b8635fd3ea05e23f62ee5e916782"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Editionguard_Editionguard.xml" hash="1d6aac7609bf2b57392b64213f3722ca"/></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.17</min><max>6.0.0</max></php></required></dependencies>
18
  </package>