/** * Функция для вывода строки и файла проблемного участка кода * * Приводит имя файла и путь к файлу в котором найдена ошибка к менее * информативному для "посторонних" людей виду. * Это позволит более информативно распознавать файл, в отором найдено * ошибку при этом не выдавая никакой сторонней информации * * @author DeAle <*****@*****.**> * @version 1.0 * @param type $tree * @return string отформатированая строка в формате dir-dir-dir/line * @todo Добавить логирование вызова этой функции */ function mf_get_spath($tree = false) { $debug = debug_backtrace(); // Удаляем часть абсолютного пути с расширением файла и заменяем слеши на дефис $path = substr(str_replace(array(KIT_ROOT . '/', '/', '.class'), array('', '-', ''), $debug[0]['file']), 0, -4); $path .= "/{$debug[0]['line']}"; if ($tree) { $path .= '|||' . substr(str_replace(array(KIT_ROOT . '/', '/'), array('', '-'), $debug[1]['file']), 0, -4); $path .= "/{$debug[1]['line']}"; } $path .= "<br />" . mf_get_time() . mf_get_memory(); return $path; }
* This is variables needed for the program_meta_display() function, which renders * the meta data for each program element */ if ($custom_loop != true) { //checks to see if the vars needed are for a normal loop $venue_ID = get_post_meta(get_the_ID(), 'mf_SALF_meta_venue', true); $venue = get_post($venue_ID); $artist_ID = get_post_meta(get_the_ID(), 'mf_SALF_artist_meta_checks', true); $artist = array(); if ($artist_ID != "") { foreach ($artist_ID as $artist_post) { array_push($artist, get_post($artist_post)); } } $time = get_post_meta(get_the_ID(), 'mf_SALF_meta_time', true); $time = mf_get_time($time); //////fb::log($time,'time'); $eventbrite_link = get_post_meta(get_the_ID(), 'mf_SALF_meta_eventbrite', true); $concession_link = get_post_meta(get_the_ID(), 'mf_SALF_meta_concession', true); $price = get_post_meta(get_the_ID(), 'mf_SALF_meta_price', true); $date = get_post_meta(get_the_ID(), 'mf_SALF_meta_date', true); $date = mf_date_format($date); } else { // if custom_loop set to true, fetch the vars with different methods $venue_ID = get_post_meta($current_post->ID, 'mf_SALF_meta_venue', true); $venue = get_post($venue_ID); $artist_ID = get_post_meta($current_post->ID, 'mf_SALF_artist_meta_checks', true); $artist = array(); if ($artist_ID != "") { foreach ($artist_ID as $artist_post) { array_push($artist, get_post($artist_post));