mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
Fix some review issues
This commit is contained in:
@@ -13,7 +13,7 @@ import withAttr from '../utils/withAttr';
|
||||
*/
|
||||
export default class Select extends Component {
|
||||
view() {
|
||||
const { options, onchange, value, disabled, bidi } = this.attrs;
|
||||
const { options, onchange, value, disabled } = this.attrs;
|
||||
|
||||
return (
|
||||
<span className="Select">
|
||||
|
@@ -13,7 +13,7 @@ use Flarum\Database\AbstractModel;
|
||||
use Flarum\Http\SlugDriverInterface;
|
||||
use Flarum\User\User;
|
||||
|
||||
class IdWithSlugDriver implements SlugDriverInterface
|
||||
class IdWithTransliteratedSlugDriver implements SlugDriverInterface
|
||||
{
|
||||
public function toSlug(AbstractModel $instance): string
|
||||
{
|
||||
@@ -22,7 +22,7 @@ class IdWithSlugDriver implements SlugDriverInterface
|
||||
|
||||
public function fromSlug(string $slug, User $actor): AbstractModel
|
||||
{
|
||||
if (strpos($slug, '-') == true) {
|
||||
if (strpos($slug, '-')) {
|
||||
$slug_array = explode('-', $slug);
|
||||
$slug = $slug_array[0];
|
||||
}
|
@@ -10,7 +10,7 @@
|
||||
namespace Flarum\Http;
|
||||
|
||||
use Flarum\Discussion\Discussion;
|
||||
use Flarum\Discussion\IdWithSlugDriver;
|
||||
use Flarum\Discussion\IdWithTransliteratedSlugDriver;
|
||||
use Flarum\Foundation\AbstractServiceProvider;
|
||||
use Flarum\Foundation\Application;
|
||||
use Flarum\Post\Post;
|
||||
@@ -36,7 +36,7 @@ class HttpServiceProvider extends AbstractServiceProvider
|
||||
$this->app->singleton('flarum.http.slugDrivers', function () {
|
||||
return [
|
||||
Discussion::class => [
|
||||
'default' => IdWithSlugDriver::class
|
||||
'default' => IdWithTransliteratedSlugDriver::class
|
||||
],
|
||||
User::class => [
|
||||
'default' => UsernameSlugDriver::class
|
||||
|
Reference in New Issue
Block a user