Removed nameExactly option
authorMarcel Werk <burntime@woltlab.com>
Wed, 18 May 2022 14:17:39 +0000 (16:17 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 18 May 2022 14:17:39 +0000 (16:17 +0200)
com.woltlab.wcf/templates/search.tpl
wcfsetup/install/files/lib/data/search/SearchAction.class.php
wcfsetup/install/files/lib/system/search/SearchHandler.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 8efade706ba5a7a4c93e108a289a12d2e95b4124..a3233bbfd887cff32501e80de76fcb1112836209 100644 (file)
@@ -31,7 +31,6 @@
                                        <dt><label for="searchAuthor">{lang}wcf.search.author{/lang}</label></dt>
                                        <dd>
                                                <input type="text" id="searchAuthor" name="username" value="" class="medium" maxlength="255" autocomplete="off">
-                                               <label><input type="checkbox" name="nameExactly" value="1"> {lang}wcf.search.matchExactly{/lang}</label>
                                                {* deprecated *}{event name='authorOptions'}
                                        </dd>
                                </dl>
index b830e94ddd5d6f51a752edee6b390fb37411d546..18d7caa8c50b6282bc46d259b419e74577cf7f9d 100644 (file)
@@ -54,7 +54,6 @@ class SearchAction extends AbstractDatabaseObjectAction
         $this->readString('q', true);
         $this->readString('type', true);
         $this->readString('username', true);
-        $this->readBoolean('nameExactly', true);
         $this->readBoolean('subjectOnly', true);
         $this->readString('startDate', true);
         $this->readString('endDate', true);
index 781638dbef169e236651a2ed90a686d4adadfe87..523ea0f31599f7c3a525b2b11e720f8d83540652 100644 (file)
@@ -224,9 +224,9 @@ final class SearchHandler
             if (!empty($this->parameters['username'])) {
                 $sql = "SELECT  userID
                         FROM    wcf" . WCF_N . "_user
-                        WHERE   username " . (!empty($this->parameters['nameExactly']) ? "= ?" : "LIKE ?");
+                        WHERE   username = ?";
                 $statement = WCF::getDB()->prepareStatement($sql, 100);
-                $statement->execute([$this->parameters['username'] . (empty($this->parameters['nameExactly']) ? '%' : '')]);
+                $statement->execute([$this->parameters['username']]);
                 $this->userIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
             }
 
@@ -311,7 +311,6 @@ final class SearchHandler
             'additionalData' => $this->getAdditionalData(),
             'sortField' => $this->parameters['sortField'] ?? '',
             'sortOrder' => $this->parameters['sortOrder'] ?? '',
-            'nameExactly' => $this->parameters['nameExactly'] ?? '',
             'subjectOnly' => $this->parameters['subjectOnly'] ?? '',
             'startDate' => $this->parameters['startDate'] ?? '',
             'endDate' => $this->parameters['endDate'] ?? '',
index 7f1d1f446ef15a8b377e8c32ae3a4ed2aaa3881b..27471990f129f09fac35bad8da1c136c330a1d2e 100644 (file)
@@ -4508,7 +4508,6 @@ Dateianhänge:
        <category name="wcf.search">
                <item name="wcf.search.author"><![CDATA[Suche nach Autor]]></item>
                <item name="wcf.search.extended"><![CDATA[Erweiterte Suche]]></item>
-               <item name="wcf.search.matchExactly"><![CDATA[Exakter Treffer]]></item>
                <item name="wcf.search.period"><![CDATA[Im Zeitraum]]></item>
                <item name="wcf.search.sortBy"><![CDATA[Sortierung]]></item>
                <item name="wcf.search.sortBy.relevance"><![CDATA[Relevanz]]></item>
@@ -5618,5 +5617,6 @@ Benachrichtigungen auf <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phra
        <item name="wcf.user.profile.customization" />
        <item name="wcf.acp.option.enable_desktop_notifications"/>
        <item name="wcf.acp.option.enable_desktop_notifications.description"/>
+       <item name="wcf.search.matchExactly" />
 </delete>
 </language>
index c9e8dcd2676a274a40992aae880845742b520267..bea06f9691fedc2e8cb42e422b8f54e1e433531e 100644 (file)
@@ -4510,7 +4510,6 @@ Attachments:
        <category name="wcf.search">
                <item name="wcf.search.author"><![CDATA[Search by Author]]></item>
                <item name="wcf.search.extended"><![CDATA[More Options]]></item>
-               <item name="wcf.search.matchExactly"><![CDATA[Exact match]]></item>
                <item name="wcf.search.period"><![CDATA[Time Period]]></item>
                <item name="wcf.search.sortBy"><![CDATA[Sort by]]></item>
                <item name="wcf.search.sortBy.relevance"><![CDATA[Relevance]]></item>
@@ -5620,5 +5619,6 @@ your notifications on <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phras
        <item name="wcf.user.profile.customization" />
        <item name="wcf.acp.option.enable_desktop_notifications"/>
        <item name="wcf.acp.option.enable_desktop_notifications.description"/>
+       <item name="wcf.search.matchExactly" />
 </delete>
 </language>