Profile
MAJ is an Open Source, PHP-based content management system (CMS) that can be deployed as a blog, bulletin or message board, Internet forum, and wiki. It is extensible via PHP panels and is HTML5 and CSS3 ready.
Git
This commit has been accessed 973 times via Git panel.

commit eb82e00c52a0b4bdd03b399aafa5224fbfd29d42
tree e8a3b95dbb5c11ee311dfb95b2511f452fd37134
parent 24a306a557ea81478fac89fbc191ae3df25a4817
author Magie Antonio <magie@majcms.org> 1314028946 +0800
committer Magie Antonio <magie@majcms.org> 1314028946 +0800

    Fix mobile no. bug that prevents user registration

diff --git a/reg.php b/reg.php
index ac3f3ad..ff7d940 100644
--- a/reg.php
+++ b/reg.php
@@ -417,7 +417,7 @@ if ($_POST['submit'] == "1") {
 
                $err_tel = "<td><img src=\"images/widget.ok.png\" border=\"0\" width=\"14\" height=\"14\"></td><td>$tel</td>";
 
-               if (mb_strlen(preg_replace("/[^0-9]/","", $tel)) < 7) {
+               if (file_exists("$maj_data_directory/bb-tel.txt") and (mb_strlen(preg_replace("/[^0-9]/","", $tel)) < 7)) {
                        $err_reg = $err_reg + 1;
                        $err_tel = "The mobile number $tel is invalid.";
                        $err_tel = "<td><img src=\"images/widget.x.png\" border=\"0\" width=\"14\" height=\"14\"></td><td>$err_tel</td>";
@@ -432,7 +432,7 @@ if ($_POST['submit'] == "1") {
        else {
                $org = trim(strip_tags($_POST['org']));
                $org = htmlentities($org, ENT_QUOTES, 'UTF-8');
-               $org = ucwords($org);
+               $org = format_title_put($org);
                $err_org = "<td><img src=\"images/widget.ok.png\" border=\"0\" width=\"14\" height=\"14\"></td><td>$org</td>";
        }
 
@@ -546,9 +546,9 @@ if ($_POST['submit'] == "1") {
               
                if (file_exists("$maj_data_directory/bb-org.txt") and isset($org) and !empty($org)) {
 
-                       $fp_organization_txt = fopen("$maj_data_directory/members/pending/$username/org.txt","w");
-                       fwrite($fp_organization_txt,$org);
-                       fclose($fp_organization_txt);          
+                       $fp_org_txt = fopen("$maj_data_directory/members/pending/$username/org.txt","w");
+                       fwrite($fp_org_txt,$org);
+                       fclose($fp_org_txt);           
                }              
               
                $bday = $_POST['bd_year'] . $_POST['bd_month'] . $_POST['bd_day'];
@@ -672,7 +672,7 @@ if (file_exists("$maj_data_directory/bb-tel.txt")) {
 
 if (file_exists("$maj_data_directory/bb-org.txt")) {
 
-       echo "<tr><td width=\"100\">Organization</td><td colspan=\"3\"><input required class=\"input\" type=\"text\" autocomplete=\"off\" name=\"org\" maxlength=\"60\"></td>$err_org</tr>";
+       echo "<tr><td width=\"100\">Company or School</td><td colspan=\"3\"><input required class=\"input\" type=\"text\" autocomplete=\"off\" name=\"org\" maxlength=\"60\"></td>$err_org</tr>";
 }
 
 ?>
 
Credits
Sunday, Sep 18, 2005, 12:00 AM (Revision 11 - Thursday, Jul 14, 2011, 7:30 PM)
Open Source enables software developers to stand on the shoulders of giants instead of reinventing the wheel, so to speak. Kudos and many thanks to the folks who made their work freely available for reuse in MAJ.

read more
Bugs and Exploits
Friday, Aug 26, 2005, 12:00 AM (Revision 23 - Wednesday, May 29, 2013, 5:25 AM)
Although MAJ started as a family project, care has been taken to make it as "safe" as possible. With more people now working on MAJ, bugs and exploitable code may sometimes slip in. We invite you to poke around and see if you can find any. Generally, there are two things you can do when you find a MAJ or PHP-related bug or exploit:

1. Take advantage of it. But hey, what's so exciting about messing up someone's blog? Ho-hum, right?
2. Report it here so that we can work on a fix and make MAJ better.

read more
Search
Download
MAJ 2.0
75 files
32980 downloads
MAJ 1.0
26 files
13132 downloads
MAJ 0.14
45 files
35010 downloads