1
0

Improved Euler Blogpost:

- Better links to problems
   - Show Abbreviated code message
   - Download link to github
   - More prominent download button
This commit is contained in:
2014-10-14 14:13:25 +02:00
parent a83b746f9d
commit 8d84152726
5 changed files with 27 additions and 8 deletions

View File

@@ -244,8 +244,9 @@ class BlogPostController extends MSController
$problems = EulerProblem::model()->findAll(['order'=>'Problemnumber']);
$problemnumber = 0;
if (isset($_GET['problem']) AND is_numeric($_GET['problem']))
$problemnumber = $_GET['problem'];
if (isset($_GET['problem']) AND is_numeric(preg_replace('/^[Pp]roblem-/', '', $_GET['problem'])))
$problemnumber = preg_replace('/^[Pp]roblem-/', '', $_GET['problem']);
$criteria=new CDbCriteria;
$criteria->condition='Problemnumber = ' . $problemnumber;