original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Checks whether the database user is allowed to lock tables.
  
  @return bool
docstring_tokens: Checks whether the database user is allowed to lock tables .