Skip to content

Commit

Permalink
Merge pull request #1494 from MitrahSoft/_Admin_Modern_
Browse files Browse the repository at this point in the history
Code changes in query for Admin_Modern
  • Loading branch information
michaeloffner authored Feb 8, 2024
2 parents ca53b21 + a72e459 commit 833ad14
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
4 changes: 2 additions & 2 deletions core/src/main/cfml/context/doc/categories.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@

<div class="tile-wrap tile-wrap-animation">
<cfloop index="i" list="#myList#">
<cfquery name="queryList" dbtype="query">
SELECT category FROM qryAllItems WHERE category LIKE '#i#%';
<cfquery name="queryList" dbtype="query" params=#["#i#%"]#>
SELECT category FROM qryAllItems WHERE category LIKE ?;
</cfquery>
<div class="tile tile-collapse tile-collapse-full">
<div class="tile-toggle" data-target="##category-#lCase(i)#" data-toggle="tile">
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/cfml/context/doc/functions.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@

<div class="tile-wrap tile-wrap-animation">
<cfloop index="i" list="#list#">
<cfquery name="queryList" dbtype="query">
SELECT functions FROM qryAllItems WHERE functions LIKE '#i#%';
<cfquery name="queryList" dbtype="query" params=#["#i#%"]#>
SELECT functions FROM qryAllItems WHERE functions LIKE ?;
</cfquery>
<div class="tile tile-collapse tile-collapse-full">
<div class="tile-toggle" data-target="##function-#lCase(i)#" data-toggle="tile">
Expand Down
7 changes: 4 additions & 3 deletions core/src/main/cfml/context/doc/tags.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,11 @@
<cfset queryList = queryNew("tags")>
<cfset QueryAddRow(queryList, ["cf_"])>
<cfelse>
<cfquery name="queryList" dbtype="query">
SELECT tags FROM qryAllItems WHERE tags LIKE 'cf#i#%';
<cfquery name="queryList" dbtype="query" params=#["cf#i#%"]#>
SELECT tags FROM qryAllItems WHERE tags LIKE ?;
</cfquery>
</cfif>

<div class="tile tile-collapse tile-collapse-full">
<div class="tile-toggle" data-target="##function-#lCase(i)#" data-toggle="tile">
<div class="tile-inner">
Expand All @@ -343,4 +344,4 @@
</cfoutput>


</cfmodule><!--- doc_layout !--->
</cfmodule><!--- doc_layout !--->
Original file line number Diff line number Diff line change
Expand Up @@ -517,12 +517,12 @@ component {

var mailServers = getMailservers();
if( structKeyExists(arguments, 'username') && arguments.username == '' ){
query name="local.existing" dbtype="query"{
echo("SELECT * FROM mailservers WHERE hostName = '#arguments.host#' and port = '#arguments.port#' ")
query name="local.existing" dbtype="query" params=[arguments.host,arguments.port]{
echo("SELECT * FROM mailservers WHERE hostName = ? AND port = ?")
}
} else{
query name="local.existing" dbtype="query"{
echo("SELECT * FROM mailservers WHERE hostName = '#arguments.host#' and port = '#arguments.port#' and username = '#arguments.username#' ")
query name="local.existing" dbtype="query" params=[arguments.host,arguments.port,arguments.username]{
echo("SELECT * FROM mailservers WHERE hostName = ? AND port = ? AND username = ?")
}
}

Expand Down Expand Up @@ -1185,8 +1185,8 @@ component {
boolean storage
){
var connections = getCacheConnections()
query name="local.existing" dbtype="query"{
echo("SELECT * FROM connections WHERE class = '#arguments.class#' and name = '#arguments.name#' ")
query name="local.existing" dbtype="query" params=[arguments.class,arguments.name]{
echo("SELECT * FROM connections WHERE class = ? AND name = ?")
}

admin
Expand Down Expand Up @@ -1378,8 +1378,8 @@ component {
*/
public void function updateGatewayEntry( required string id, required string startupMode, string class, string cfcPath, string listenerCfcPath, struct custom ){
var getGatewayEntries = getGatewayEntries();
query name="local.existing" dbtype="query"{
echo("SELECT * FROM getGatewayEntries WHERE id = '#arguments.id#' and startupMode = '#arguments.startupMode#' ")
query name="local.existing" dbtype="query" params=[arguments.id,arguments.startupMode]{
echo("SELECT * FROM getGatewayEntries WHERE id = ? AND startupMode = ?")
}
admin
action="updateGatewayEntry"
Expand Down Expand Up @@ -1502,8 +1502,8 @@ component {
var driver=drivers[trim(arguments.type)];
var meta=getMetaData(driver);
var debugEntry = getDebugEntry();
query name="local.existing" dbtype="query"{
echo("SELECT * FROM debugEntry WHERE label = '#arguments.label#' ");
query name="local.existing" dbtype="query" params=[arguments.label]{
echo("SELECT * FROM debugEntry WHERE label = ?");
}
admin
action="updateDebugEntry"
Expand Down Expand Up @@ -1972,8 +1972,8 @@ component {
, struct layoutArgs={}
){
var LogSettings = getLogSettings();
query name="local.existing" dbtype="query"{
echo("SELECT * FROM LogSettings WHERE name = '#arguments.name#' ");
query name="local.existing" dbtype="query" params=[arguments.name]{
echo("SELECT * FROM LogSettings WHERE name = ?");
}

admin
Expand Down

0 comments on commit 833ad14

Please sign in to comment.