Compare commits

..

2 commits

Author SHA1 Message Date
fc6a899f16 Fixed some URLs not getting registered properly. 2024-10-05 15:28:56 +00:00
1f16de2239 Fixed casing oversight. 2024-10-05 14:39:43 +00:00
3 changed files with 8 additions and 6 deletions

View file

@ -3,7 +3,7 @@ namespace Misuzu;
use RuntimeException;
use Index\Colour\Colour;
use Index\Colour\ColourRGB;
use Index\Colour\ColourRgb;
use Misuzu\Perm;
$authInfo = $msz->getAuthInfo();
@ -86,7 +86,7 @@ while($_SERVER['REQUEST_METHOD'] === 'POST' && CSRF::validateRequest()) {
$roleColour = $colourInherit
? Colour::none()
: new ColourRGB($colourRed, $colourGreen, $colourBlue);
: new ColourRgb($colourRed, $colourGreen, $colourBlue);
if(mb_strlen($roleDesc) > 1000) {
echo 'Description may not be longer than 1000 characters.';

View file

@ -2,16 +2,18 @@
namespace Misuzu;
use Index\Http\Routing\{HttpGet,RouteHandler,RouteHandlerTrait};
use Index\Urls\{UrlFormat,UrlRegistry,UrlSource,UrlSourceTrait};
use Index\Urls\{UrlFormat,UrlRegistry,UrlSource};
class LegacyRoutes implements RouteHandler, UrlSource {
use RouteHandlerTrait, UrlSourceTrait;
use RouteHandlerTrait;
public function __construct(
private UrlRegistry $urls
) {}
public function registerUrls(UrlRegistry $urls): void {
UrlFormat::register($urls, $this);
// eventually this should be handled by context classes
$urls->register('search-index', '/search.php');
$urls->register('search-query', '/search.php', ['q' => '<query>'], '<section>');

View file

@ -6,7 +6,7 @@ use Misuzu\SiteInfo;
use Misuzu\Users\Assets\UserAvatarAsset;
use Aiwass\Server\{RpcActionHandler,RpcQuery};
use Index\XArray;
use Index\Colour\{Colour,ColourRGB};
use Index\Colour\{Colour,ColourRgb};
use Index\Urls\UrlRegistry;
final class UsersRpcActions extends RpcActionHandler {
@ -35,7 +35,7 @@ final class UsersRpcActions extends RpcActionHandler {
} else {
// Index doesn't have a proper toRawRGB func???
$colourRaw = Colour::toMisuzu($colour) & 0xFFFFFF;
$colourCSS = (string)ColourRGB::convert($colour);
$colourCSS = (string)ColourRgb::convert($colour);
}
$baseUrl = $this->siteInfo->getURL();