| @@ 1322-1332 (lines=11) @@ | ||
| 1319 | echo " $name: " . $_lang['installed'] . PHP_EOL; |
|
| 1320 | } |
|
| 1321 | // add system events |
|
| 1322 | if (count($events) > 0) { |
|
| 1323 | $ds=mysqli_query($sqlParser->conn, "SELECT id FROM $dbase.`".$table_prefix."site_plugins` WHERE name='$name' AND description='$desc';"); |
|
| 1324 | if ($ds) { |
|
| 1325 | $row = mysqli_fetch_assoc($ds); |
|
| 1326 | $id = $row["id"]; |
|
| 1327 | // remove existing events |
|
| 1328 | mysqli_query($sqlParser->conn, 'DELETE FROM ' . $dbase . '.`' . $table_prefix . 'site_plugin_events` WHERE pluginid = \'' . $id . '\''); |
|
| 1329 | // add new events |
|
| 1330 | mysqli_query($sqlParser->conn, "INSERT INTO $dbase.`" . $table_prefix . "site_plugin_events` (pluginid, evtid) SELECT '$id' as 'pluginid',se.id as 'evtid' FROM $dbase.`" . $table_prefix . "system_eventnames` se WHERE name IN ('" . implode("','", $events) . "')"); |
|
| 1331 | } |
|
| 1332 | } |
|
| 1333 | } |
|
| 1334 | } |
|
| 1335 | } |
|
| @@ 606-616 (lines=11) @@ | ||
| 603 | echo "<p> $name: <span class=\"ok\">" . $_lang['installed'] . "</span></p>"; |
|
| 604 | } |
|
| 605 | // add system events |
|
| 606 | if (count($events) > 0) { |
|
| 607 | $ds=mysqli_query($sqlParser->conn, "SELECT id FROM $dbase.`".$table_prefix."site_plugins` WHERE name='$name' AND description='$desc';"); |
|
| 608 | if ($ds) { |
|
| 609 | $row = mysqli_fetch_assoc($ds); |
|
| 610 | $id = $row["id"]; |
|
| 611 | // remove existing events |
|
| 612 | mysqli_query($sqlParser->conn, 'DELETE FROM ' . $dbase . '.`' . $table_prefix . 'site_plugin_events` WHERE pluginid = \'' . $id . '\''); |
|
| 613 | // add new events |
|
| 614 | mysqli_query($sqlParser->conn, "INSERT INTO $dbase.`" . $table_prefix . "site_plugin_events` (pluginid, evtid) SELECT '$id' as 'pluginid',se.id as 'evtid' FROM $dbase.`" . $table_prefix . "system_eventnames` se WHERE name IN ('" . implode("','", $events) . "')"); |
|
| 615 | } |
|
| 616 | } |
|
| 617 | } |
|
| 618 | } |
|
| 619 | } |
|