SVN commit 1231439 by aacid: and now allow to specify the $anchor in a way i don't break all kde websites M +10 -5 class_faq.inc --- trunk/www/media/includes/classes/class_faq.inc #1231438:1231439 @@ -16,9 +16,9 @@ { } - function addQuestion($question_text, $answer_text) + function addQuestion($question_text, $answer_text, $anchor = "") { - $question = new Question($question_text, $answer_text); + $question = new Question($question_text, $answer_text, $anchor); array_push($this->items, $question); } @@ -70,22 +70,27 @@ { var $question; var $answer; + var $anchor; - function Question($question, $answer) + function Question($question, $answer, $anchor = "") { $this->question = $question; $this->answer = $answer; + if ($anchor == "") + $this->anchor = ereg_replace("[^a-zA-Z]", "", $this->question); + else + $this->anchor = $anchor; } function showQuestion() { - print "
$this->answer
\n"; print "\n"; }