Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/monara/public_html/test.athavaneng.com/themes.php on line 99

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230

Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
. /** * Lock configuration class, used to get an instance of the currently configured lock factory. * * @package core * @category lock * @copyright Damyon Wiese 2013 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace core\lock; defined('MOODLE_INTERNAL') || die(); /** * Lock configuration class, used to get an instance of the currently configured lock factory. * * @package core * @category lock * @copyright Damyon Wiese 2013 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class lock_config { /** * Get the currently configured locking subclass. * * @return string class name * @throws \coding_exception */ public static function get_lock_factory_class(): string { global $CFG, $DB; if (during_initial_install()) { $lockfactoryclass = '\core\lock\installation_lock_factory'; } else if (isset($CFG->lock_factory) && $CFG->lock_factory != 'auto') { if (!class_exists($CFG->lock_factory)) { // In this case I guess it is not safe to continue. Different cluster nodes could end up using different locking // types because of an installation error. throw new \coding_exception('Lock factory set in $CFG does not exist: ' . $CFG->lock_factory); } $lockfactoryclass = $CFG->lock_factory; } else { $dbtype = clean_param($DB->get_dbfamily(), PARAM_ALPHA); // DB Specific lock factory is preferred - should support auto-release. $lockfactoryclass = "\\core\\lock\\${dbtype}_lock_factory"; if (!class_exists($lockfactoryclass)) { $lockfactoryclass = '\core\lock\file_lock_factory'; } // Test if the auto chosen lock factory is available. $lockfactory = new $lockfactoryclass('test'); if (!$lockfactory->is_available()) { // Final fallback - DB row locking. $lockfactoryclass = '\core\lock\db_record_lock_factory'; } } return $lockfactoryclass; } /** * Get an instance of the currently configured locking subclass. * * @param string $type - Unique namespace for the locks generated by this factory. e.g. core_cron * @return \core\lock\lock_factory * @throws \coding_exception */ public static function get_lock_factory(string $type): \core\lock\lock_factory { global $CFG; $lockfactoryclass = self::get_lock_factory_class(); $lockfactory = new $lockfactoryclass($type); if (!$lockfactory->is_available()) { throw new \coding_exception("Lock factory class $lockfactoryclass is not available."); } // If tracking performance, insert a timing wrapper to keep track of lock delays. if (defined('MDL_PERF') || !empty($CFG->perfdebug)) { $wrapper = new timing_wrapper_lock_factory($type, $lockfactory); $lockfactory = $wrapper; } return $lockfactory; } }