Update of /cvsroot/phpslash/phpslash-ft/class
In directory usw-pr-cvs1:/tmp/cvs-serv14555
Modified Files:
slashDB.class slashPerm.class Section.class Topic.class
Log Message:
More Class and function documentation
Index: slashDB.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/slashDB.class,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** slashDB.class 2001/10/01 15:12:41 1.1
--- slashDB.class 2001/11/07 21:35:34 1.2
***************
*** 8,13 ****
* Extends the phplib DB_Sql class.
*
- * @param array global _PSL
- *
*/
--- 8,11 ----
***************
*** 27,32 ****
* slashDB constructor
*
- * @param array global _PSL
- *
**/
function slashDB() {
--- 25,28 ----
***************
*** 44,47 ****
--- 40,45 ----
/**
* Mysql error message
+ *
+ * @param string msg
**/
function halt($msg) {
Index: slashPerm.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/slashPerm.class,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** slashPerm.class 2001/10/01 15:13:02 1.1
--- slashPerm.class 2001/11/07 21:35:34 1.2
***************
*** 18,22 ****
* slashPerm constructor
*
- * @param array global _PSL
*
**/
--- 18,21 ----
***************
*** 29,36 ****
}
! /*
* I had to redefine the perm_sel function so I can throw a "SIZE"
* attribute in there. Other then that it's *exactly* the same
* as the PHPLIB one.
*/
function perm_sel($name, $current = "", $class = "") {
--- 28,40 ----
}
! /**
* I had to redefine the perm_sel function so I can throw a "SIZE"
* attribute in there. Other then that it's *exactly* the same
* as the PHPLIB one.
+ *
+ * @param string name
+ * @param string current
+ * @param string class
+ *
*/
function perm_sel($name, $current = "", $class = "") {
Index: Section.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Section.class,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Section.class 2001/10/17 17:11:26 1.4
--- Section.class 2001/11/07 21:35:34 1.5
***************
*** 3,9 ****
/* $Id$ */
class Section {
var $sec_templ,$db,$psl;
!
function Section () {
--- 3,18 ----
/* $Id$ */
+
+ /**
+ * Provides an API to the PHPSlash Section Management.
+ *
+ */
class Section {
var $sec_templ,$db,$psl;
!
! /**
! * Section class constructor
! * @access private
! */
function Section () {
***************
*** 22,26 ****
}
!
function listSection() {
--- 31,42 ----
}
!
! /**
! * listSection - list all Section
! *
! * displays the complete list of sections
! * Used only by admin
! * @access public
! */
function listSection() {
***************
*** 47,50 ****
--- 63,76 ----
}
+ /**
+ * saveSection - save the section info to the DB
+ *
+ * Used only by admin
+ *
+ * @param array $ary
+ *
+ * @access public
+ */
+
function saveSection($ary) {
***************
*** 91,97 ****
return $this->db->query($q);
}
!
! /* deletes a section and is somewhat idiot-proof */
!
function deleteSection($section_id) {
--- 117,127 ----
return $this->db->query($q);
}
!
! /**
! * deleteSection - deletes a section and is somewhat idiot-proof
! *
! * @param integer section_id
! * @access public
! */
function deleteSection($section_id) {
***************
*** 137,141 ****
}
! /* just prints out the "form" and points the user to the "save" method */
function newSection() {
--- 167,178 ----
}
! /**
! * newSection - spits out a blank form for input
! *
! * Just prints out the "form" and points the user to the "save" method
! * Used only by admin
! *
! * @access public
! */
function newSection() {
***************
*** 152,156 ****
}
! /* when given a section id, getName retuns the name */
function getName($id) {
if (!$id) {
--- 189,201 ----
}
! /**
! * getName - return name assign to id
! *
! * when given a section id, getName returns the name
! *
! * @param integer id
! * @access public
! * return section_name
! */
function getName($id) {
if (!$id) {
***************
*** 166,170 ****
}
! /* when given a name, getId retuns the id */
function getId($name) {
if (!$name) {
--- 211,223 ----
}
! /**
! * getId - return id assign to name
! *
! * when given a name, getId returns the id
! *
! * @param string name
! * @access public
! * return section_id
! */
function getId($name) {
if (!$name) {
***************
*** 179,183 ****
};
}
!
function sectionSelect($varname,$selected) {
--- 232,245 ----
};
}
!
! /**
! * sectionSelect - spit out section select box
! *
! *
! * @param string varname
! * @param string selected
! * @access public
! * return output
! */
function sectionSelect($varname,$selected) {
Index: Topic.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Topic.class,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Topic.class 2001/10/17 17:11:27 1.5
--- Topic.class 2001/11/07 21:35:34 1.6
***************
*** 3,13 ****
/* $Id$ */
! /*
! * Class: Topic
! *
! * Layer: All
! * Desc.:
! *
! */
class Topic {
var $topic_templ; /* the template object */
--- 3,13 ----
/* $Id$ */
! /**
! * Provides an API to the PHPSlash Topic Management.
! *
! * This object is how we do anything with topics.
! *
! */
!
class Topic {
var $topic_templ; /* the template object */
***************
*** 16,22 ****
var $psl; /* our local version of the _PSL array */
! /*
! * CONSTRUCTORS
! */
function Topic () {
--- 16,26 ----
var $psl; /* our local version of the _PSL array */
! /**
! * The Section Constructor
! *
! * sets up the local version of the global _PSL array, the templates
! * and a few other things
! * @access private
! */
function Topic () {
***************
*** 41,48 ****
*/
! /*
! * Just prints the form with the list of existing topics
! * Used only by admin
! */
function listTopic() {
--- 45,55 ----
*/
! /**
! * listTopic - list all Topics
! *
! * displays the complete list of topics
! * Used only by admin
! * @access public
! */
function listTopic() {
***************
*** 85,96 ****
}
! /*
! * Saves the topic in the $ary array to the DB
! * Obligatory fields: topic_name, image, width, height, alt_text
! * Optional fields: topic_id (only if this topic is already in the DB),
! * onlinkbar (if blank, defaults to 0)
! * Returns true if sucessful (topic added or updated), false on error
! * Used only by admin
! */
function saveTopic($ary) {
--- 92,110 ----
}
!
! /**
! * saveTopic - save the topic info to the DB
! *
! * Saves the topic in the $ary array to the DB
! * Obligatory fields: topic_name, image, width, height, alt_text
! * Optional fields: topic_id (only if this topic is already in the DB),
! * onlinkbar (if blank, defaults to 0)
! * Returns true if sucessful (topic added or updated), false on error
! * Used only by admin
! *
! * @param array $ary
! *
! * @access public
! */
function saveTopic($ary) {
***************
*** 172,181 ****
}
! /* Given the topic_id, it deletes that from the topic table. The
* psl_topic_lut and psl_topic_submission_lut table must be cleaned
* first by updating all the stories to point to different topics. It
* will also check and make sure there are NO stories/submissions
* associated with this topic before deleting it. Returns true if
! * topic is deleted, false if not.
*/
function deleteTopic($topic_id) {
--- 186,203 ----
}
!
! /**
! * deleteTopic - deletes the topic info from the db
! *
! * Given the topic_id, it deletes that from the topic table. The
* psl_topic_lut and psl_topic_submission_lut table must be cleaned
* first by updating all the stories to point to different topics. It
* will also check and make sure there are NO stories/submissions
* associated with this topic before deleting it. Returns true if
! * topic is deleted, false if not.
! *
! * @param integer topic_id
! *
! * @access public
*/
function deleteTopic($topic_id) {
***************
*** 236,243 ****
}
! /*
! * Just prints out the "form" and points the user to the "save" method
! * Used only by admin
! */
function newTopic($ary="") {
--- 258,270 ----
}
! /**
! * newTopic - spits out a blank form for input
! *
! * Just prints out the "form" and points the user to the "save" method
! * Used only by admin
! *
! * @param array ary
! * @access public
! */
function newTopic($ary="") {
***************
*** 301,304 ****
--- 328,340 ----
}
+ /**
+ * displayTopics - display a list of all available topic images
+ *
+ * displays the complete list of available topic images
+ * Used only by admin
+ *
+ * @param string option
+ * @access public
+ */
function displayTopics($option="") {
***************
*** 348,352 ****
}
! /* when given a section id, getName retuns the name */
function getName($id) {
if (!$id) {
--- 384,396 ----
}
! /**
! * getName - return name assign to id
! *
! * when given a topic id, getName returns the name
! *
! * @param integer id
! * @access public
! * return author_name
! */
function getName($id) {
if (!$id) {
***************
*** 362,366 ****
}
! /* when given a name, getId retuns the id */
function getId($name) {
if (!$name) {
--- 406,418 ----
}
! /**
! * getId - return id assign to name
! *
! * when given a name, getId returns the id
! *
! * @param string name
! * @access public
! * return topic_id
! */
function getId($name) {
if (!$name) {
***************
*** 376,379 ****
--- 428,440 ----
}
+ /**
+ * topicSelect - spit out topic select box
+ *
+ *
+ * @param string varname
+ * @param string selected
+ * @access public
+ * return output
+ */
function topicSelect($varname,$selected) {
|