PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` * @copyright 2021 ownCloud GmbH. * * This code is covered by the ownCloud Commercial License. * * You should have received a copy of the ownCloud Commercial License * along with this program. If not, see . * */ namespace OCA\WOPI; use OC\HintException; use OCP\Files\Storage\IPersistentLockingStorage; use OCP\Util; class Hooks { /** * @throws HintException */ public static function publicPage(): void { Util::addScript('wopi', 'script'); Util::addStyle('wopi', 'style'); if (!\interface_exists(IPersistentLockingStorage::class)) { throw new HintException('No locking in core - bye bye'); } } /** * Function used to extend global JS config emitted with * OC_Hook::emit('\OCP\Config', 'js', ['array' => &$array]) and available * in JS as oc_appconfig.wopi * * @param array $array holding $array['array'] key with a reference value to config */ public static function extendJsConfig($array): void { $businessFlowEnabled = false; if (\OC::$server->getConfig()->getSystemValue('wopi.business-flow.enabled', false) === 'yes') { $businessFlowEnabled = true; } $array['array']['oc_appconfig']['wopi'] = [ 'businessFlowEnabled' => $businessFlowEnabled, ]; } }