From: Roland Häder Date: Sun, 20 Jun 2010 22:28:04 +0000 (+0000) Subject: Yet another bunch of EL/surfbar fixes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=42d36ab276be084305ebdb57feb4e60c6b3ec916;p=mailer.git Yet another bunch of EL/surfbar fixes --- diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index cf46a9366e..b4b8d03dcd 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -720,7 +720,7 @@ function adminChangeActivationStatus ($IDs, $table, $row, $idRow = 'id') { } // Send mails for del/edit/lock build modes -function sendAdminBuildMails ($mode, $table, $content, $id, $subjectPart = '', $userid = 'userid_raw') { +function sendAdminBuildMails ($mode, $table, $content, $id, $subjectPart = '', $userid = 'userid') { // Default subject is the subject part $subject = $subjectPart; @@ -758,7 +758,7 @@ function sendAdminBuildMails ($mode, $table, $content, $id, $subjectPart = '', $ } // Build a special template list -function adminListBuilder ($listType, $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $userid = 'userid_raw') { +function adminListBuilder ($listType, $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $userid = 'userid') { $OUT = ''; $SW = 2; // "Walk" through all entries @@ -780,9 +780,10 @@ function adminListBuilder ($listType, $IDs, $table, $columns, $filterFunctions, $idx = array_search($key, $columns, true); // Do we have a userid? - if ($key == 'userid') { + if ($key == $userIdColumn) { // Add it again as raw id - $content[$userid] = bigintval($value); + $content[$userIdColumn] = bigintval($value); + $content[$userIdColumn . '_raw'] = $content[$userIdColumn]; } // END - if // If the key matches the idColumn variable, we need to temporary remember it @@ -824,7 +825,7 @@ function adminListBuilder ($listType, $IDs, $table, $columns, $filterFunctions, } // Change status of "build" list -function adminBuilderStatusHandler ($mode, $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray, $userid = 'userid_raw') { +function adminBuilderStatusHandler ($mode, $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray, $userid = 'userid') { // All valid entries? (We hope so here!) if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues)) && (count($statusArray) > 0)) { // "Walk" through all entries @@ -913,7 +914,7 @@ function adminBuilderStatusHandler ($mode, $IDs, $table, $columns, $filterFuncti } // Delete rows by given id numbers -function adminDeleteEntriesConfirm ($IDs, $table, $columns = array(), $filterFunctions = array(), $extraValues = array(), $deleteNow = false, $idColumn = 'id', $userIdColumn = 'userid', $userid = 'userid_raw') { +function adminDeleteEntriesConfirm ($IDs, $table, $columns = array(), $filterFunctions = array(), $extraValues = array(), $deleteNow = false, $idColumn = 'id', $userIdColumn = 'userid', $userid = 'userid') { // All valid entries? (We hope so here!) if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues))) { // Shall we delete here or list for deletion? @@ -967,7 +968,7 @@ function adminDeleteEntriesConfirm ($IDs, $table, $columns = array(), $filterFun } // Edit rows by given id numbers -function adminEditEntriesConfirm ($IDs, $table, $columns = array(), $filterFunctions = array(), $extraValues = array(), $editNow = false, $idColumn = 'id', $userIdColumn = 'userid', $userid = 'userid_raw') { +function adminEditEntriesConfirm ($IDs, $table, $columns = array(), $filterFunctions = array(), $extraValues = array(), $editNow = false, $idColumn = 'id', $userIdColumn = 'userid', $userid = 'userid') { // All valid entries? (We hope so here!) if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues))) { // Shall we change here or list for editing? diff --git a/inc/modules/admin/what-list_surfbar_urls.php b/inc/modules/admin/what-list_surfbar_urls.php index 0cf6e2ab96..248d360c81 100644 --- a/inc/modules/admin/what-list_surfbar_urls.php +++ b/inc/modules/admin/what-list_surfbar_urls.php @@ -48,8 +48,8 @@ addMenuDescription('admin', __FILE__); // By default show the list... $show = true; -// Check for 'id' element -if ((countRequestPost() > 0) && ((!isPostRequestParameterSet('id')) || (!is_array(postRequestParameter('id'))) || (count(postRequestParameter('id')) == 0))) { +// Check for 'url_id' element +if ((countRequestPost() > 0) && ((!isPostRequestParameterSet('url_id')) || (!is_array(postRequestParameter('url_id'))) || (count(postRequestParameter('url_id')) == 0))) { // Not found so output message loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_SELECTIONS')); @@ -61,11 +61,15 @@ if ((countRequestPost() > 0) && ((!isPostRequestParameterSet('id')) || (!is_arra if (isFormSent('edit')) { // Show entries for editing adminEditEntriesConfirm( - postRequestParameter('id'), + postRequestParameter('url_id'), 'surfbar_urls', array('url_id', 'url_userid', 'url'), array('bigintval', 'addMemberSelectionBox', ''), - array('', array(false, true, true, 'userid[]'), '') + array('', array(false, true, true, 'url_userid[]'), ''), + false, + 'url_id', + 'url_userid', + 'url_userid' ); $show = false; } elseif (isPostRequestParameterSet('do_edit')) { @@ -77,7 +81,9 @@ if (isFormSent('edit')) { array(), array(), true, - 'url_id' + 'url_id', + 'url_userid', + 'url_userid' ); } elseif (isPostRequestParameterSet('delete')) { // Show entries for deletion @@ -89,7 +95,7 @@ if (isFormSent('edit')) { array('', '', '', ''), false, 'url_id', - 'userid', + 'url_userid', 'url_userid' ); $show = false; @@ -101,11 +107,13 @@ if (isFormSent('edit')) { adminLockEntriesConfirm( postRequestParameter('url_id'), 'surfbar_urls', - array('url_id', 'url_userid', 'url', 'url_registered', 'status'), + array('url_id', 'url_userid', 'url', 'url_registered', 'url_status'), array('bigintval', 'generateUserProfileLink', 'generateFrametesterUrl', '', 'translateSurfbarUrlStatus'), array('', '', '', '', ''), false, - 'url_id' + 'url_id', + 'url_userid', + 'url_userid' ); $show = false; } elseif (isPostRequestParameterSet('do_lock')) { @@ -116,20 +124,24 @@ if (isFormSent('edit')) { array(), array(), array(), - array('status' => array('ACTIVE' => 'LOCKED', 'LOCKED' => 'ACTIVE')), + array('url_status' => array('ACTIVE' => 'LOCKED', 'LOCKED' => 'ACTIVE')), true, - 'url_id' + 'url_id', + 'url_userid', + 'url_userid' ); } elseif (isPostRequestParameterSet('undelete')) { // Undelete selected URLs. This does only work for deleted URLs... ;-) adminUndeleteEntriesConfirm( postRequestParameter('url_id'), 'surfbar_urls', - array('url_id', 'url_userid', 'url', 'url_registered', 'status'), + array('url_id', 'url_userid', 'url', 'url_registered', 'url_status'), array('bigintval', 'generateUserProfileLink', 'generateFrametesterUrl', '', 'translateSurfbarUrlStatus'), array('', '', '', '', ''), false, - 'url_id' + 'url_id', + 'url_userid', + 'url_userid' ); $show = false; } elseif (isPostRequestParameterSet('do_undelete')) { @@ -140,9 +152,11 @@ if (isFormSent('edit')) { array(), array(), array(), - array('status' => array('DELETED' => 'ACTIVE')), + array('url_status' => array('DELETED' => 'ACTIVE')), true, - 'url_id' + 'url_id', + 'url_userid', + 'url_userid' ); } diff --git a/templates/de/html/admin/admin_del_surfbar_urls_row.tpl b/templates/de/html/admin/admin_del_surfbar_urls_row.tpl index 9f5d3194d6..6d193e7306 100644 --- a/templates/de/html/admin/admin_del_surfbar_urls_row.tpl +++ b/templates/de/html/admin/admin_del_surfbar_urls_row.tpl @@ -1,7 +1,7 @@ - + $content[url_userid] diff --git a/templates/de/html/admin/admin_edit_surfbar_urls_row.tpl b/templates/de/html/admin/admin_edit_surfbar_urls_row.tpl index a3fe707a51..1047c62308 100644 --- a/templates/de/html/admin/admin_edit_surfbar_urls_row.tpl +++ b/templates/de/html/admin/admin_edit_surfbar_urls_row.tpl @@ -1,7 +1,7 @@ - + $content[url_userid] diff --git a/templates/de/html/admin/admin_lock_surfbar_urls_row.tpl b/templates/de/html/admin/admin_lock_surfbar_urls_row.tpl index 24b25df46c..cd6cbc4936 100644 --- a/templates/de/html/admin/admin_lock_surfbar_urls_row.tpl +++ b/templates/de/html/admin/admin_lock_surfbar_urls_row.tpl @@ -1,7 +1,7 @@ - + $content[url_userid] diff --git a/templates/de/html/admin/admin_undelete_surfbar_urls_row.tpl b/templates/de/html/admin/admin_undelete_surfbar_urls_row.tpl index d3432a7a12..b35074df51 100644 --- a/templates/de/html/admin/admin_undelete_surfbar_urls_row.tpl +++ b/templates/de/html/admin/admin_undelete_surfbar_urls_row.tpl @@ -1,7 +1,7 @@ - + $content[url_userid]