modify plugin name
This commit is contained in:
@@ -38,7 +38,6 @@
|
|||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"Kiri.php",
|
"Kiri.php",
|
||||||
"error.php",
|
|
||||||
"function.php"
|
"function.php"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user