Exemplo n.º 1
0
         }
         if (!isset(Episodes::$ALLOWED_PREFIXES[$match[1]])) {
             $mostSimilar = null;
             $mostMatcing = 0;
             foreach (Episodes::$ALLOWED_PREFIXES as $prefix => $shorthand) {
                 foreach (array($prefix, $shorthand) as $test) {
                     $matchingChars = similar_text(strtolower($match[1]), strtolower($test));
                     if ($matchingChars >= 3 && $matchingChars > $mostMatcing) {
                         $mostMatcing = $matchingChars;
                         $mostSimilar = $prefix;
                     }
                 }
             }
             Response::fail("Unsupported prefix: {$match[1]}. " . (isset($mostSimilar) ? "<em>Did you mean <span class='color-ui'>{$mostSimilar}</span></em>?" : 'Use a backslash if the colon is part of the title (e.g. <code>\\:</code>)'));
         }
         $title = Episodes::removeTitlePrefix($value);
         if (Input::checkStringLength($title, $range, $code)) {
             return $code;
         }
         $value = "{$match[1]}: {$title}";
     } else {
         if (Input::checkStringLength($value, $range, $code)) {
             return $code;
         }
     }
 }, array(Input::IN_RANGE => [5, 35], Input::CUSTOM_ERROR_MESSAGES => array(Input::ERROR_MISSING => "{$What} title is missing", Input::ERROR_RANGE => "{$What} title must be between @min and @max characters", 'prefix-movieonly' => "Prefixes can only be used for movies"))))->out();
 CoreUtils::checkStringValidity($insert['title'], "{$What} title", INVERSE_EP_TITLE_PATTERN);
 $airs = (new Input('airs', 'timestamp', array(Input::CUSTOM_ERROR_MESSAGES => array(Input::ERROR_MISSING => 'No air date & time specified', Input::ERROR_INVALID => 'Invalid air date and/or time (@value) specified'))))->out();
 if (empty($airs)) {
     Response::fail('Please specify an air date & time');
 }
Exemplo n.º 2
0
    ?>
			</div>
		</div>
		<div class="next-ep"><?php 
    if (!empty($NextEpisode)) {
        $NextEpisodeTitle = $NextEpisode->formatTitle(AS_ARRAY, null, false);
        ?>
			<div>
				<a href="<?php 
        echo $NextEpisode->formatURL();
        ?>
" class="ep-button btn typcn typcn-media-fast-forward"><span class="id"><?php 
        echo $NextEpisodeTitle['id'];
        ?>
: </span><?php 
        echo CoreUtils::cutoff(Episodes::removeTitlePrefix($NextEpisodeTitle['title']), Episodes::TITLE_CUTOFF);
        ?>
<span class="typcn typcn-media-fast-forward"></span></a>
			</div>
<?php 
    } else {
        echo "&nbsp;";
    }
    ?>
</div>
	</div>
	<?php 
    echo Episodes::getVideosHTML($CurrentEpisode);
    ?>
	<section class="about-res">
		<h2>What Vector Reservations Are<?php