[svn r10983] error message when no label on picture

skala
Patrick Vandermaesen 19 years ago
parent a9b88caf6d
commit 26ce3d5aeb
  1. 5
      main/admin/configure_homepage.php
  2. 12
      main/inc/lib/WCAG/WCAG_rendering.php

@ -1,4 +1,4 @@
<?php // $Id: configure_homepage.php 10982 2007-01-29 22:14:31Z pvandermaesen $
<?php // $Id: configure_homepage.php 10983 2007-01-29 22:29:10Z pvandermaesen $
/*
==============================================================================
Dokeos - elearning and course management software
@ -59,6 +59,9 @@ if(!file_exists('../../home/home_menu_'.$menu_language.'.html'))
}
$errorMsg='';
if (api_get_setting('wcag_anysurfer_public_pages')=='true') {
$errorMsg=WCAG_Rendering::request_validation();
}
if(!empty($action))
{

@ -56,6 +56,18 @@ class WCAG_Rendering {
return $home_top;
}
/**
* this method validate the content of current request (from WCAG editor).
* this function return the error msg.
*/
function request_validation() {
$imageFile = $_POST['imagefile'];
$imageLabel = $_POST['imageLabel'];
if ((strlen($imageFile) > 0) and (strlen($imageLabel) == 0)) {
return get_lang('errorNoLabel');
}
return '';
}
/**
* Converter Plaintext to (x)HTML

Loading…
Cancel
Save