[PC-BSD Commits] r2976 - in websites/pbidir.com/bibivu: bin tpl/pbidir
svn at pcbsd.org
svn at pcbsd.org
Sat Nov 15 13:24:48 PST 2008
Author: fabry
Date: 2008-11-15 13:24:47 -0800 (Sat, 15 Nov 2008)
New Revision: 2976
Modified:
websites/pbidir.com/bibivu/bin/start.php
websites/pbidir.com/bibivu/tpl/pbidir/download.php
Log:
fixed a bug that was not allowing to choose a different mirror even if clicking on the link at download page.
Modified: websites/pbidir.com/bibivu/bin/start.php
===================================================================
--- websites/pbidir.com/bibivu/bin/start.php 2008-11-14 00:20:06 UTC (rev 2975)
+++ websites/pbidir.com/bibivu/bin/start.php 2008-11-15 21:24:47 UTC (rev 2976)
@@ -431,7 +431,7 @@
}
$this->display->assign('pbi_release', $pbi_release);
$preferred_mirror = load_library('cookies')->get('preferred_mirror','');
- if($this->uri->get_num(5)>0 || $preferred_mirror>0){
+ if($this->uri->get_num(5)!='mirrors' && ($this->uri->get_num(5)>0 || $preferred_mirror>0)){
if($this->uri->get_num(5)>0){
$preferred_mirror = $this->uri->get_num(5);
}
@@ -446,13 +446,13 @@
return;
}
$this->table_prototype->insert()->from('download')->set('pbi_id',$pbi['id'])->set('download_type_id','1')->set('mirror_id',$mirror['id'])->do_db();
-
+
$filters = array();
$filters[] = array('field'=>'id', 'operator'=>'=', 'value'=>$pbi['id']);
$this->pbi->update()->set('total_download','total_download+1',true)->where()->do_db();
-
+
$this->display->assign('mirror', $mirror);
-
+
$this->display->assign('title', 'Downloading '.$pbi['name']);
//need to save this mirror as the preferred mirror
load_library('cookies')->set('preferred_mirror',$mirror['id'], (30*24*3600));//set per 30 days
Modified: websites/pbidir.com/bibivu/tpl/pbidir/download.php
===================================================================
--- websites/pbidir.com/bibivu/tpl/pbidir/download.php 2008-11-14 00:20:06 UTC (rev 2975)
+++ websites/pbidir.com/bibivu/tpl/pbidir/download.php 2008-11-15 21:24:47 UTC (rev 2976)
@@ -25,7 +25,7 @@
} ?> <a href="<?=$uri?>"><?=load_library('lang')->get('download_clickhere')?></a><br /><br />
<?=load_library('lang')->get('download_change_mirror')?> <a href="<?=$download_uri?>/<?=$pbi['id']?>/<?=$pbi_release['id']?>"><?=load_library('lang')->get('download_clickhere')?></a><br /><br /><?php
} else {
- ?><?=load_library('lang')->get('download_nostart')?> <a href="<?=$uri?>"><?=load_library('lang')->get('download_clickhere')?></a><br /><br /><?php
+ ?><?=load_library('lang')->get('download_nostart')?> <a href="<?=$uri?>/mirrors"><?=load_library('lang')->get('download_clickhere')?></a><br /><br /><?php
}
?>
<a href="<?=$pbi_uri?>/<?=$pbi['id']?>"><?=load_library('lang')->get('download_return_pbi')?></a><br /><br />
More information about the Commits
mailing list