Changeset 1423 for feedmelinks/modules/main-controller.inc.php
- Timestamp:
- 03/16/07 10:16:26 (2 years ago)
- Files:
-
- feedmelinks/modules/main-controller.inc.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
feedmelinks/modules/main-controller.inc.php
r1336 r1423 23 23 } else if( $op == "makeNewFolderAndSubmit" ) { 24 24 if( $debug ) 25 echo "DEBUG: ADDING <b>$linkName</b> ($url) TO NEW FOLDER $newFolderName<br />\n";25 echo "DEBUG: ADDING <b>$linkName</b> ($url) TO NEW FOLDER $newFolderName<br />\n"; 26 26 if( $url && $linkName ) { 27 27 if( $newFolderName ) { … … 30 30 $name = urlencode( $linkName ); 31 31 $userid = urlencode( $u ); 32 $isPrivate = $isPrivate ? 1 : "NULL";32 $isPrivate = ($isPrivate && $isPrivate != "NULL" && $isPrivate!= "0" && isPrivate != "no" ) ? 1 : 0; 33 33 34 34 # first we create the new category … … 41 41 42 42 # then we add the link: 43 $q = addLinkSimple( $url, $name, $userid, $isPrivate );43 $q = addLinkSimple( $url, $name, $userid, $isPrivate, ($from = $from ? $from : "makeNewFolderAndSubmit") ); 44 44 if( $q ) { 45 45 echo "link added!<br />\n"; … … 78 78 } 79 79 $userid = urlencode( $u ); 80 $isPrivate = $isPrivate ? 1 : "NULL";80 $isPrivate = ($isPrivate && $isPrivate != "NULL" && $isPrivate!= "0" && isPrivate != "no" ) ? 1 : 0; 81 81 $options = ""; # not yet implemented 82 82 … … 86 86 --> 87 87 <?php 88 $q = addLinkSimple( $url, $name, $userid, $isPrivate );88 $q = addLinkSimple( $url, $name, $userid, $isPrivate, ($from = $from ? $from : "main-controller-submit") ); 89 89 if( $q ) { 90 90 echo "link added!<br />\n"; … … 153 153 $createDate = urlencode( $createDate ); 154 154 $userid = urlencode( $u ); 155 $isPrivate = $isPrivate ? 1 : "NULL";155 $isPrivate = ($isPrivate && $isPrivate != "NULL") ? 1 : 0; 156 156 157 157 $qs = "REPLACE INTO links VALUES($id, '$url', '$name', '$createDate', NULL, '$userid', $groupid, $isPrivate);";