modify plugin name

This commit is contained in:
2022-02-23 17:15:53 +08:00
parent 3bc08ec6d0
commit 8bb593bf3e
2 changed files with 0 additions and 32 deletions
-1
View File
@@ -38,7 +38,6 @@
},
"files": [
"Kiri.php",
"error.php",
"function.php"
]
}
-31
View File
@@ -1,31 +0,0 @@
<?php
define('SUCCESS', 0);
define('NO_AUTH', 401);
define('ERROR_MESSAGES', [
SUCCESS => 'ok',
NO_AUTH => ''
]);
if (!function_exists('message')) {
/**
* @param $code
* @param $replace
* @param string $default
* @return mixed|string
*/
function message($code, $replace, $default = '')
{
if (!isset(ERROR_MESSAGES[$code])) {
if (!empty($default)) {
return $default;
}
return 'unknown error';
}
return sprintf(ERROR_MESSAGES[$code], $replace);
}
}