CC-1662 Get rid of little popups everywhere

Got rid of popups for Search and Hubsearch when clicking on page offset links.

Added more debugging for white screen of death.
This commit is contained in:
paul.baranowski 2010-09-14 11:27:02 -04:00
parent ac32fa5e5c
commit 9835a605ce
5 changed files with 46 additions and 16 deletions

View File

@ -19,6 +19,10 @@ $Smarty->assign('PL_simpleManagement', FALSE);
$Smarty->assign('showBackup', FALSE);
if (isset($_REQUEST['popup']) && is_array($_REQUEST['popup'])){
if (isset($WHITE_SCREEN_OF_DEATH) && ($WHITE_SCREEN_OF_DEATH == TRUE)) {
echo __FILE__.':line '.__LINE__.": about to do popup processing for: <br>";
var_dump($_REQUEST['popup']);
}
foreach ($_REQUEST['popup'] as $val) {
switch ($val) {
case "jscom":
@ -271,6 +275,9 @@ if (isset($_REQUEST['popup']) && is_array($_REQUEST['popup'])){
die();
};
if (isset($WHITE_SCREEN_OF_DEATH) && ($WHITE_SCREEN_OF_DEATH == TRUE)) {
echo __FILE__.':line '.__LINE__.": popup processing complete<br>";
}
if ($uiBrowser->userid) {
$action = isset($_REQUEST['act']) ? $_REQUEST['act'] : null;
switch ($action) {

View File

@ -2,6 +2,10 @@
require_once(dirname(__FILE__).'/../ui_handler_init.php');
require_once("../Input.php");
if (isset($WHITE_SCREEN_OF_DEATH) && ($WHITE_SCREEN_OF_DEATH == TRUE)) {
echo __FILE__.':line '.__LINE__.": Action {$_REQUEST['act']} Begin<br>";
}
if (get_magic_quotes_gpc()) {
$_REQUEST = Input::CleanMagicQuotes($_REQUEST);
}
@ -140,6 +144,9 @@ switch ($_REQUEST['act']) {
case "SEARCH.setOffset":
$uiHandler->SEARCH->setOffset($_REQUEST['page']);
$NO_REDIRECT = true;
$_REQUEST["act"] = "SEARCH";
include("ui_browser.php");
break;
case "BROWSE.refresh":
@ -216,6 +223,9 @@ switch ($_REQUEST['act']) {
case "HUBSEARCH.setOffset":
$uiHandler->HUBSEARCH->setOffset($_REQUEST['page']);
$NO_REDIRECT = true;
$_REQUEST["act"] = "HUBSEARCH";
include("ui_browser.php");
break;
case "TRANSFERS.reorder":
@ -467,11 +477,13 @@ if ($uiHandler->alertMsg) {
$_SESSION['alertMsg'] = $uiHandler->alertMsg;
}
ob_end_clean();
if (isset($_REQUEST['target'])) {
header('Location: ui_browser.php?act='.$_REQUEST['target']);
} else {
header("Location: ".$uiHandler->redirUrl);
ob_end_flush();
if (!isset($NO_REDIRECT)) {
if (isset($_REQUEST['target'])) {
header('Location: ui_browser.php?act='.$_REQUEST['target']);
} else {
header("Location: ".$uiHandler->redirUrl);
}
}
exit;
?>

View File

@ -13,12 +13,12 @@
<table style="width: 600px;">
<tr class="blue_head">
<td style="width: 20px"><input type="checkbox" name="all" onClick="collector_switchAll('SEARCHRESULTS')"></td>
<td style="width: 200px;"><a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.reorder&by=dc:title', 'order');" id="blue_head">##Title##</a></td>
<td style="width: 195px"><a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.reorder&by=dc:creator', 'order');" id="blue_head">##Creator##</a></td>
<td style="width: 195px"><a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.reorder&by=dc:source', 'order');" id="blue_head">##Album##</a></td>
<td style="width: 25px"><a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.reorder&by=ls:track_num', 'order');" id="blue_head">##Track##</a></td>
<td><a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.reorder&by=dcterms:extent', 'order');" id="blue_head">##Duration##</a></td>
<td style="width: 41px; border: 0; text-align: center">{*<a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.reorder&by=type', 'order');" id="blue_head">*}##Type##{*</a>*}</td>
<td style="width: 200px;"><a href="#" onClick="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=dc:title" id="blue_head">##Title##</a></td>
<td style="width: 195px"><a href="#" onClick="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=dc:creator" id="blue_head">##Creator##</a></td>
<td style="width: 195px"><a href="#" onClick="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=dc:source" id="blue_head">##Album##</a></td>
<td style="width: 25px"><a href="#" onClick="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=ls:track_num" id="blue_head">##Track##</a></td>
<td><a href="#" onClick="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=dcterms:extent" id="blue_head">##Duration##</a></td>
<td style="width: 41px; border: 0; text-align: center">{*<a href="#" onClick="{$UI_HANDLER}?act={$_act_prefix}.reorder&by=type" id="blue_head">*}##Type##{*</a>*}</td>
</tr>
{foreach from=$_results.items item=i}
<!-- start item -->
@ -45,7 +45,7 @@
<div align="left"><img src="img/ico_lock.png">
<img src="img/{$i.type|lower}.png" border="0" alt="{$i.type|lower|capitalize}" {* include file="sub/alttext.tpl" *} /></div>
{else}
<img src="img/{$i.type|lower}.png" border="0" alt="{$i.type|lower|capitalize}" {* include file="sub/alttext.tpl" *} />
<img src="img/{$i.type|lower}.png" border="0" alt="{$i.type|lower|capitalize}" {* include file="sub/alttext.tpl" *} />
{/if}
</td>
</tr>
@ -57,17 +57,17 @@
<div class="footer" style="width: 595px;">
<div class="counter">
{* {if $_results.prev}<a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.setOffset&page=prev', 'pager')" id="blue_head">##previous##</a>{/if} *}
{* {if $_results.prev}<a href="#" onClick="{$UI_HANDLER}?act={$_act_prefix}.setOffset&page=prev" id="blue_head">##previous##</a>{/if} *}
{foreach from=$_results.pagination item=p key=k}
{if $k != $_results.page+1}
<a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.setOffset&page={$k}', 'pager')" id="blue_head" class="pagination_number"><span class="pagination_number">{$p}</span></a>
<a href="{$UI_HANDLER}?act={$_act_prefix}.setOffset&page={$k}" id="blue_head" class="pagination_number"><span class="pagination_number">{$p}</span></a>
{else}
<span class="pagination_number">{$p}</span>
{/if}
{/foreach}
{* {if $_results.next}<a href="#" onClick="hpopup('{$UI_HANDLER}?act={$_act_prefix}.setOffset&page=next', 'pager')" id="blue_head">##next##</a>{/if} *}
{* {if $_results.next}<a href="#" onClick="{$UI_HANDLER}?act={$_act_prefix}.setOffset&page=next" id="blue_head">##next##</a>{/if} *}
&nbsp;&nbsp;
##Range##:&nbsp;{$_criteria.offset+1}-{if ($_criteria.offset+$_criteria.limit)>$_results.cnt}{$_results.cnt}{else}{$_criteria.offset+$_criteria.limit}{/if}&nbsp;
##Count##:&nbsp;{$_results.cnt}&nbsp;

View File

@ -23,6 +23,9 @@ require_once(dirname(__FILE__).'/ui_calendar.class.php');
require_once(dirname(__FILE__).'/ui_jscom.php');
require_once(dirname(__FILE__).'/ui_twitter.class.php');
if (isset($WHITE_SCREEN_OF_DEATH) && ($WHITE_SCREEN_OF_DEATH == TRUE)) {
echo __FILE__.':line '.__LINE__.": All includes loaded<br>";
}
# NOTE: You have to load all classes that use session variables BEFORE you make a call to session_start()!!!
session_start();
@ -72,4 +75,9 @@ if (isset($_SESSION['retransferFormData']) && is_array($_SESSION['retransferForm
}
unset($_SESSION['retransferFormData']);
}
?>
if (isset($WHITE_SCREEN_OF_DEATH) && ($WHITE_SCREEN_OF_DEATH == TRUE)) {
echo __FILE__.':line '.__LINE__.": end of file<br>";
}
?>

View File

@ -185,6 +185,9 @@ if (PEAR::isError($CC_DBC)) {
echo "</table>";
exit;
}
if ($WHITE_SCREEN_OF_DEATH) {
echo __FILE__.':line '.__LINE__.": Connected to database<br>";
}
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
//PEAR::setErrorHandling(PEAR_ERROR_TRIGGER, E_USER_WARNING);