File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
lib/DocumentAuthentication Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ public function preDispatch(Zend_Controller_Request_Abstract $request)
2020 */
2121 private function handleDocumentAuthentication ($ document )
2222 {
23-
2423 if (is_object ($ document )) {
2524
2625 if (!$ document ->getProperty (DocumentAuthentication_Plugin::DOC_PROPERTY_DOCUMENT_AUTHENTICATION_ENABLED )) {
Original file line number Diff line number Diff line change 11<?php
22
3- class DocumentAuthentication_Plugin extends Pimcore_API_Plugin_Abstract implements Pimcore_API_Plugin_Interface {
3+ class DocumentAuthentication_Plugin
4+ extends Pimcore_API_Plugin_Abstract
5+ implements Pimcore_API_Plugin_Interface
6+ {
47
58 const DOC_PROPERTY_DOCUMENT_AUTHENTICATION_ENABLED
69 = 'documentAuthenticationEnabled ' ;
@@ -76,8 +79,15 @@ public static function isInstalled()
7679 {
7780 $ db = Pimcore_Resource_Mysql::getConnection ();
7881
79- $ sql = "SELECT COUNT(id) as num FROM " . self ::DB_TABLE_PRE_PROPERTIES . " WHERE name = ? " ;
80- $ isInstalled = ((int )$ db ->fetchOne ($ sql , array (self ::DOC_PROPERTY_DOCUMENT_AUTHENTICATION_ENABLED )) > 0 );
82+ $ sql = "SELECT COUNT(id) as num FROM ? WHERE name = ? " ;
83+ $ isInstalled = (
84+ (int )$ db ->fetchOne (
85+ $ sql ,
86+ array (
87+ self ::DB_TABLE_PRE_PROPERTIES ,
88+ self ::DOC_PROPERTY_DOCUMENT_AUTHENTICATION_ENABLED
89+ )
90+ ) > 0 );
8191
8292 return $ isInstalled ;
8393 }
You can’t perform that action at this time.
0 commit comments