@@ -23,9 +23,6 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | 25 | use Xmf\Module\Admin; |
| 26 | -use Xmf\Database\Tables; |
|
| 27 | -use Xmf\Debug; |
|
| 28 | -use Xmf\Module\Helper; |
|
| 29 | 26 | use Xmf\Module\Helper\Permission; |
| 30 | 27 | use Xmf\Request; |
| 31 | 28 | |
@@ -342,10 +342,10 @@ |
||
| 342 | 342 | } |
| 343 | 343 | } else { |
| 344 | 344 | xoops_confirm(array( |
| 345 | - 'ok' => 1, |
|
| 346 | - 'id' => Request::getString('id', ''), |
|
| 347 | - 'op' => 'delete' |
|
| 348 | - ), Request::getCmd('REQUEST_URI', '', 'SERVER'), sprintf(AM_EQUIPMENT_FORMSUREDEL, $customerObject->getVar('last'))); |
|
| 345 | + 'ok' => 1, |
|
| 346 | + 'id' => Request::getString('id', ''), |
|
| 347 | + 'op' => 'delete' |
|
| 348 | + ), Request::getCmd('REQUEST_URI', '', 'SERVER'), sprintf(AM_EQUIPMENT_FORMSUREDEL, $customerObject->getVar('last'))); |
|
| 349 | 349 | } |
| 350 | 350 | break; |
| 351 | 351 | |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | $criteria->setLimit($customerPaginationLimit); |
| 57 | 57 | $criteria->setStart($start); |
| 58 | 58 | $customerTempRows = $customerHandler->getCount(); |
| 59 | - $customerTempArray = $customerHandler->getAll($criteria);/* |
|
| 59 | + $customerTempArray = $customerHandler->getAll($criteria); /* |
|
| 60 | 60 | // |
| 61 | 61 | // |
| 62 | 62 | <th class='center width5'>".AM_EQUIPMENT_FORM_ACTION."</th> |
@@ -23,9 +23,6 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | 25 | use Xmf\Module\Admin; |
| 26 | -use Xmf\Database\Tables; |
|
| 27 | -use Xmf\Debug; |
|
| 28 | -use Xmf\Module\Helper; |
|
| 29 | 26 | use Xmf\Module\Helper\Permission; |
| 30 | 27 | use Xmf\Request; |
| 31 | 28 | |
@@ -357,10 +357,10 @@ |
||
| 357 | 357 | } |
| 358 | 358 | } else { |
| 359 | 359 | xoops_confirm(array( |
| 360 | - 'ok' => 1, |
|
| 361 | - 'id' => Request::getString('id', ''), |
|
| 362 | - 'op' => 'delete' |
|
| 363 | - ), Request::getCmd('REQUEST_URI', '', 'SERVER'), sprintf(AM_EQUIPMENT_FORMSUREDEL, $equipmentObject->getVar('name'))); |
|
| 360 | + 'ok' => 1, |
|
| 361 | + 'id' => Request::getString('id', ''), |
|
| 362 | + 'op' => 'delete' |
|
| 363 | + ), Request::getCmd('REQUEST_URI', '', 'SERVER'), sprintf(AM_EQUIPMENT_FORMSUREDEL, $equipmentObject->getVar('name'))); |
|
| 364 | 364 | } |
| 365 | 365 | break; |
| 366 | 366 | |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | $criteria->setLimit($equipmentPaginationLimit); |
| 57 | 57 | $criteria->setStart($start); |
| 58 | 58 | $equipmentTempRows = $equipmentHandler->getCount(); |
| 59 | - $equipmentTempArray = $equipmentHandler->getAll($criteria);/* |
|
| 59 | + $equipmentTempArray = $equipmentHandler->getAll($criteria); /* |
|
| 60 | 60 | // |
| 61 | 61 | // |
| 62 | 62 | <th class='center width5'>".AM_EQUIPMENT_FORM_ACTION."</th> |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | /** |
| 45 | 45 | * Constructor |
| 46 | 46 | * |
| 47 | - * @param $target |
|
| 47 | + * @param EquipmentCustomer $target |
|
| 48 | 48 | */ |
| 49 | 49 | public function __construct($target) |
| 50 | 50 | { |
@@ -22,7 +22,6 @@ |
||
| 22 | 22 | * @since 1.0.0 |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | -use Xmf\Request; |
|
| 26 | 25 | use Xmf\Module\Helper; |
| 27 | 26 | use Xmf\Module\Helper\Permission; |
| 28 | 27 | |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | /** |
| 45 | 45 | * Constructor |
| 46 | 46 | * |
| 47 | - * @param $target |
|
| 47 | + * @param EquipmentEquipment $target |
|
| 48 | 48 | */ |
| 49 | 49 | public function __construct($target) |
| 50 | 50 | { |
@@ -22,7 +22,6 @@ |
||
| 22 | 22 | * @since 1.0.0 |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | -use Xmf\Request; |
|
| 26 | 25 | use Xmf\Module\Helper; |
| 27 | 26 | use Xmf\Module\Helper\Permission; |
| 28 | 27 | |
@@ -296,6 +296,9 @@ |
||
| 296 | 296 | return $success; |
| 297 | 297 | } |
| 298 | 298 | |
| 299 | + /** |
|
| 300 | + * @param string $sql |
|
| 301 | + */ |
|
| 299 | 302 | public static function getQueryDataToJSON($sql) |
| 300 | 303 | { |
| 301 | 304 | global $xoopsDB; |
@@ -186,8 +186,7 @@ |
||
| 186 | 186 | } |
| 187 | 187 | file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
| 188 | 188 | } |
| 189 | - } |
|
| 190 | - catch (Exception $e) { |
|
| 189 | + } catch (Exception $e) { |
|
| 191 | 190 | echo 'Caught exception: ', $e->getMessage(), '', '<br>'; |
| 192 | 191 | } |
| 193 | 192 | } |
@@ -22,8 +22,6 @@ |
||
| 22 | 22 | * @since 1.0.0 |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | -use Xmf\Language; |
|
| 26 | - |
|
| 27 | 25 | if ((!defined('XOOPS_ROOT_PATH')) || !$GLOBALS['xoopsUser'] instanceof XoopsUser |
| 28 | 26 | || !$GLOBALS['xoopsUser']->IsAdmin()) { |
| 29 | 27 | exit('Restricted access' . PHP_EOL); |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | foreach ($configurator['templateFolders'] as $folder) { |
| 96 | 96 | $templateFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $folder); |
| 97 | 97 | if (is_dir($templateFolder)) { |
| 98 | - $templateList = array_diff(scandir($templateFolder,SCANDIR_SORT_NONE), array('..', '.')); |
|
| 98 | + $templateList = array_diff(scandir($templateFolder, SCANDIR_SORT_NONE), array('..', '.')); |
|
| 99 | 99 | foreach ($templateList as $k => $v) { |
| 100 | 100 | $fileInfo = new SplFileInfo($templateFolder . $v); |
| 101 | 101 | if ($fileInfo->getExtension() === 'html' && $fileInfo->getFilename() !== 'index.html') { |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | // INNER JOIN `%2$s` ON `%1$s`.`id`=`%2$s`.`id` WHERE `%1$s`.`borrower`="%3$s"', $xoopsDB->prefix('equipment_rentals'), $xoopsDB->prefix('equipment_equipment'), $xoopsUser->uname()); |
| 122 | 122 | |
| 123 | 123 | $borrow_sql = 'SELECT r.quantity, e.name, c.first, c.last FROM ' . $xoopsDB->prefix('equipment_equipment') . ' AS e, ' . $xoopsDB->prefix('equipment_customer') . ' AS c, ' |
| 124 | - . $xoopsDB->prefix('equipment_rentals') . ' AS r WHERE e.id = r.equipmentid AND c.id = r.customerid'; |
|
| 124 | + . $xoopsDB->prefix('equipment_rentals') . ' AS r WHERE e.id = r.equipmentid AND c.id = r.customerid'; |
|
| 125 | 125 | |
| 126 | 126 | $borrow_data = EquipmentUtility::getQueryDataToJSON($borrow_sql); |
| 127 | 127 | |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | $form .= MB_EQUIPMENT_CATTODISPLAY . "<br><select name='options[]' multiple='multiple' size='5'>"; |
| 89 | 89 | $form .= "<option value='0' " . (in_array(0, $options) === false ? '' : "selected='selected'") . '>' . MB_EQUIPMENT_ALLCAT . '</option>'; |
| 90 | 90 | foreach (array_keys($equipmentArray) as $i) { |
| 91 | - $id = $equipmentArray[$i]->getVar('id'); |
|
| 91 | + $id = $equipmentArray[$i]->getVar('id'); |
|
| 92 | 92 | $form .= "<option value='" . $id . "' " . (in_array($id, $options) === false ? '' : "selected='selected'") . '>' . $equipmentArray[$i]->getVar('name') . '</option>'; |
| 93 | 93 | } |
| 94 | 94 | $form .= '</select>'; |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | $form .= MB_EQUIPMENT_CATTODISPLAY . "<br><select name='options[]' multiple='multiple' size='5'>"; |
| 87 | 87 | $form .= "<option value='0' " . (in_array(0, $options) === false ? '' : "selected='selected'") . '>' . MB_EQUIPMENT_ALLCAT . '</option>'; |
| 88 | 88 | foreach (array_keys($customerArray) as $i) { |
| 89 | - $id = $customerArray[$i]->getVar('id'); |
|
| 89 | + $id = $customerArray[$i]->getVar('id'); |
|
| 90 | 90 | $form .= "<option value='" . $id . "' " . (in_array($id, $options) === false ? '' : "selected='selected'") . '>' . $customerArray[$i]->getVar('last') . '</option>'; |
| 91 | 91 | } |
| 92 | 92 | $form .= '</select>'; |