diff --git a/www/prosjekt/mine.php b/www/prosjekt/mine.php index 21b48dc..19de266 100644 --- a/www/prosjekt/mine.php +++ b/www/prosjekt/mine.php @@ -20,23 +20,16 @@ if(isset($_GET['page'])){ $page = $_GET['page']; } -$filterTitle = ''; -if(isset($_POST['title'])){ - $filterTitle = $_POST['title']; +$filter = ''; +if(isset($_GET['filter'])){ + $filter = $_GET['filter']; } -/* -$filterOrganiser = ''; -if(isset($_POST['organiser'])){ - $filterOrganiser = $_POST['organiser']; -} -*/ - // filter $projects = array_values(array_filter( $projects, - function($project) use ($filterTitle){ - return (preg_match('/.*'.$filterTitle.'.*/i', $project->getName())); + function($project) use ($filter){ + return (preg_match('/.*'.$filter.'.*/i', $project->getName()) or preg_match('/.*'.$filter.'.*/i', implode(" ", $project->getDescription()))); } )); ?> @@ -62,7 +55,7 @@ $projects = array_values(array_filter(
= implode($project->getDescription(), "
"); ?>
= implode("
", $project->getDescription()); ?>