/** * Gets next alert if there is, else return null * * @return array */ function osc_has_alerts() { $result = View::newInstance()->_next('alerts'); $alert = osc_alert(); View::newInstance()->_exportVariableToView("items", isset($alert['items']) ? $alert['items'] : array()); return $result; }
</h1> </div> <?php if (osc_count_alerts() == 0) { ?> <h3><?php _e('You are not following any search yet', 'pop'); ?> .</h3> <?php } else { ?> <?php $i = 1; while (osc_has_alerts()) { $alert = osc_alert(); // echo osc_alert_search(); $_alert = array(); $a_c = json_decode(osc_alert_search(), true); $search = new Search(); $search->setJsonAlert($a_c); $_alert['dt_date'] = osc_alert_date(); // region // $_r = Region::newInstance()->findByPrimaryKey($a_c['regionId']); // if(isset($_r['s_name'])) { // $_alert['region']= $_r['s_name']; // } $_alert['title'] = __('All listings', 'pop'); if ($a_c['sPattern'] != '') { $_alert['title'] = ucfirst($a_c['sPattern']); $a_c['sPattern'] = $a_c['sPattern'];