Skip to content
This repository has been archived by the owner on Jun 14, 2018. It is now read-only.

Commit

Permalink
Bugfix for droplets-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
aldus committed Nov 17, 2016
1 parent 378e02d commit 5e4a6dd
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions ckeditor/plugins/droplets/droplets.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ function wbdroplet_clean_str( &$aStr) {
$sql = 'SELECT * FROM `'.TABLE_PREFIX.'mod_droplets` ';
$sql .= 'WHERE `active`=1 ';
$sql .= 'ORDER BY `name` ASC';
if($resRec = $database->query($sql))
{
while( !false == ($droplet = $resRec->fetchRow( MYSQL_ASSOC ) ) )
{
$title = wbdroplet_clean_str($droplet['name']);
$desc = wbdroplet_clean_str($droplet['description']);
$comments = wbdroplet_clean_str($droplet['comments']);

$DropletSelectBox .= "new Array( '".$title."', '".$droplet['name']."'), ";
$description .= "new Array( '".$title."', '".$desc."'), ";
$usage .= "new Array( '".$title."', '".$comments."'), ";
}
$all_droplets = array();
$database->execute_query( $sql, true, $all_droplets, true );

foreach($all_droplets as $droplet) {
$title = wbdroplet_clean_str($droplet['name']);
$desc = wbdroplet_clean_str($droplet['description']);
$comments = wbdroplet_clean_str($droplet['comments']);

$DropletSelectBox .= "new Array( '".$title."', '".$droplet['name']."'), ";
$description .= "new Array( '".$title."', '".$desc."'), ";
$usage .= "new Array( '".$title."', '".$comments."'), ";
}

$DropletSelectBox = substr($DropletSelectBox,0,-2);
Expand Down

0 comments on commit 5e4a6dd

Please sign in to comment.