diff --git a/admin/addCategory.php b/admin/addCategory.php index 8438544..fa6f16e 100644 --- a/admin/addCategory.php +++ b/admin/addCategory.php @@ -6,8 +6,9 @@ require_once(BASE."include/category.php"); if(!$_SESSION['current']->hasPriv("admin")) util_show_error_page_and_exit(); -$oCat = new Category($aClean['iCatId']); -if($aClean['sSubmit']) +$aClean['iCatId'] = (isset($aClean['iCatId']) ? $aClean['iCatId'] : ''); +$oCat = new Category( $aClean['iCatId'] ); +if(isset($aClean['sSubmit'])) { $oCat->update($aClean['sName'],$aClean['sDescription'],$aClean['iParentId']); util_redirect_and_exit(apidb_fullurl("appbrowse.php?iCatId=".$oCat->iCatId)); diff --git a/admin/adminBugs.php b/admin/adminBugs.php index 9bb9764..d0ce6ac 100644 --- a/admin/adminBugs.php +++ b/admin/adminBugs.php @@ -14,7 +14,7 @@ require_once(BASE."include/bugs.php"); if(!$_SESSION['current']->hasPriv("admin")) util_show_error_page_and_exit("Insufficient privileges."); -if ($aClean['sSub']) +if (isset($aClean['sSub'])) { if(($aClean['sSub'] == 'delete' ) && ($aClean['iBuglinkId'])) { @@ -34,15 +34,12 @@ if ($aClean['sSub']) apidb_header("Administer Bugs"); $pageRange = 10; - $ItemsPerPage = 10; - $currentPage = 1; + $QueuedOnly = empty($aClean['sQueuedOnly'])? NULL: $aClean['sQueuedOnly']; $BugLinks = ($QueuedOnly == 'on')?getNumberOfQueuedBugLinks():getNumberOfBugLinks(); - if($aClean['iItemsPerPage']) - $ItemsPerPage = $aClean['iItemsPerPage']; - if($aClean['iPage']) - $currentPage = $aClean['iPage']; + $ItemsPerPage = isset($aClean['iItemsPerPage']) ? $aClean['iItemsPerPage'] : 10; + $currentPage = isset($aClean['iPage']) ? $aClean['iPage'] : 1; $ItemsPerPage = min($ItemsPerPage,100); $totalPages = max(ceil($BugLinks/$ItemsPerPage),1); diff --git a/admin/adminCommentView.php b/admin/adminCommentView.php index 1af61fe..a12aa62 100644 --- a/admin/adminCommentView.php +++ b/admin/adminCommentView.php @@ -12,13 +12,8 @@ apidb_header("Comments"); /* display a range of 10 pages */ $pageRange = 10; -$ItemsPerPage = 10; -$currentPage = 1; - -if($aClean['iItemsPerPage']) - $ItemsPerPage = $aClean['iItemsPerPage']; -if($aClean['iPage']) - $currentPage = $aClean['iPage']; +$ItemsPerPage = isset($aClean['iItemsPerPage']) ? $aClean['iItemsPerPage'] : 10; +$currentPage = isset($aClean['iPage']) ? $aClean['iPage'] : 1; $totalPages = ceil(getNumberOfComments()/$ItemsPerPage); diff --git a/admin/adminMaintainers.php b/admin/adminMaintainers.php index 5fa2128..a6ee83f 100644 --- a/admin/adminMaintainers.php +++ b/admin/adminMaintainers.php @@ -16,7 +16,7 @@ if(!$_SESSION['current']->hasPriv("admin")) apidb_header("Admin Maintainers"); echo '
',"\n"; -if ($aClean['sSub']) +if (isset($aClean['sSub'])) { if($aClean['sSub'] == 'delete') { diff --git a/admin/adminScreenshots.php b/admin/adminScreenshots.php index 7ebaadb..0d433bd 100644 --- a/admin/adminScreenshots.php +++ b/admin/adminScreenshots.php @@ -16,7 +16,7 @@ if(!$_SESSION['current']->hasPriv("admin")) /* * We issued a delete command. */ -if($aClean['sCmd']) +if(isset($aClean['sCmd'])) { // process screenshot deletion if($aClean['sCmd'] == "delete" && is_numeric($aClean['iImageId'])) @@ -33,7 +33,7 @@ if($aClean['sCmd']) apidb_header("Screenshots"); // regenerate all screenshots -if($aClean['sRegenerate']) +if(isset($aClean['sRegenerate'])) { $sQuery = "SELECT id FROM appData WHERE type = 'screenshot'"; $hResult = query_parameters($sQuery); @@ -55,13 +55,8 @@ echo ""; /* display a range of 10 pages */ $pageRange = 10; -$ItemsPerPage = 6; -$currentPage = 1; - -if($aClean['iItemsPerPage']) - $ItemsPerPage = $aClean['iItemsPerPage']; -if($aClean['iPage']) - $currentPage = $aClean['iPage']; +$ItemsPerPage = isset($aClean['iItemsPerPage']) ? $aClean['iItemsPerPage'] : 6; +$currentPage = isset($aClean['iPage']) ? $aClean['iPage'] : 1; $ItemsPerPage = min($ItemsPerPage,100); $totalPages = ceil(appData::objectGetEntriesCount("all", false, diff --git a/admin/adminUsers.php b/admin/adminUsers.php index ec5251f..81c04d6 100644 --- a/admin/adminUsers.php +++ b/admin/adminUsers.php @@ -13,28 +13,70 @@ if(!$_SESSION['current']->hasPriv("admin")) // we want to delete a user -if($aClean['sAction'] == "delete" && is_numeric($aClean['iUserId'])) +if(isset($aClean['sAction']) && $aClean['sAction'] == "delete" && + is_numeric($aClean['iUserId'])) { $oUser = new User($aClean['iUserId']); $oUser->delete(); } + // search form -echo html_frame_start("Users Management","400","",0) +echo html_frame_start("Users Management","400","",0); + +$aClean['sSearch'] = isset($aClean['sSearch']) ? $aClean['sSearch'] : ''; + +$sLimit100 = $sLimit200 = $sLimit500 = ''; +if ( isset($aClean['iLimit']) ) +{ + switch ($aClean['iLimit']) + { + case '100': + $sLimit100 = 'selected'; + break; + case '200': + $sLimit200 = 'selected'; + break; + case '500': + $sLimit500 = 'selected'; + break; + } +} + +$sOrder1 = $sOrder2 = $sOrder3 = ''; +if ( isset($aClean['sOrderBy']) ) +{ + switch ($aClean['sOrderBy']) + { + case 'email': + $sOrder1 = 'selected'; + break; + case 'realname': + $sOrder2 = 'selected'; + break; + case 'created': + $sOrder3 = 'selected'; + break; + } +} + ?> - + @@ -42,9 +84,9 @@ echo html_frame_start("Users Management","400","",0) @@ -57,7 +99,7 @@ echo html_frame_start("Users Management","400","",0) echo html_frame_end(); // if the search form was submitted -if($aClean['sSubmit']) +if(isset($aClean['sSubmit'])) { echo html_frame_start("Query Results","90%","",0); echo "
Pattern
(leave blank to match all)
+ +
(leave blank to match all) +
Show first
Order by
\n\n"; diff --git a/appbrowse.php b/appbrowse.php index 0f5df9a..037d608 100644 --- a/appbrowse.php +++ b/appbrowse.php @@ -24,13 +24,14 @@ function admin_menu() $m->done(); } +$iCatId = isset($aClean['iCatId']) ? $aClean['iCatId'] : 0; // list sub categories -$oCat = new Category($aClean['iCatId']?$aClean['iCatId']:"0"); +$oCat = new Category( $iCatId ); $sCatFullPath = Category::make_cat_path($oCat->getCategoryPath()); $subs = $oCat->aSubcatsIds; //display admin box -if($_SESSION['current']->hasPriv("admin") && $aClean['iCatId'] != 0) +if($_SESSION['current']->hasPriv("admin") && isset($aClean['iCatId']) && $aClean['iCatId'] != 0 ) apidb_sidebar_add("admin_menu"); //output header @@ -92,11 +93,11 @@ if($subs) $oTable->AddRow($oTableRow); } - + // output the table echo $oTable->GetString(); - echo html_frame_end("$c categories"); + echo html_frame_end( count($subs) . ' categories'); } @@ -156,7 +157,7 @@ if($apps) // output table echo $oTable->GetString(); - echo html_frame_end("$c applications in this category"); + echo html_frame_end( count($apps) . " applications in this category"); } // Disabled for now diff --git a/appview.php b/appview.php index a73878a..272f4ca 100644 --- a/appview.php +++ b/appview.php @@ -27,8 +27,6 @@ require_once(BASE."include/category.php"); require_once(BASE."include/maintainer.php"); require_once(BASE."include/monitor.php"); -$oApp = new Application($aClean['iAppId']); -$oVersion = new Version($aClean['iVersionId']); /** * Displays the SUB apps that belong to this application. @@ -76,7 +74,7 @@ function display_bundle($iAppId) if(empty($aClean['iAppId']) && empty($aClean['iVersionId'])) util_show_error_page_and_exit("Something went wrong with the application or version id"); -if ($aClean['sSub']) +if (isset($aClean['sSub'])) { if(($aClean['sSub'] == 'delete' ) && ($aClean['iBuglinkId'])) { @@ -135,14 +133,15 @@ if ($aClean['sSub']) /** * We want to see an application family (=no version). */ -if($aClean['iAppId']) +if( isset($aClean['iAppId']) ) { $oApp = new Application($aClean['iAppId']); $oApp->display(); -} else if($aClean['iVersionId']) // We want to see a particular version. +} else if( isset($aClean['iVersionId']) ) // We want to see a particular version. { $oVersion = new Version($aClean['iVersionId']); - $oVersion->display($aClean['iTestingId']); + $iTestingId = isset($aClean['iTestingId']) ? $aClean['iTestingId'] : null; + $oVersion->display($iTestingId); } else { // Oops! Called with no params, bad llamah! diff --git a/browse_downloadable.php b/browse_downloadable.php index 71c2fcc..d80a9bc 100644 --- a/browse_downloadable.php +++ b/browse_downloadable.php @@ -12,13 +12,14 @@ apidb_header("Browse Downloadable Applications"); echo "
\n"; /* Match specific license? */ -$sLicense = version::checkLicense($aClean['sLicense']); +$sLicenseString = isset($aClean['sLicense']) ? $aClean['sLicense'] : ''; +$sLicense = version::checkLicense( $sLicenseString ); /* Set default values */ -if(!$aClean['iNumVersions'] || $aClean['iNumVersions'] > 200 || $aClean['iNumVersions'] < 0) +if(!isset($aClean['iNumVersions']) || $aClean['iNumVersions'] > 200 || $aClean['iNumVersions'] < 0) $aClean['iNumVersions'] = 25; -if(!$aClean['iPage']) +if( !isset($aClean['iPage']) ) $aClean['iPage'] = 1; /* Count the possible matches */ @@ -39,7 +40,7 @@ else if($hResult && mysql_num_rows($hResult)) $num = mysql_num_rows($hResult); -$iNumPages = ceil($num / $aClean['iNumVersions']); +$iNumPages = isset($num) ? ceil($num/$aClean['iNumVersions']) : 0; /* Check page logic */ $aClean['iPage'] = min($aClean['iPage'], $iNumPages); @@ -50,9 +51,11 @@ $iLimitLower = ($aClean['iPage'] - 1) * $aClean['iNumVersions']; /* Page selection */ echo "
\n"; echo "Page ".$aClean['iPage']." of $iNumPages
\n"; +// $iPageRange is non-existent here? creating it +$iPageRange = 10; display_page_range($aClean['iPage'], $iPageRange, $iNumPages, $_SERVER['PHP_SELF']."?iNumVersions=".$aClean['iNumVersions']."&sLicense=". - $aClean['sLicense']); + $sLicenseString); /* Selector for how many versions to display */ echo "\n"; @@ -78,7 +81,7 @@ echo $oVersion->makeLicenseList($sLicense); echo " \n"; echo "
\n
\n"; -if(!$num) +if(!isset($num)) { echo "
No matches found
\n"; echo html_frame_end(" "); diff --git a/help/index.php b/help/index.php index 0db00f4..f366671 100644 --- a/help/index.php +++ b/help/index.php @@ -8,7 +8,7 @@ require(BASE."include/"."incl.php"); $help_path = BASE."/help"; -if($aClean['sTopic']) +if(isset($aClean['sTopic'])) { display_help($aClean['sTopic']); } else { diff --git a/include/appData.php b/include/appData.php index 85a22ee..6279224 100644 --- a/include/appData.php +++ b/include/appData.php @@ -258,6 +258,8 @@ class appData { if($sQueued == "true" || $sQueued == "false") $sAppDataQueued = " AND appData.queued = '$sQueued'"; + else + $sAppDataQueued = ''; if($sType) $sSelectType = " AND type = '?'"; diff --git a/include/application.php b/include/application.php index aaf9ceb..88cb918 100644 --- a/include/application.php +++ b/include/application.php @@ -878,8 +878,8 @@ class Application { { if($_SESSION['current']->hasPriv("admin")) return TRUE; - - if(is_object($this) && $this->iAppId) + + if(isset($this) && is_object($this) && $this->iAppId) { if(maintainer::isUserSuperMaintainer($_SESSION['current'], $this->iAppId)) diff --git a/include/comment.php b/include/comment.php index 69e06f5..1144b5d 100644 --- a/include/comment.php +++ b/include/comment.php @@ -435,7 +435,7 @@ class Comment { else $mode = "threaded"; /* default non-logged in users to threaded comment display mode */ - if ($aClean['sMode']=="nested") + if ( isset($aClean['sMode']) && $aClean['sMode']=="nested") $mode = "nested"; switch ($mode) diff --git a/include/downloadurl.php b/include/downloadurl.php index 6a9da21..8e8a3f6 100644 --- a/include/downloadurl.php +++ b/include/downloadurl.php @@ -50,6 +50,8 @@ class downloadurl if(!($hResult = appData::getData($iVersionId, "downloadurl"))) return FALSE; + // we're appending, so initialize it + $sReturn = ''; for($i = 0; $oRow = mysql_fetch_object($hResult); $i++) { $sReturn .= html_tr(array( diff --git a/include/error_log.php b/include/error_log.php index abb312a..18799a3 100644 --- a/include/error_log.php +++ b/include/error_log.php @@ -22,9 +22,10 @@ class error_log $sQuery = 'INSERT INTO error_log (submitTime, userid, type, log_text, request_text, deleted) '. "VALUES(?, '?', '?', '?', '?', '?')"; + $iUser = (isset($_SESSION['current']) ? $_SESSION['current']->iUserId : 0); $hResult = query_parameters($sQuery, "NOW()", - $_SESSION['current']->iUserId, + $iUser, $sErrorType, $sLogText, $sRequestText, diff --git a/include/form_login.php b/include/form_login.php index 169ec2f..2bdae6a 100644 --- a/include/form_login.php +++ b/include/form_login.php @@ -9,7 +9,7 @@ echo '
',"\n"; echo html_frame_start("Login to Application DB","400","",0); /* Pass on the URL we should return to after log-in */ global $aClean; -echo ''; +echo ''; ?> diff --git a/include/form_new.php b/include/form_new.php index 05f43c8..62c3e8d 100644 --- a/include/form_new.php +++ b/include/form_new.php @@ -31,7 +31,7 @@ echo html_frame_start("Create New Application DB Account","400","",0)
"; ?> diff --git a/include/monitor.php b/include/monitor.php index f3966db..0bcf59b 100644 --- a/include/monitor.php +++ b/include/monitor.php @@ -47,11 +47,13 @@ class Monitor { WHERE userId = '".$iUserId."' AND versionId = '".$iVersionId."'"; $hResult = query_appdb($sQuery); - $oRow = mysql_fetch_object($hResult); - $this->iMonitorId = $oRow->monitorId; - $this->iAppId = $oRow->appId; - $this->iVersionId = $oRow->versionId; - $this->iUserId = $oRow->userId; + if( $oRow = mysql_fetch_object($hResult) ) + { + $this->iMonitorId = $oRow->monitorId; + $this->iAppId = $oRow->appId; + $this->iVersionId = $oRow->versionId; + $this->iUserId = $oRow->userId; + } } } diff --git a/include/objectManager.php b/include/objectManager.php index 805a948..4d67f61 100644 --- a/include/objectManager.php +++ b/include/objectManager.php @@ -492,7 +492,7 @@ class ObjectManager // is the value we modify and we'll be passing that into methods in the future global $aClean; - if(!$aClean['sSubmit']) + if(!isset($aClean['sSubmit'])) return; $this->checkMethods(array("getOutputEditorValues", "update", "create", @@ -513,12 +513,11 @@ class ObjectManager // handle the common response radio button value // if sReplyText is empty, if sOMCommonReply was set because // the user selected a radio button then use that text instead - if(($aClean['sReplyText'] == "") && isset($aClean['sOMCommonReply'])) + if( isset($aClean['sReplyText']) && $aClean['sReplyText'] == "" && isset($aClean['sOMCommonReply'])) { $aClean['sReplyText'] = $aClean['sOMCommonReply']; } - $oObject->getOutputEditorValues($aClean); /* Check input, if necessary */ @@ -635,10 +634,7 @@ class ObjectManager function getIdFromInput($aClean) { $sId = "i".ucfirst($this->sClass)."Id"; - $iId = $aClean['sId']; - - if(!$iId) - $iId = $aClean['iId']; + $iId = isset($aClean['sId']) ? $aClean['sId'] : $aClean['iId']; return $iId; } @@ -678,13 +674,12 @@ class ObjectManager $aItemsPerPage = $aReturn[0]; $iDefaultPerPage = $aReturn[1]; - $iItemsPerPage = $iDefaultPerPage; - foreach($aItemsPerPage as $iNum) - { - if($iNum == $aClean['iItemsPerPage']) - $iItemsPerPage = $aClean['iItemsPerPage']; - } + $iItemsPerPage = $iDefaultPerPage; + + if ( isset($aClean['iItemsPerPage']) && in_array($aClean['iItemsPerPage'], $aItemsPerPage) ) + $iItemsPerPage = $aClean['iItemsPerPage']; + $sControls = "makeUrl()."\" method=\"get\">"; /* Fill in form data for the objectManager URL */ @@ -705,9 +700,7 @@ class ObjectManager $iNumPages = ceil($iTotalEntries / $iItemsPerPage); /* Check current page value */ - $iPage = $aClean['iPage']; - if(!$iPage) - $iPage = 1; + $iPage = isset($aClean['iPage']) ? $aClean['iPage'] : 1; $iCurrentPage = min($iPage, $iNumPages); /* Display selectors and info */ @@ -778,7 +771,7 @@ class MultiPage function getDataFromInput($aClean) { - if($aClean['iItemsPerPage'] && $aClean['iPage']) + if(isset($aClean['iItemsPerPage']) && isset($aClean['iPage'])) $this->bEnabled = TRUE; else return; diff --git a/include/screenshot.php b/include/screenshot.php index 32cb50c..6f3dfd4 100644 --- a/include/screenshot.php +++ b/include/screenshot.php @@ -401,6 +401,9 @@ class screenshot function get_random_screenshot_img($iAppId = null, $iVersionId = null, $bFormatting = true) { + // initialize variables to avoid notices when appending to them + $sImgFile = ''; + $sImg = ''; // we want a random screenshots for this app if($iAppId && !$iVersionId) { diff --git a/include/testData.php b/include/testData.php index 695b808..dc6672f 100644 --- a/include/testData.php +++ b/include/testData.php @@ -444,7 +444,7 @@ class testData{ $link = mysql_real_escape_string($link); $iDisplayLimit = mysql_real_escape_string($iDisplayLimit); - $sShowAll = $aClean['sShowAll']; + $sShowAll = isset($aClean['sShowAll']) ? $aClean['sShowAll'] : false; $sQuery = "SELECT * FROM testResults diff --git a/include/util.php b/include/util.php index ee6c425..822ff28 100644 --- a/include/util.php +++ b/include/util.php @@ -402,6 +402,8 @@ function cleanupSearchWords($search_words) /* search each word in $search_words */ $split_words = split(" ", $search_words); + + $removed_words = ''; foreach($split_words as $key=>$value) { /* see if this word is in the ignore list */ @@ -413,7 +415,7 @@ function cleanupSearchWords($search_words) /* remove all single letters */ if((strlen($value) == 1) && !is_numeric($value)) $found = true; - + /* if we didn't find this word, keep it */ if($found == false) { diff --git a/index.php b/index.php index 78b4345..9888e16 100644 --- a/index.php +++ b/index.php @@ -67,15 +67,18 @@ if(!$_SESSION['current']->isLoggedIn()) echo "There are $iNumApps applications currently in the database"; // don't mention the top application if there are no votes yet - if($oRow->versionId) + if( !empty($oRow) ) { - $shVoteAppLink = version::fullNameLink($oRow->versionId); - echo " with $shVoteAppLink being the\n"; - echo "top voted application.\n"; - } else - { - echo " please vote for your favourite application.\n"; + if($oRow->versionId) + { + $shVoteAppLink = version::fullNameLink($oRow->versionId); + echo " with $shVoteAppLink being the\n"; + echo "top voted application.\n"; + } else + { + echo " please vote for your favourite application.\n"; + } } ?> diff --git a/objectManager.php b/objectManager.php index 22eda2a..afbef83 100644 --- a/objectManager.php +++ b/objectManager.php @@ -25,7 +25,7 @@ require_once(BASE.'include/testData_queue.php'); require_once(BASE.'include/browse_newest_apps.php'); /* if we have no valid class name we should abort */ -if(!$aClean['sClass']) +if(!isset($aClean['sClass'])) { echo "No class defined.\n"; exit; @@ -38,13 +38,16 @@ if(!class_exists($aClean['sClass'])) exit; } +$aClean['iId'] = isset($aClean['iId']) ? $aClean['iId'] : 0; + $oObject = new objectManager($aClean['sClass'], $aClean['sTitle'], $aClean['iId']); -if($aClean['bIsQueue'] == 'true') +if(isset($aClean['bIsQueue']) && $aClean['bIsQueue'] == 'true') $oObject->bIsQueue = true; else $oObject->bIsQueue = false; +$aClean['bIsRejected'] = isset($aClean['bIsRejected']) ? $aClean['bIsRejected'] : false; /* If it is rejected it is defined as queued */ if($aClean['bIsRejected'] == 'true') { @@ -65,7 +68,7 @@ $sErrors = $oObject->processForm($aClean); if($oObject->iId && $aClean['sAction'] == "delete") $oObject->delete_entry(); -if($aClean['sAction'] == "add") +if(isset($aClean['sAction']) && $aClean['sAction'] == "add") $oObject->handle_anonymous_submission(); /* Provided the necessary values are present, an object's children may be moved @@ -96,7 +99,7 @@ if($oObject->iId) $oObject->view($_SERVER['REQUEST_URI']); break; } -} else if ($aClean['sAction'] == "add") +} else if (isset($aClean['sAction']) && $aClean['sAction'] == "add") { $oObject->add_entry($_SERVER['REQUEST_URI'], $sErrors); } else diff --git a/preferences.php b/preferences.php index 1a5d842..13d773d 100644 --- a/preferences.php +++ b/preferences.php @@ -107,10 +107,11 @@ if(!$_SESSION['current']->isLoggedIn()) util_show_error_page_and_exit("You must be logged in to edit preferences"); // we come from the administration to edit an user -if($_SESSION['current']->hasPriv("admin") && - is_numeric($aClean['iUserId']) && - is_numeric($aClean['iLimit']) && - in_array($aClean['sOrderBy'],array("email","realname","created")) +if($_SESSION['current']->hasPriv("admin") && + isset($aClean['iUserId']) && + isset($aClean['iLimit']) && + isset($aClean['sOrderBy']) && + in_array($aClean['sOrderBy'],array("email","realname","created")) ) { $oUser = new User($aClean['iUserId']); @@ -119,7 +120,7 @@ if($_SESSION['current']->hasPriv("admin") && $oUser = &$_SESSION['current']; } -if($aClean['sSubmit'] == "Update") +if(isset($aClean['sSubmit']) && $aClean['sSubmit'] == "Update") { while(list($sKey, $sValue) = each($aClean)) { @@ -182,7 +183,7 @@ echo "
\n"; echo "\n"; // if we manage another user we give the parameters to go back to the admin -if($oUser->iUserId == $aClean['iUserId']) +if( isset($aClean['iUserId']) && $oUser->iUserId == $aClean['iUserId']) { echo "\n"; echo "\n"; @@ -210,7 +211,7 @@ foreach($aTableRows as $oTableRow) $oTable->AddRow($oTableRow); // if we don't manage another user -if($oUser->iUserId != $aClean['iUserId']) +if( !isset($aClean['iUserId']) || $oUser->iUserId != $aClean['iUserId']) { $aTableRows = build_prefs_list($oUser); foreach($aTableRows as $oTableRow) diff --git a/viewScreenshots.php b/viewScreenshots.php index 5389482..a69a8b0 100644 --- a/viewScreenshots.php +++ b/viewScreenshots.php @@ -16,13 +16,8 @@ echo "
\n"; /* display a range of 10 pages */ $pageRange = 10; -$ItemsPerPage = 6; -$currentPage = 1; - -if($aClean['iItemsPerPage']) - $ItemsPerPage = $aClean['iItemsPerPage']; -if($aClean['iPage']) - $currentPage = $aClean['iPage']; +$ItemsPerPage = isset($aClean['iItemsPerPage']) ? $aClean['iItemsPerPage'] : 6; +$currentPage = isset($aClean['iPage']) ? $aClean['iPage'] : 1; $ItemsPerPage = min($ItemsPerPage,100); $totalPages = ceil(appData::objectGetEntriesCount("false", false,
  Wine version "; - make_bugzilla_version_list("sWineRelease", $aClean['sWineRelease']); + echo make_bugzilla_version_list("sWineRelease", isset($aClean['sWineRelease']) ? $aClean['sWineRelease'] : ''); echo "