Skip to content

Commit

Permalink
remove useless base class Captcha.php (#894)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Coutadeur committed Jul 3, 2024
1 parent 7d80b4c commit 7eee5ef
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 22 deletions.
3 changes: 1 addition & 2 deletions docs/developpers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ Here is a template example of such a captcha module:
<?php namespace captcha;
include_once( __DIR__ . "/Captcha.php");
require_once(__DIR__."/../../vendor/autoload.php");
# use/require any dependency here
class MyCustomClass extends Captcha
class MyCustomClass
{
#private $captcha_property;
Expand Down
1 change: 0 additions & 1 deletion lib/captcha.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
if(file_exists(__DIR__ . "/../lib/captcha/" . $captcha_class . ".php"))
{
$captcha_fullclass = "captcha\\$captcha_class";
require_once(__DIR__ . "/../lib/captcha/Captcha.php");
require_once(__DIR__ . "/../lib/captcha/" . $captcha_class . ".php");
error_log("Captcha module $captcha_class successfully loaded");

Expand Down
17 changes: 0 additions & 17 deletions lib/captcha/Captcha.php

This file was deleted.

10 changes: 8 additions & 2 deletions lib/captcha/InternalCaptcha.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
<?php namespace captcha;

include_once( __DIR__ . "/Captcha.php");
require_once(__DIR__."/../../vendor/autoload.php");
use Gregwar\Captcha\PhraseBuilder;
use Gregwar\Captcha\CaptchaBuilder;

class InternalCaptcha extends Captcha
class InternalCaptcha
{

#private $captcha_property;

public function __construct()
{
#$this->captcha_property = $property;
}

# Function that insert extra css
function generate_css_captcha(){
$captcha_css = '
Expand Down

0 comments on commit 7eee5ef

Please sign in to comment.