Exemple #1
0
 /**
  * Checks whether the database user is allowed to lock tables.
  *
  * @return bool
  */
 public static function isLockPrivilegeGranted()
 {
     if (is_null(self::$lockPrivilegeGranted)) {
         $generic = Factory::getGeneric();
         self::$lockPrivilegeGranted = $generic->isLockPrivilegeGranted();
     }
     return self::$lockPrivilegeGranted;
 }
Exemple #2
0
 /**
  * Checks whether the database user is allowed to lock tables.
  *
  * @return bool
  */
 public static function isLockPrivilegeGranted()
 {
     if (is_null(self::$lockPrivilegeGranted)) {
         try {
             Db::lockTables(Common::prefixTable('log_visit'));
             Db::unlockAllTables();
             self::$lockPrivilegeGranted = true;
         } catch (Exception $ex) {
             self::$lockPrivilegeGranted = false;
         }
     }
     return self::$lockPrivilegeGranted;
 }