[oe-commits] org.oe.dev feed-browser: add search functionality

Marcin commit openembedded-commits at lists.openembedded.org
Sat Sep 2 17:35:16 UTC 2006


feed-browser: add search functionality

Author: Marcin
Branch: org.openembedded.dev
Revision: 269c1d3f7a6a873041635f5ec41aacff978e166d
ViewMTN: http://monotone.openembedded.org/revision.psp?id=269c1d3f7a6a873041635f5ec41aacff978e166d
Files:
1
contrib/feed-browser/index.php
Diffs:

#
# mt diff -r388eb4296cf35f3d9f3915cea0c4bdaf68a97981 -r269c1d3f7a6a873041635f5ec41aacff978e166d
#
# 
# 
# patch "contrib/feed-browser/index.php"
#  from [8986ff1e5ad62fa9af0819b7ac2c25ba7e3cc4bc]
#    to [0b5bfe48e5be2823cc55d1688b30f73ac2c85dcf]
# 
============================================================
--- contrib/feed-browser/index.php	8986ff1e5ad62fa9af0819b7ac2c25ba7e3cc4bc
+++ contrib/feed-browser/index.php	0b5bfe48e5be2823cc55d1688b30f73ac2c85dcf
@@ -35,6 +35,13 @@ check_database();
 
 check_database();
 
+$name = '';
+
+if(isset($_GET['name']))
+{
+	$name = $_GET['name'];
+}
+
 $action = '';
 
 if(isset($_GET['action']))
@@ -48,10 +55,8 @@ switch($action)
 		$ipkgoutput = pkgdetails ($_GET['pnm']);
 		break;
 
-	case "package":
-		$edit = $_POST['edit'];
-		$searchword = $edit['searchword'];
-		$ipkgoutput = searchpkg ("%$searchword%");
+	case "search":
+		$ipkgoutput = searchpkg ("%{$name}%");
 		break;
 
 	case "section":
@@ -78,7 +83,18 @@ switch($action)
 	<style type="text/css" media="all">@import "css/feed.css";</style>
     </head>
     <body >
-	    <div id="right"><?php echo searchletter(); echo $ipkgoutput; ?></div>
+		<div id="right">
+			<?php echo searchletter(); ?>
+			<form action="" method="get">
+				<fieldset>
+					<label for="name">Package name</label>
+					<input type="text" name="name" value="<?php echo $name; ?>" />
+					<input type="hidden" name="action" value="search" />
+					<input type="submit" value="Search" />
+				</fieldset>
+			</form>
+			<?php echo $ipkgoutput; ?>
+		</div>
 		<div id="left">
 			<h1>Sections list</h1>
 			<?php echo sectionslist(); ?>






More information about the Openembedded-commits mailing list