BcS_Modul_Versand_GLS_Gepard - Version 3.0.1

Version Notes

--

Download this release

Release Info

Developer DHL Vertriebs GmbH
Extension BcS_Modul_Versand_GLS_Gepard
Version 3.0.1
Comparing to
See all releases


Version 3.0.1

app/code/community/YBM/Common/Block/Adminhtml/Version.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class YBM_Common_Block_Adminhtml_Version
4
+ extends Mage_Adminhtml_Block_System_Config_Form_Field
5
+ {
6
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
7
+ {
8
+ return (string) Mage::helper('ybmcommon')->getExtensionVersion();
9
+ }
10
+ }
app/code/community/YBM/Common/Helper/Abstract.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class YBM_Common_Helper_Abstract extends Mage_Core_Helper_Abstract {
4
+ public function getExtensionVersion()
5
+ {
6
+ $parts = explode('_', get_class($this));
7
+
8
+ if (!is_array($parts) || count($parts) < 2) {
9
+ return 'UNKNOWN';
10
+ }
11
+
12
+ $module = $parts[0] . '_' . $parts[1];
13
+
14
+ return (string) Mage::getConfig()->getModuleConfig($module)->version;
15
+ }
16
+ }
app/code/community/YBM/Common/Helper/Data.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ class YBM_Common_Helper_Data extends YBM_Common_Helper_Abstract {
4
+ }
5
+
app/code/community/YBM/Common/Helper/Log/Abstract.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ abstract class YBM_Common_Helper_Log_Abstract extends Mage_Core_Helper_Abstract {
3
+ /**
4
+ *
5
+ * @return boolean
6
+ */
7
+ public abstract function isLoggingEnabled();
8
+
9
+ /**
10
+ *
11
+ * @return int
12
+ */
13
+ public abstract function getMaxLogLevel();
14
+
15
+ /**
16
+ *
17
+ * @return string
18
+ */
19
+ public function getLogfile() {
20
+ return 'ybm.log';
21
+ }
22
+
23
+ /**
24
+ * Log exceptions
25
+ *
26
+ * @param Exception $e
27
+ */
28
+ public function logException(Exception $e, $logToSession = true) {
29
+ if ($logToSession) {
30
+ $this->logToSession ( "\n" . $e->getMessage (), Zend_Log::ERR );
31
+ }
32
+ $this->logToFile ( "\n" . $e->__toString (), Zend_Log::ERR );
33
+ }
34
+ /**
35
+ * Log to Mage::log
36
+ *
37
+ * @param unknown $message
38
+ * @param string $level
39
+ */
40
+ public function log($message, $level = null) {
41
+ $this->logToSession ( $message, $level );
42
+ $this->logToFile ( $message, $level );
43
+ }
44
+
45
+ /**
46
+ * Log to file only.
47
+ *
48
+ * @param unknown $message
49
+ * @param string $level
50
+ */
51
+ public function logToFile($message, $level = null) {
52
+ $level = is_null ( $level ) ? Zend_Log::DEBUG : ( int ) $level;
53
+
54
+ if (! $this->isLoggingEnabled ()) {
55
+ return;
56
+ }
57
+
58
+ if ($this->getMaxLogLevel () >= $level) {
59
+ Mage::log ( $message, $level, $this->getLogfile(), true );
60
+ }
61
+ }
62
+
63
+ /**
64
+ * Log to session only.
65
+ *
66
+ * @param unknown $message
67
+ * @param string $level
68
+ */
69
+ public function logToSession($message, $level = null) {
70
+ $level = is_null ( $level ) ? Zend_Log::DEBUG : ( int ) $level;
71
+
72
+ $adminSession = Mage::getSingleton ( 'admin/session' );
73
+ /* @var $adminSession Mage_Admin_Model_Session */
74
+
75
+ // verify if the user is logged in to the backend
76
+ if ($adminSession->isLoggedIn ()) {
77
+ /* @var $adminhtmlSession Mage_Adminhtml_Model_Session */
78
+ $adminhtmlSession = Mage::getSingleton ( 'adminhtml/session' );
79
+
80
+ switch ($level) {
81
+ case Zend_Log::EMERG :
82
+ $adminhtmlSession->addError ( $message );
83
+ break;
84
+ case Zend_Log::ALERT :
85
+ $adminhtmlSession->addError ( $message );
86
+ break;
87
+ case Zend_Log::CRIT :
88
+ $adminhtmlSession->addError ( $message );
89
+ break;
90
+ case Zend_Log::ERR :
91
+ $adminhtmlSession->addError ( $message );
92
+ break;
93
+ case Zend_Log::WARN :
94
+ $adminhtmlSession->addWarning ( $message );
95
+ break;
96
+ case Zend_Log::NOTICE :
97
+ $adminhtmlSession->addNotice ( $message );
98
+ break;
99
+ case Zend_Log::INFO :
100
+ $adminhtmlSession->addSuccess ( $message );
101
+ break;
102
+ }
103
+ }
104
+ }
105
+ }
app/code/community/YBM/Common/Model/Feed.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class YBM_Common_Model_Feed extends Mage_AdminNotification_Model_Feed {
3
+ /**
4
+ * Retrieve feed url
5
+ *
6
+ * @return string
7
+ */
8
+ public function getFeedUrl() {
9
+ if (is_null ( $this->_feedUrl )) {
10
+ // $this->_feedUrl = Mage::getStoreConfigFlag ( self::XML_USE_HTTPS_PATH ) ? 'https://' : 'http://' . 'news.ybm-deutschland.de/feed/';
11
+ $this->_feedUrl = 'http://news.ybm-deutschland.de/feed/';
12
+ }
13
+ return $this->_feedUrl;
14
+ }
15
+
16
+ /**
17
+ * Retrieve Last update time
18
+ *
19
+ * @return int
20
+ */
21
+ public function getLastUpdate() {
22
+ return Mage::app ()->loadCache ( 'admin_ybm_common_lastcheck' );
23
+ }
24
+
25
+ /**
26
+ * Set last update time (now)
27
+ *
28
+ * @return Mage_AdminNotification_Model_Feed
29
+ */
30
+ public function setLastUpdate() {
31
+ Mage::app ()->saveCache ( time (), 'admin_ybm_common_lastcheck' );
32
+ return $this;
33
+ }
34
+ }
app/code/community/YBM/Common/Model/System/Config/Source/LogLevels.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class YBM_Common_Model_System_Config_Source_LogLevels {
3
+ protected $attributes;
4
+ public function __construct() {
5
+ $this->attributes = array (
6
+ array (
7
+ 'label' => Mage::helper ( 'ybmcommon/data' )->__ ( 'Disabled' ),
8
+ 'value' => - 1
9
+ ),
10
+ array (
11
+ 'label' => Mage::helper ( 'ybmcommon/data' )->__ ( 'EMERG' ),
12
+ 'value' => Zend_Log::EMERG
13
+ ),
14
+ array (
15
+ 'label' => Mage::helper ( 'ybmcommon/data' )->__ ( 'ALERT' ),
16
+ 'value' => Zend_Log::ALERT
17
+ ),
18
+ array (
19
+ 'label' => Mage::helper ( 'ybmcommon/data' )->__ ( 'CRIT' ),
20
+ 'value' => Zend_Log::CRIT
21
+ ),
22
+ array (
23
+ 'label' => Mage::helper ( 'ybmcommon/data' )->__ ( 'ERR' ),
24
+ 'value' => Zend_Log::ERR
25
+ ),
26
+ array (
27
+ 'label' => Mage::helper ( 'ybmcommon/data' )->__ ( 'WARN' ),
28
+ 'value' => Zend_Log::WARN
29
+ ),
30
+ array (
31
+ 'label' => Mage::helper ( 'ybmcommon/data' )->__ ( 'NOTICE' ),
32
+ 'value' => Zend_Log::NOTICE
33
+ ),
34
+ array (
35
+ 'label' => Mage::helper ( 'ybmcommon/data' )->__ ( 'INFO' ),
36
+ 'value' => Zend_Log::INFO
37
+ ),
38
+ array (
39
+ 'label' => Mage::helper ( 'ybmcommon/data' )->__ ( 'DEBUG' ),
40
+ 'value' => Zend_Log::DEBUG
41
+ )
42
+ );
43
+ }
44
+ public function toOptionArray($addEmpty = true) {
45
+ return $this->attributes;
46
+ }
47
+ public function toSelectArray() {
48
+ $result = array ();
49
+
50
+ foreach ( $this->attributes as $attribute ) {
51
+ $result [$attribute ['value']] = $attribute ['label'];
52
+ }
53
+
54
+ return $result;
55
+ }
56
+ }
app/code/community/YBM/Common/etc/adminhtml.xml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <admin>
6
+ <children>
7
+ <system>
8
+ <children>
9
+ <config>
10
+ <children>
11
+ <ybmcommon translate="title" module="ybmcommon">
12
+ <title>YBM Common Section</title>
13
+ </ybmcommon>
14
+ </children>
15
+ </config>
16
+ </children>
17
+ </system>
18
+ </children>
19
+ </admin>
20
+ </resources>
21
+ </acl>
22
+ </config>
app/code/community/YBM/Common/etc/config.xml ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @package YBM_AdvancedPicklist
5
+ * @copyright Copyright (c) 2013 Stephan Wienczny (stephan.wienczny@ybm-deutschland.de)
6
+ */
7
+ -->
8
+ <config>
9
+ <modules>
10
+ <YBM_Common>
11
+ <version>2.1.0</version>
12
+ </YBM_Common>
13
+ </modules>
14
+ <adminhtml>
15
+ <translate>
16
+ <modules>
17
+ <ybmcommon>
18
+ <files>
19
+ <default>YBM_Common.csv</default>
20
+ </files>
21
+ </ybmcommon>
22
+ </modules>
23
+ </translate>
24
+ <events>
25
+ <controller_action_predispatch>
26
+ <observers>
27
+ <ybmcommon>
28
+ <type>singleton</type>
29
+ <class>ybmcommon/feed</class>
30
+ <method>checkUpdate</method>
31
+ </ybmcommon>
32
+ </observers>
33
+ </controller_action_predispatch>
34
+ </events>
35
+ </adminhtml>
36
+ <frontend>
37
+ <translate>
38
+ <modules>
39
+ <ybmcommon>
40
+ <files>
41
+ <default>YBM_Common.csv</default>
42
+ </files>
43
+ </ybmcommon>
44
+ </modules>
45
+ </translate>
46
+ </frontend>
47
+ <global>
48
+ <blocks>
49
+ <ybmcommon>
50
+ <class>YBM_Common_Block</class>
51
+ </ybmcommon>
52
+ </blocks>
53
+ <helpers>
54
+ <ybmcommon>
55
+ <class>YBM_Common_Helper</class>
56
+ </ybmcommon>
57
+ </helpers>
58
+ <models>
59
+ <ybmcommon>
60
+ <class>YBM_Common_Model</class>
61
+ </ybmcommon>
62
+ </models>
63
+ </global>
64
+ </config>
app/code/community/YBM/Common/etc/system.xml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category YBM * @package YBM_Common
5
+ * @copyright Copyright (c) 2011-2015 Stephan Wienczny <stephan.wienczny@ybm-deutschland.de>
6
+ */
7
+ -->
8
+ <config>
9
+ <tabs>
10
+ <ybm translate="label" module="ybmcommon">
11
+ <label>YBM Extensions</label>
12
+ <sort_order>300</sort_order>
13
+ </ybm>
14
+ </tabs>
15
+ <sections>
16
+ <ybmcommon translate="label" module="ybmcommon">
17
+ <label>Versions</label>
18
+ <tab>ybm</tab>
19
+ <frontend_type>text</frontend_type>
20
+ <sort_order>0</sort_order>
21
+ <show_in_default>1</show_in_default>
22
+ <show_in_website>1</show_in_website>
23
+ <show_in_store>1</show_in_store>
24
+ <expanded>0</expanded>
25
+ <groups>
26
+ <version translate="label">
27
+ <label>Version</label>
28
+ <frontend_type>text</frontend_type>
29
+ <sort_order>1</sort_order>
30
+ <show_in_default>1</show_in_default>
31
+ <show_in_website>1</show_in_website>
32
+ <show_in_store>1</show_in_store>
33
+ <expanded>1</expanded>
34
+ <fields>
35
+ <common translate="label comment">
36
+ <label>YBM_Common</label>
37
+ <comment></comment>
38
+ <frontend_type>text</frontend_type>
39
+ <frontend_model>YBM_Common_Block_Adminhtml_Version</frontend_model>
40
+ <sort_order>1</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>1</show_in_store>
44
+ </common>
45
+ </fields>
46
+ </version>
47
+ </groups>
48
+ </ybmcommon>
49
+ </sections>
50
+ </config>
app/etc/modules/YBM_Common.xml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ * @package YBM_AdvancedPicklist
4
+ * @copyright Copyright (c) 2009 Stephan Wienczny (stephan.wienczny@ybm-deutschland.de)
5
+ */
6
+ -->
7
+ <config>
8
+ <modules>
9
+ <YBM_Common>
10
+ <active>true</active>
11
+ <codePool>community</codePool>
12
+ </YBM_Common>
13
+ </modules>
14
+ </config>
app/locale/de_DE/YBM_Common.csv ADDED
@@ -0,0 +1,2 @@
 
 
1
+ "YBM Extensions","YBM Erweiterungen"
2
+ "Versions","Versionen"
app/locale/en_US/YBM_Common.csv ADDED
File without changes
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>BcS_Modul_Versand_GLS_Gepard</name>
4
+ <version>3.0.1</version>
5
+ <stability>stable</stability>
6
+ <license>--</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>YBM shared module</summary>
10
+ <description>The extension contains shared code</description>
11
+ <notes>--</notes>
12
+ <authors><author><name>Puderbach und Wienczny GbR</name><user>ybmdeutschland</user><email>info@ybm-deutschland.de</email></author></authors>
13
+ <date>2015-07-23</date>
14
+ <time>12:55:52</time>
15
+ <contents><target name="magecommunity"><dir><dir name="YBM"><dir name="Common"><dir><dir name="Block"><dir name="Adminhtml"><file name="Version.php" hash="660c2eebeeaabdfb3756f98c06ee3b49"/></dir></dir><dir name="Helper"><file name="Abstract.php" hash="cec5fa6e4b7e0935ba9abf22e4376550"/><file name="Data.php" hash="83012aa0a33af6cfe0a3348bc0972cd1"/><dir name="Log"><file name="Abstract.php" hash="d3d1b94240bc2f4532604542f7469958"/></dir></dir><dir name="Model"><file name="Feed.php" hash="491453c871a560a9595970e0c4c9b1a2"/><dir name="System"><dir name="Config"><dir name="Source"><file name="LogLevels.php" hash="42e9b0b8408dacc7805b30ee93b65ab3"/></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="d27ef0e3f4de10e5cc18a3dc39a4803b"/><file name="config.xml" hash="756e3e418e3d4f700f52ee809018c41a"/><file name="system.xml" hash="dc9ca7b4367b45a5b448029e5e791c49"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="YBM_Common.xml" hash="0d74806873be02797c6a6b5009e66a4f"/></dir></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="YBM_Common.csv" hash="896a5a381e91040585281d563d000a76"/></dir><dir name="en_US"><file name="YBM_Common.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>