/** * This loads the plugins in the plugins folder. It searches for files ending with 'Plugin.php'. * This is called by the 'Re-read plugins' action in the web interface. */ function registerPlugins() { global $default; // Path to lock file $cacheDir = $default->cacheDirectory . DIRECTORY_SEPARATOR; $lockFile = $cacheDir . 'plugin_register.lock'; // Check if the lock file exists if (KTPluginUtil::doCheck($lockFile)) { return true; } // Create the lock file, run through the plugin registration and then delete the lock file touch($lockFile); KTPluginUtil::doPluginRegistration(); @unlink($lockFile); }