[PC-BSD Commits] r5672 - in websites/pbidir.com/bibivu: bin tpl/pbidir

svn at pcbsd.org svn at pcbsd.org
Sun Dec 20 11:37:49 PST 2009


Author: fabry
Date: 2009-12-20 11:37:49 -0800 (Sun, 20 Dec 2009)
New Revision: 5672

Modified:
   websites/pbidir.com/bibivu/bin/start.php
   websites/pbidir.com/bibivu/tpl/pbidir/footer.php
Log:
Fixed a problem with the client version of the website and the search for 8.x PBIs.

Added a comment at the bottom of the page for the client version that can be parsed by the SOFTWARE MANAGER to recognize if the client version is still active

Modified: websites/pbidir.com/bibivu/bin/start.php
===================================================================
--- websites/pbidir.com/bibivu/bin/start.php	2009-12-20 16:36:43 UTC (rev 5671)
+++ websites/pbidir.com/bibivu/bin/start.php	2009-12-20 19:37:49 UTC (rev 5672)
@@ -93,7 +93,7 @@
 					$this->permissions->reset_user_info();
 				}
 */
-				load_library('cookies')->set('version',$this->uri->get_num(3));
+				load_library('cookies')->set('version',intval($this->uri->get_num(3)));
 				$task = 'home';
 				break;
 		}
@@ -197,8 +197,14 @@
 		$this->load_library('session');
 		$this->sessions->set('lang',$this->uri->get('lang','en'));
 		$this->sessions->set('bits',$this->uri->get('bits',32));
-		$this->sessions->set('ver',$this->uri->get('ver',8));
 		$this->sessions->set('is_client',(bool)$this->uri->get('is_client',false));
+		if($this->uri->get('ver',0)>0){
+			$filters = array(array('field'=>'version','operator'=>'LIKE','value'=>intval($this->uri->get('ver',0)).'%'));
+			$tmps = load_library('pcbsd_version')->get_raw($filters);
+			if(is_array($tmps) && isset($tmps[0]) && isset($tmps[0]['id'])){
+				$this->sessions->set('ver',$tmps[0]['id']);
+			}
+		}
 		$this->web_home();
 	}
 
@@ -421,7 +427,10 @@
 				//check session
 				$bits = $this->sessions->get('bits','');
 			}
-			
+			$version = $this->sessions->get('ver',0);
+			if($version > 0){
+				$filters[] = array('field'=>'pcbsd_version_id', 'operator'=>'=', 'value'=>$version);
+			}
 			$filters_32 = $filters;
 			$filters_32[] = array('field'=>'bits', 'operator'=>'=', 'value'=>'32');
 

Modified: websites/pbidir.com/bibivu/tpl/pbidir/footer.php
===================================================================
--- websites/pbidir.com/bibivu/tpl/pbidir/footer.php	2009-12-20 16:36:43 UTC (rev 5671)
+++ websites/pbidir.com/bibivu/tpl/pbidir/footer.php	2009-12-20 19:37:49 UTC (rev 5672)
@@ -7,7 +7,7 @@
 	<?=load_library('lang')->get('home_footer_note')?> - <a href="<?=$contact_us_uri?>"><?=load_library('lang')->get('home_contact_us')?></a> - 
 	<?=sprintf(load_library('lang')->get('home_site_developers'),$site_developers_uri) ?>
 	<?php
-} ?>
+}?>
 </div>
 </div>
 </div>
@@ -18,6 +18,9 @@
 			'Peak: '.round(memory_get_peak_usage()/1024,2)
 		;
 */
+if($is_client===true){
+	?><!-- SM --><?php
+}
 ?>
 </body>
 </html>



More information about the Commits mailing list