You can subscribe to this list here.
| 2012 |
Jan
|
Feb
(214) |
Mar
(139) |
Apr
(198) |
May
(187) |
Jun
(151) |
Jul
(210) |
Aug
(169) |
Sep
(58) |
Oct
(53) |
Nov
(54) |
Dec
(301) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2013 |
Jan
(348) |
Feb
(178) |
Mar
(219) |
Apr
(154) |
May
(117) |
Jun
(194) |
Jul
(61) |
Aug
(132) |
Sep
(121) |
Oct
(110) |
Nov
(11) |
Dec
(18) |
| 2014 |
Jan
(34) |
Feb
(50) |
Mar
(82) |
Apr
(98) |
May
(39) |
Jun
(111) |
Jul
(67) |
Aug
(36) |
Sep
(33) |
Oct
(26) |
Nov
(53) |
Dec
(44) |
| 2015 |
Jan
(29) |
Feb
(47) |
Mar
(25) |
Apr
(19) |
May
(23) |
Jun
(20) |
Jul
(49) |
Aug
(7) |
Sep
(10) |
Oct
(10) |
Nov
(4) |
Dec
(25) |
| 2016 |
Jan
(8) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(7) |
Dec
(5) |
| 2017 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(15) |
Jun
|
Jul
(18) |
Aug
(24) |
Sep
|
Oct
(14) |
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
(22) |
Mar
|
Apr
(11) |
May
(1) |
Jun
(17) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(6) |
Nov
(5) |
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ce...@us...> - 2013-10-06 00:49:53
|
Revision: 12142
http://sourceforge.net/p/xoops/svn/12142
Author: cesag
Date: 2013-10-06 00:49:47 +0000 (Sun, 06 Oct 2013)
Log Message:
-----------
fixed: typos in english folder (cesag)
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
XoopsModules/wfdownloads/trunk/wfdownloads/docs/lang_diff.txt
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/directorychecker.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/filechecker.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-10-05 23:32:51 UTC (rev 12141)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-10-06 00:49:47 UTC (rev 12142)
@@ -1,4 +1,5 @@
<b><u>=> Version 3.23 Beta (2013-10-05)</u></b>
+- fixed: typos in english folder (cesag)
- module standardization: header.php, admin/admin_header.php, xoops_version.php
- module standardization: standardize directories/files names/structures
- module standardization: standardize code headers
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/docs/lang_diff.txt
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/docs/lang_diff.txt 2013-10-05 23:32:51 UTC (rev 12141)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/docs/lang_diff.txt 2013-10-06 00:49:47 UTC (rev 12142)
@@ -10,6 +10,25 @@
x renamed
---------------------------------------
+3.23 Beta 1 2012-10-05
+---------------------------------------
+
+x _MD_WFDOWNLOADS__MD_WFDOWNLOADS_FILENOTOPEN
+
+FILE: \wfdownloads\language\english\main.php
+
+renamed:
+
+_MD_WFDOWNLOADS__MD_WFDOWNLOADS_FILENOTOPEN
+
+into:
+
+_MD_WFDOWNLOADS_FILENOTOPEN
+
+
+Orphan Define. Delete if not needed (Cesag).
+
+---------------------------------------
3.21 Beta 1 2012-07-30
---------------------------------------
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2013-10-05 23:32:51 UTC (rev 12141)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2013-10-06 00:49:47 UTC (rev 12142)
@@ -32,8 +32,8 @@
define("_AM_WFDOWNLOADS_BMOVE","Move files");
define("_AM_WFDOWNLOADS_BUPLOAD","Upload");
define("_AM_WFDOWNLOADS_BDELETEIMAGE","Delete selected image");
-define("_AM_WFDOWNLOADS_BRETURN","Return to where you where!");
-define("_AM_WFDOWNLOADS_DBERROR","Database access error: please report this error to the XOOPS Website");
+define("_AM_WFDOWNLOADS_BRETURN","Return to where you were!");
+define("_AM_WFDOWNLOADS_DBERROR","Database access error: please report this error to the XOOPS website");
//Banned Users
define("_AM_WFDOWNLOADS_NONBANNED","Not Banned");
define("_AM_WFDOWNLOADS_BANNED","Banned");
@@ -44,7 +44,7 @@
define("_AM_WFDOWNLOADS_ALLOWSMILEY"," Allow smiley icons");
define("_AM_WFDOWNLOADS_ALLOWXCODE"," Allow XOOPS codes");
define("_AM_WFDOWNLOADS_ALLOWIMAGES"," Allow images");
-define("_AM_WFDOWNLOADS_ALLOWBREAK"," Use XOOPS linebreak conversion");
+define("_AM_WFDOWNLOADS_ALLOWBREAK"," Use XOOPS line break conversion");
define("_AM_WFDOWNLOADS_UPLOADFILE","File uploaded successfully");
define("_AM_WFDOWNLOADS_NOMENUITEMS","No menu items within the menu");
@@ -67,7 +67,7 @@
define("_AM_WFDOWNLOADS_MCATEGORY","Categories management");
define("_AM_WFDOWNLOADS_INDEXPAGE","Index page management");
define("_AM_WFDOWNLOADS_MUPLOADS","Images upload");
-define("_AM_WFDOWNLOADS_MMIMETYPES","Mimetypes management");
+define("_AM_WFDOWNLOADS_MMIMETYPES","MIME types management");
define("_AM_WFDOWNLOADS_MCOMMENTS","Comments");
define("_AM_WFDOWNLOADS_MVOTEDATA","Vote data");
// waiting reviews
@@ -99,7 +99,7 @@
define("_AM_WFDOWNLOADS_FCATEGORY_CIMAGE","Category image");
define("_AM_WFDOWNLOADS_FCATEGORY_DESCRIPTION","Category description");
define("_AM_WFDOWNLOADS_FCATEGORY_SUMMARY","Category summary");
-define("_AM_WFDOWNLOADS_CCATEGORY_CHILDASPARENT","You cannot set a child category as the category's parent");
+define("_AM_WFDOWNLOADS_CCATEGORY_CHILDASPARENT","You cannot set a child's category as the category parent");
// Index page Defines
define("_AM_WFDOWNLOADS_IPAGE_UPDATED","Index page modified and database updated successfully!");
@@ -120,7 +120,7 @@
define("_AM_WFDOWNLOADS_PERM_PERMSNOTE","Please be aware that even if you've set correct viewing permissions here, a group might not see the articles or blocks if you don't also grant that group permissions to access the module. To do that, go to <b>System admin > Groups</b>, choose the appropriate group and click the checkboxes to grant its members the access.");
define("_AM_WFDOWNLOADS_PERM_CPERMISSIONS","Category permissions");
define("_AM_WFDOWNLOADS_PERM_CSELECTPERMISSIONS","Select categories that each group is allowed to view");
-define("_AM_WFDOWNLOADS_PERM_CNOCATEGORY","Cannot set permissions: No Categories have been created yet!");
+define("_AM_WFDOWNLOADS_PERM_CNOCATEGORY","Cannot set permissions: No categories have been created yet!");
define("_AM_WFDOWNLOADS_PERM_FPERMISSIONS","File permissions");
define("_AM_WFDOWNLOADS_PERM_FNOFILES","Cannot set permissions: no files have been created yet!");
define("_AM_WFDOWNLOADS_PERM_FSELECTPERMISSIONS","Select the files that each group is allowed to view");
@@ -179,9 +179,9 @@
define("_AM_WFDOWNLOADS_MINDEX_ONLINESTATUS","Online status");
define("_AM_WFDOWNLOADS_MINDEX_PUBLISHED","Published");
define("_AM_WFDOWNLOADS_MINDEX_ACTION","Action");
-define("_AM_WFDOWNLOADS_MINDEX_NODOWNLOADSFOUND","NOTICE: there are no downloads that match this criteria");
+define("_AM_WFDOWNLOADS_MINDEX_NODOWNLOADSFOUND","NOTICE: there are no downloads that match these criteria");
define("_AM_WFDOWNLOADS_MINDEX_PAGE","<b>Page:<b> ");
-define('_AM_WFDOWNLOADS_MINDEX_PAGEINFOTXT','<ul><li>Wfdownloads main page details.</li><li>You can easily change the image logo, heading, main index header and footer text to suit your own look</li></ul><br /><br />Note: The Logo image choosen will be used throughout Wfdownloads.');
+define('_AM_WFDOWNLOADS_MINDEX_PAGEINFOTXT','<ul><li>Wfdownloads main page details.</li><li>You can easily change the image logo, heading, main index header and footer text to suit your own look</li></ul><br /><br />Note: The Logo image chosen will be used throughout Wfdownloads.');
// Submitted Files
define("_AM_WFDOWNLOADS_SUB_SUBMITTEDFILES","Submitted files");
@@ -190,45 +190,45 @@
define("_AM_WFDOWNLOADS_SUB_APPROVEWAITINGFILE","<b>Approve</b> new file information without validation.");
define("_AM_WFDOWNLOADS_SUB_EDITWAITINGFILE","<b>Edit</b> new file information and then approve.");
define("_AM_WFDOWNLOADS_SUB_DELETEWAITINGFILE","<b>Delete</b> the new file information.");
-define("_AM_WFDOWNLOADS_SUB_NOFILESWAITING","There are no files that match this criteria");
+define("_AM_WFDOWNLOADS_SUB_NOFILESWAITING","There are no files that match these criteria");
define("_AM_WFDOWNLOADS_SUB_NEWFILECREATED","New file data created and database updated successfully");
-// Mimetypes
+// Mime types
define("_AM_WFDOWNLOADS_MIME_ID","ID");
define("_AM_WFDOWNLOADS_MIME_EXT","EXT");
define("_AM_WFDOWNLOADS_MIME_NAME","Application type");
define("_AM_WFDOWNLOADS_MIME_ADMIN","Admin");
define("_AM_WFDOWNLOADS_MIME_USER","User");
-// Mimetype Form
-define("_AM_WFDOWNLOADS_MIME_CREATEF","Create mimetype");
-define("_AM_WFDOWNLOADS_MIME_MODIFYF","Modify mimetype");
+// Mime type Form
+define("_AM_WFDOWNLOADS_MIME_CREATEF","Create MIME type");
+define("_AM_WFDOWNLOADS_MIME_MODIFYF","Modify MIME type");
define("_AM_WFDOWNLOADS_MIME_EXTF","File extension");
define("_AM_WFDOWNLOADS_MIME_NAMEF","Application type/name");
-define("_AM_WFDOWNLOADS_MIME_TYPEF","Mimetypes");
-define("_AM_WFDOWNLOADS_MIME_ADMINF","Allowed admin mimetypes/extension");
-define("_AM_WFDOWNLOADS_MIME_ADMINFINFO","<b>Mimetypes/extensions that are available for admin uploads</b>");
-define("_AM_WFDOWNLOADS_MIME_USERF","Allowed user mimetypes/extensions");
-define("_AM_WFDOWNLOADS_MIME_USERFINFO","<b>Mimetypes/extensions that are available for user uploads</b>");
-define("_AM_WFDOWNLOADS_MIME_NOMIMEINFO","No mimetypes selected");
-define("_AM_WFDOWNLOADS_MIME_FINDMIMETYPE","Find mimetype information");
+define("_AM_WFDOWNLOADS_MIME_TYPEF","MIME types");
+define("_AM_WFDOWNLOADS_MIME_ADMINF","Allowed admin MIME types/extension");
+define("_AM_WFDOWNLOADS_MIME_ADMINFINFO","<b>MIME types/extensions that are available for admin uploads</b>");
+define("_AM_WFDOWNLOADS_MIME_USERF","Allowed user MIME types/extensions");
+define("_AM_WFDOWNLOADS_MIME_USERFINFO","<b>MIME types/extensions that are available for user uploads</b>");
+define("_AM_WFDOWNLOADS_MIME_NOMIMEINFO","No MIME types selected");
+define("_AM_WFDOWNLOADS_MIME_FINDMIMETYPE","Find MIME type information");
define("_AM_WFDOWNLOADS_MIME_EXTFIND","Search file extension");
-define("_AM_WFDOWNLOADS_MIME_INFOTEXT","<ul><li>New mimetypes can be created, edited or deleted easily via this form</li>
- <li>Search for a new mimetypes via an external website.</li>
- <li>View displayed mimetypes for Admin and User uploads.</li>
- <li>Change mimetype upload status.</li></ul>
+define("_AM_WFDOWNLOADS_MIME_INFOTEXT","<ul><li>New MIME types can be created, edited or deleted easily via this form</li>
+ <li>Looking for a new MIME type via an external website.</li>
+ <li>View displayed MIME types for Admin and user uploads.</li>
+ <li>Change MIME type upload status.</li></ul>
");
-// Mimetype Buttons
+// Mime type Buttons
define("_AM_WFDOWNLOADS_MIME_CREATE","Create");
define("_AM_WFDOWNLOADS_MIME_CLEAR","Reset");
define("_AM_WFDOWNLOADS_MIME_CANCEL","Cancel");
define("_AM_WFDOWNLOADS_MIME_MODIFY","Modify");
define("_AM_WFDOWNLOADS_MIME_DELETE","Delete");
define("_AM_WFDOWNLOADS_MIME_FINDIT","Get extension!");
-// Mimetype Database
-define("_AM_WFDOWNLOADS_MIME_DELETETHIS","Delete selected mimetype?");
-define("_AM_WFDOWNLOADS_MIME_MIMEDELETED","Mimetype %s has been deleted");
-define("_AM_WFDOWNLOADS_MIME_CREATED","Mimetype information created");
-define("_AM_WFDOWNLOADS_MIME_MODIFIED","Mimetype information modified");
+// Mime type Database
+define("_AM_WFDOWNLOADS_MIME_DELETETHIS","Delete selected MIME type?");
+define("_AM_WFDOWNLOADS_MIME_MIMEDELETED","MIME type %s has been deleted");
+define("_AM_WFDOWNLOADS_MIME_CREATED","MIME type information created");
+define("_AM_WFDOWNLOADS_MIME_MODIFIED","MIME type information modified");
// Vote Information
define("_AM_WFDOWNLOADS_VOTE_RATINGINFOMATION","Voting information");
define("_AM_WFDOWNLOADS_VOTE_TOTALVOTES","Total votes: ");
@@ -259,7 +259,7 @@
define("_AM_WFDOWNLOADS_MOD_MODTITLE","Title");
define("_AM_WFDOWNLOADS_MOD_MODPOSTER","Original poster: ");
define("_AM_WFDOWNLOADS_MOD_DATE","Submitted");
-define("_AM_WFDOWNLOADS_MOD_NOMODREQUEST","There are no requests that match this criteria");
+define("_AM_WFDOWNLOADS_MOD_NOMODREQUEST","There are no requests that match these criteria");
define("_AM_WFDOWNLOADS_MOD_MODIFYSUBMIT","Submitter");
define("_AM_WFDOWNLOADS_MOD_ORIGINAL","Orginal download details");
define("_AM_WFDOWNLOADS_MOD_REQDELETED","Modification request removed from the database");
@@ -273,7 +273,7 @@
define("_AM_WFDOWNLOADS_MOD_MODTITLE","Title");
define("_AM_WFDOWNLOADS_MOD_MODPOSTER","Original poster: ");
define("_AM_WFDOWNLOADS_MOD_DATE","Submitted");
-define("_AM_WFDOWNLOADS_MOD_NOMODREQUEST","There are no requests that match this criteria");
+define("_AM_WFDOWNLOADS_MOD_NOMODREQUEST","There are no requests that match these criteria");
define("_AM_WFDOWNLOADS_MOD_TITLE","Download title");
define("_AM_WFDOWNLOADS_MOD_LID","Download ID");
define("_AM_WFDOWNLOADS_MOD_CID","Category");
@@ -354,7 +354,7 @@
define("_AM_WFDOWNLOADS_FILE_CREATENEWFILE","Create new file");
define("_AM_WFDOWNLOADS_FILE_TITLE","File title");
define("_AM_WFDOWNLOADS_FILE_DLURL","Remote URL");
-define("_AM_WFDOWNLOADS_FILE_FILENAME","Local filename <br /><br /><span style='font-weight: normal;'>Note: if using local file as download, then you must also enter the correct filetype below!</span>");
+define("_AM_WFDOWNLOADS_FILE_FILENAME","Local file name <br /><br /><span style='font-weight: normal;'>Note: if using local file as download, then you must also enter the correct file type below!</span>");
define("_AM_WFDOWNLOADS_FILE_FILETYPE","File type");
define("_AM_WFDOWNLOADS_FILE_MIRRORURL","File mirror");
define("_AM_WFDOWNLOADS_FILE_SUMMARY","File summary");
@@ -399,7 +399,7 @@
define("_AM_WFDOWNLOADS_FILE_FILEMODIFIEDUPDATE","Selected file modified and database updated successfully");
define("_AM_WFDOWNLOADS_FILE_REALLYDELETEDTHIS","Are you sure to delete the selected file?");
define("_AM_WFDOWNLOADS_FILE_FILEWASDELETED","File %s successfully deleted from the database!");
-define("_AM_WFDOWNLOADS_FILE_USE_UPLOAD_TITLE"," Use upload filename for file title.");
+define("_AM_WFDOWNLOADS_FILE_USE_UPLOAD_TITLE"," Use upload file name for file title.");
define("_AM_WFDOWNLOADS_FILE_FILEAPPROVED","File approved and database updated successfully");
define("_AM_WFDOWNLOADS_FILE_CREATENEWSSTORY","<b>Create news story from download</b>");
define("_AM_WFDOWNLOADS_FILE_SUBMITNEWS","Submit new file as news item?");
@@ -431,9 +431,9 @@
define("_AM_WFDOWNLOADS_BROKEN_FILESUBMITTER","Download submitter");
define("_AM_WFDOWNLOADS_BROKEN_DATESUBMITTED","Report date");
define("_AM_WFDOWNLOADS_BROKEN_ACTION","Action");
-define("_AM_WFDOWNLOADS_BROKEN_NOFILEMATCH","There are no broken reports that match this criteria");
+define("_AM_WFDOWNLOADS_BROKEN_NOFILEMATCH","There are no broken reports that match these criteria");
define("_AM_WFDOWNLOADS_BROKENFILEDELETED","Download description removed from database and broken report removed");
-define("_AM_WFDOWNLOADS_BROKEN_DOWNLOAD_DONT_EXISTS","The file does not exists anymore");
+define("_AM_WFDOWNLOADS_BROKEN_DOWNLOAD_DONT_EXISTS","The file no longer exists");
// About defines
define("_AM_WFDOWNLOADS_BY","by");
@@ -485,7 +485,7 @@
define("_AM_WFDOWNLOADS_DB_MSG_CREATE_TABLE_ERR","Error creating table %s");
define("_AM_WFDOWNLOADS_DB_MSG_NEWFIELD","Successfully added field %s");
define("_AM_WFDOWNLOADS_DB_MSG_NEWFIELD_ERR","Error adding field %s");
-define("_AM_WFDOWNLOADS_DB_NEEDUPDATE","Your database is out-of-date. Please upgrade your database tables!<br><b>Note : The SmartFactory strongly recommends you to backup all Wfdownloads tables before running this upgrade script.</b><br>");
+define("_AM_WFDOWNLOADS_DB_NEEDUPDATE","Your database is out-of-date. Please upgrade your database tables!<br><b>Note: The SmartFactory strongly recommends you to backup all Wfdownloads tables before running this upgrade script.</b><br>");
define("_AM_WFDOWNLOADS_DB_NOUPDATE","Your database is up-to-date. No updates are necessary.");
define("_AM_WFDOWNLOADS_DB_UPDATE_DB","Updating database");
define("_AM_WFDOWNLOADS_DB_UPDATE_ERR","Errors updating to version %s");
@@ -526,7 +526,7 @@
define("_AM_WFDOWNLOADS_MIRROR_MIRRORIMAGE","Site logo");
define("_AM_WFDOWNLOADS_MIRROR_CONTINENT","Continent");
define("_AM_WFDOWNLOADS_MIRROR_LOCATION","Location <br /><br />Example: London, UK");
-define("_AM_WFDOWNLOADS_MIRROR_DOWNURL","Download URL <br /><br />Enter the url to the file.");
+define("_AM_WFDOWNLOADS_MIRROR_DOWNURL","Download URL <br /><br />Enter the URL to the file.");
define("_AM_WFDOWNLOADS_MIRROR_FAPPROVE","Mirror approve");
define("_AM_WFDOWNLOADS_MIRROR_ACTION","Action");
define("_AM_WFDOWNLOADS_MIRROR_NOWAITINGMIRRORS","No waiting mirrors found");
@@ -582,8 +582,8 @@
define("_AM_WFDOWNLOADS_FCATEGORY_CATEGORIES_LIST","Categories list");
define("_AM_WFDOWNLOADS_DOWN_ERROR_FILENOTFOUND","Error: file not found on server.");
define("_AM_WFDOWNLOADS_DOWN_ERROR_CATEGORYNOTFOUND","Error: category not found on server.");
-define("_AM_WFDOWNLOADS_MIME_MIMETYPES_LIST","Mimetypes list");
-define("_AM_WFDOWNLOADS_MIME_NOMIMETYPES","No mimetypes");
+define("_AM_WFDOWNLOADS_MIME_MIMETYPES_LIST","MIME types list");
+define("_AM_WFDOWNLOADS_MIME_NOMIMETYPES","No MIME types");
define("_AM_WFDOWNLOADS_MINDEX_NEWDOWN","New/waiting downloads");
define("_AM_WFDOWNLOADS_BROKEN_REPORTS","Broken downloads reports");
define("_AM_WFDOWNLOADS_MODIFICATIONS","Modifications");
@@ -607,8 +607,8 @@
define("_AM_WFDOWNLOADS_IMPORT_PDDOWNLOADS","Import data from PD-Downloads");
define("_AM_WFDOWNLOADS_IMPORT_PDDOWNLOADS_NOTFOUND","Module PD-Downloads not found on this site");
-define("_AM_WFDOWNLOADS_IMPORT_WMPOWNLOADS","Import data from wmpownloads");
-define("_AM_WFDOWNLOADS_IMPORT_WMPOWNLOADS_NOTFOUND","Module wmpownloads not found on this site");
+define("_AM_WFDOWNLOADS_IMPORT_WMPOWNLOADS","Import data from Wmpdownloads");
+define("_AM_WFDOWNLOADS_IMPORT_WMPOWNLOADS_NOTFOUND","Module Wmpdownloads not found on this site");
define("_AM_WFDOWNLOADS_FCATEGORY_GROUPPROMPT_UP","Category upload permissions");
define("_AM_WFDOWNLOADS_PERM_CSELECTPERMISSIONS_UP","Select categories that each group is allowed to upload");
@@ -623,23 +623,23 @@
define("_AM_WFDOWNLOADS_MIME_EXTF_DESC","");
define("_AM_WFDOWNLOADS_MIME_NAMEF_DESC","Enter application associated with this extension.");
-define("_AM_WFDOWNLOADS_MIME_TYPEF_DESC","Enter each mimetype associated with the file extension. Each Mimetype must be separated with a space.");
+define("_AM_WFDOWNLOADS_MIME_TYPEF_DESC","Enter each MIME type associated with the file extension. Each MIME type must be separated with a space.");
//directories
-define('_AM_WFDOWNLOADS_AVAILABLE',"<span style='color : green;'>Available. </span>");
-define('_AM_WFDOWNLOADS_NOTAVAILABLE',"<span style='color : red;'>is not available. </span>");
-define('_AM_WFDOWNLOADS_NOTWRITABLE',"<span style='color : red;'>".' should have permission ( %1$d ), but it has ( %2$d )'. '</span>');
+define('_AM_WFDOWNLOADS_AVAILABLE',"<span style='color:green;'>Available. </span>");
+define('_AM_WFDOWNLOADS_NOTAVAILABLE',"<span style='color:red;'>is not available. </span>");
+define('_AM_WFDOWNLOADS_NOTWRITABLE',"<span style='color:red;'>".' should have permission ( %1$d ), but it has ( %2$d )'. '</span>');
define('_AM_WFDOWNLOADS_CREATETHEDIR','Create it');
define('_AM_WFDOWNLOADS_SETMPERM','Set the permission');
define('_AM_WFDOWNLOADS_DIRCREATED','The directory has been created');
-define('_AM_WFDOWNLOADS_DIRNOTCREATED','The directory can not be created');
+define('_AM_WFDOWNLOADS_DIRNOTCREATED','The directory cannot be created');
define('_AM_WFDOWNLOADS_PERMSET','The permission has been set');
-define('_AM_WFDOWNLOADS_PERMNOTSET','The permission can not be set');
-define('_AM_WFDOWNLOADS_ERROR_UPLOADDIRNOTEXISTS',"Warning: the upload directory does not exists");
-define('_AM_WFDOWNLOADS_ERROR_MAINIMAGEDIRNOTEXISTS',"Warning: the main images directory does not exists");
-define('_AM_WFDOWNLOADS_ERROR_SCREENSHOTSDIRNOTEXISTS',"Warning: the categories images upload directory does not exists");
-define('_AM_WFDOWNLOADS_ERROR_CATIMAGEDIRNOTEXISTS',"Warning: the upload directory does not exists");
+define('_AM_WFDOWNLOADS_PERMNOTSET','The permission cannot be set');
+define('_AM_WFDOWNLOADS_ERROR_UPLOADDIRNOTEXISTS',"Warning: the upload directory does not exist");
+define('_AM_WFDOWNLOADS_ERROR_MAINIMAGEDIRNOTEXISTS',"Warning: the main images directory does not exist");
+define('_AM_WFDOWNLOADS_ERROR_SCREENSHOTSDIRNOTEXISTS',"Warning: the categories images upload directory does not exist");
+define('_AM_WFDOWNLOADS_ERROR_CATIMAGEDIRNOTEXISTS',"Warning: the upload directory does not exist");
// admin/downloads.php
define('_AM_WFDOWNLOADS_SEARCH','Search');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/directorychecker.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/directorychecker.php 2013-10-05 23:32:51 UTC (rev 12141)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/directorychecker.php 2013-10-06 00:49:47 UTC (rev 12142)
@@ -26,6 +26,6 @@
define('_DC_WFDOWNLOADS_SETMPERM','Set the permission');
define('_DC_WFDOWNLOADS_DIRCREATED','The directory has been created');
-define('_DC_WFDOWNLOADS_DIRNOTCREATED','The directory can not be created');
+define('_DC_WFDOWNLOADS_DIRNOTCREATED','The directory cannot be created');
define('_DC_WFDOWNLOADS_PERMSET','The permission has been set');
-define('_DC_WFDOWNLOADS_PERMNOTSET','The permission can not be set');
+define('_DC_WFDOWNLOADS_PERMNOTSET','The permission cannot be set');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/filechecker.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/filechecker.php 2013-10-05 23:32:51 UTC (rev 12141)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/filechecker.php 2013-10-06 00:49:47 UTC (rev 12142)
@@ -27,6 +27,6 @@
define('_FC_WFDOWNLOADS_SETMPERM','Set the permission');
define('_FC_WFDOWNLOADS_FILECOPIED','The file has been copied');
-define('_FC_WFDOWNLOADS_FILENOTCOPIED','The file can not be copied');
+define('_FC_WFDOWNLOADS_FILENOTCOPIED','The file cannot be copied');
define('_FC_WFDOWNLOADS_PERMSET','The permission has been set');
-define('_FC_WFDOWNLOADS_PERMNOTSET','The permission can not be set');
+define('_FC_WFDOWNLOADS_PERMNOTSET','The permission cannot be set');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php 2013-10-05 23:32:51 UTC (rev 12141)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php 2013-10-06 00:49:47 UTC (rev 12142)
@@ -19,19 +19,19 @@
* @version svn:$id$
*/
-//Todo - Still to remove redundat defines from this area.
+//Todo - Still to remove redundant defines from this area.
define("_MD_WFDOWNLOADS_NEEDLOGINVIEW","You need to login first!");
define("_MD_WFDOWNLOADS_NODOWNLOAD","This download does not exist!");
-define("_MD_WFDOWNLOADS_DOWNLOADMINPOSTS","You need to increase you post count <br />Before you can download files");
-define("_MD_WFDOWNLOADS_UPLOADMINPOSTS","You need to increase you post count <br />Before you can upload files");
+define("_MD_WFDOWNLOADS_DOWNLOADMINPOSTS","You need to increase your post count, <br />before you can download files.");
+define("_MD_WFDOWNLOADS_UPLOADMINPOSTS","You need to increase your post count, <br />before you can upload files.");
define("_MD_WFDOWNLOADS_SUBCATLISTING","Category listing");
define("_MD_WFDOWNLOADS_ISADMINNOTICE","Webmaster: there is a problem with this image.");
-define("_MD_WFDOWNLOADS_THANKSFORINFO","Thank-you for your submission. You will be notified once your request has be approved by the webmaster.");
-define("_MD_WFDOWNLOADS_ISAPPROVED","Thank-you for your submission. Your request has been approved and will now appear in our listing.");
-define("_MD_WFDOWNLOADS_THANKSFORHELP","Thank-you for helping to maintain this directory's integrity.");
+define("_MD_WFDOWNLOADS_THANKSFORINFO","Thank you for your submission. You will be notified once your request has been approved by the webmaster.");
+define("_MD_WFDOWNLOADS_ISAPPROVED","Thank you for your submission. Your request has been approved and will now appear in our listing.");
+define("_MD_WFDOWNLOADS_THANKSFORHELP","Thank you for helping to maintain this directory's integrity.");
define("_MD_WFDOWNLOADS_FORSECURITY","For security reasons your user name and IP address will also be temporarily recorded.");
-define("_MD_WFDOWNLOADS_NOPERMISETOLINK","This file doesn't belong to the site you came from <br /><br />Please e-mail the webmaster of the site you came from and tell him: <br /><b>NOT TO LEECH OTHER SITES LINKS!!</b> <br /><br /><b>Definition of a Leecher:</b> One who is to lazy to link from his own server or steals other peoples hard work and makes it look like his own <br /><br /> Your IP address <b>has been logged</b>.");
+define("_MD_WFDOWNLOADS_NOPERMISETOLINK","This file doesn't belong to the site you came from <br /><br />Please e-mail the webmaster of the site you came from and tell him: <br /><b>NOT TO LEECH OTHER SITES LINKS!</b> <br /><br /><b>Definition of a Leecher:</b> One who is too lazy to link from his own server or steals other people's hard work and makes it look like his own <br /><br /> Your IP address <b>has been logged</b>.");
define("_MD_WFDOWNLOADS_SUMMARY","Summary");
define("_MD_WFDOWNLOADS_DESCRIPTION","Description");
define("_MD_WFDOWNLOADS_SUBMITCATHEAD","Submit download form");
@@ -103,7 +103,7 @@
define("_MD_WFDOWNLOADS_RATINGSCALE","The scale is 1 - 10, with 1 being poor and 10 being excellent.");
define("_MD_WFDOWNLOADS_BEOBJECTIVE","Please be objective, if everyone receives a 1 or a 10, the ratings aren't very useful.");
define("_MD_WFDOWNLOADS_DONOTVOTE","Do not vote for your own resource.");
-define("_MD_WFDOWNLOADS_RATEIT","Rate It!");
+define("_MD_WFDOWNLOADS_RATEIT","Rate it!");
define("_MD_WFDOWNLOADS_INTFILEFOUND","Here is a good file to download at %s"); // %s is your site name
define("_MD_WFDOWNLOADS_RANK","Rank");
define("_MD_WFDOWNLOADS_CATEGORY","Category");
@@ -163,7 +163,7 @@
define("_MD_WFDOWNLOADS_TERRABYTES"," TB");
define("_MD_WFDOWNLOADS_FILENOTEXIST","ERROR: file does not exist or file not found!");
-define("_MD_WFDOWNLOADS__MD_WFDOWNLOADS_FILENOTOPEN","ERROR: unable to open file!");
+define("_MD_WFDOWNLOADS_FILENOTOPEN","ERROR: unable to open file!"); // Orphan Define. Delete if not needed (Cesag).
// visit
define("_MD_WFDOWNLOADS_DOWNINPROGRESS","Download in progress");
@@ -244,13 +244,13 @@
define("_MD_WFDOWNLOADS_MIRROR_NOTALLOWESTOSUBMIT","You are not allowed to submit mirrors");
define("_MD_WFDOWNLOADS_MIRRORS","Download mirrors");
define("_MD_WFDOWNLOADS_USERMIRRORSTITLE","Available download mirrors");
-define("_MD_WFDOWNLOADS_USERMIRRORS","View Available download mirrors on %s");
+define("_MD_WFDOWNLOADS_USERMIRRORS","View available download mirrors on %s");
define("_MD_WFDOWNLOADS_NOUSERMIRRORS","Add a new download mirror on %s.");
define("_MD_WFDOWNLOADS_TOTALMIRRORS","Total mirrors");
define("_MD_WFDOWNLOADS_ADDMIRROR","Add mirror");
define("_MD_WFDOWNLOADS_MIRROR_TOTAL","<b>Total mirrors</b> %s");
-define("_MD_WFDOWNLOADS_MIRROR_HOMEURLTITLE","Homepage title");
-define("_MD_WFDOWNLOADS_MIRROR_HOMEURL","Homepage URL");
+define("_MD_WFDOWNLOADS_MIRROR_HOMEURLTITLE","Home page title");
+define("_MD_WFDOWNLOADS_MIRROR_HOMEURL","Home page URL");
define("_MD_WFDOWNLOADS_MIRROR_UPLOADMIRRORIMAGE","Upload site logo");
define("_MD_WFDOWNLOADS_MIRROR_MIRRORIMAGE","Site logo");
define("_MD_WFDOWNLOADS_MIRROR_CONTINENT","Continent");
@@ -302,7 +302,7 @@
}
define("_MD_WFDOWNLOADS_MIRROR_HOMEURLTITLE_DESC","");
-define("_MD_WFDOWNLOADS_MIRROR_HOMEURL_DESC","Enter your homepage URL.");
+define("_MD_WFDOWNLOADS_MIRROR_HOMEURL_DESC","Enter your home page URL.");
define("_MD_WFDOWNLOADS_MIRROR_UPLOADMIRRORIMAGE_DESC","A small logo representing your website.");
define("_MD_WFDOWNLOADS_MIRROR_LOCATION_DESC","Example: London, UK");
define("_MD_WFDOWNLOADS_MIRROR_DOWNURL_DESC","Enter the URL to the file.");
@@ -316,9 +316,9 @@
define("_MD_WFDOWNLOADS_HISTORYD_DESC","The submit date will automatically be added to this.");
define("_MD_WFDOWNLOADS_UPLOAD_FILEC_DESC","Max file size: %s <br />Max image width: %dpx <br />Max image height: %dpx <br /><span title='%s'>Allowed extensions: <br />%s</span>");
-define("_MD_WFDOWNLOADS_SUMMARY_DESC","You can leave this blank <br />A summary will be autocreated if empty.");
-define("_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_YES","Warning: summary field is disabled. <br />The \"Download autosummary\" module preference is enabled. <br />A summary will be autocreated using \"Description\" field content.");
-define("_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_IFBLANK","You can leave this field blank. A summary will be autocreated using \"Description\" field content.");
+define("_MD_WFDOWNLOADS_SUMMARY_DESC","You can leave this blank <br />A summary will be auto created if empty.");
+define("_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_YES","Warning: summary field is disabled. <br />The 'Download auto summary' module preference is enabled. <br />A summary will be auto created using 'Description' field content.");
+define("_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_IFBLANK","You can leave this field blank. A summary will be auto created using 'Description' field content.");
define("_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_NO","You can leave this field blank.");
define("_MD_WFDOWNLOADS_DESCRIPTION_DESC","");
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php 2013-10-05 23:32:51 UTC (rev 12141)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php 2013-10-06 00:49:47 UTC (rev 12142)
@@ -43,7 +43,7 @@
//define("_MI_WFDOWNLOADS_MDOWNLOADS","Downloads"); // NOT USED FROM 3.23
//define('_MI_WFDOWNLOADS_REVIEWS','Reviews'); // NOT USED FROM 3.23
//define("_MI_WFDOWNLOADS_MUPLOADS","Images Upload"); // NOT USED FROM 3.23
-//define("_MI_WFDOWNLOADS_MMIMETYPES","Mimetypes"); // NOT USED FROM 3.23
+//define("_MI_WFDOWNLOADS_MMIMETYPES","MIME types"); // NOT USED FROM 3.23
//define("_MI_WFDOWNLOADS_PERMISSIONS","Permissions"); // NOT USED FROM 3.23
//define("_MI_WFDOWNLOADS_MVOTEDATA","Votes"); // NOT USED FROM 3.23
//define("_MI_WFDOWNLOADS_MMIRRORS","Mirrors"); // NOT USED FROM 3.23
@@ -53,16 +53,16 @@
define('_MI_WFDOWNLOADS_POPULARDSC','The number of hits before a Download status will be considered as popular.');
//Display Icons
-define("_MI_WFDOWNLOADS_ICONDISPLAY","[status] Display Downloads \"popular\" and \"new\" icons");
-define("_MI_WFDOWNLOADS_DISPLAYICONDSC","Select how to display the \"popular\" and \"new\" icons in download listing.");
+define("_MI_WFDOWNLOADS_ICONDISPLAY","[status] Display Downloads 'popular' and 'new' icons");
+define("_MI_WFDOWNLOADS_DISPLAYICONDSC","Select how to display the 'popular' and 'new' icons in download listing.");
define("_MI_WFDOWNLOADS_DISPLAYICON1","Display as icons");
define("_MI_WFDOWNLOADS_DISPLAYICON2","Display as text");
define("_MI_WFDOWNLOADS_DISPLAYICON3","Do not display");
-define("_MI_WFDOWNLOADS_DAYSNEW","[status] Downloads days \"new\"");
-define("_MI_WFDOWNLOADS_DAYSNEWDSC","The amount of days a Download status will be considered as \"new\".");
-define("_MI_WFDOWNLOADS_DAYSUPDATED","[status] Downloads days \"updated\"");
-define("_MI_WFDOWNLOADS_DAYSUPDATEDDSC","The amount of days a Download status will be considered as \"updated\".");
+define("_MI_WFDOWNLOADS_DAYSNEW","[status] Downloads days 'new'");
+define("_MI_WFDOWNLOADS_DAYSNEWDSC","The number of days a download status will be considered 'new'.");
+define("_MI_WFDOWNLOADS_DAYSUPDATED","[status] Downloads days 'updated'");
+define("_MI_WFDOWNLOADS_DAYSUPDATEDDSC","The number of days a download status will be considered 'update'.");
define('_MI_WFDOWNLOADS_PERPAGE','Download listing count');
define('_MI_WFDOWNLOADS_PERPAGEDSC','Number of Downloads to display in each category listing.');
@@ -113,16 +113,16 @@
define('_MI_WFDOWNLOADS_IMGHEIGHT','[upload files] Max upload image height (pixels)');
define('_MI_WFDOWNLOADS_IMGHEIGHTDSC','Maximum image height permitted when uploading image files.');
-define('_MI_WFDOWNLOADS_AUTOSUMMARY','[autosummary] Enable download autosummary');
+define('_MI_WFDOWNLOADS_AUTOSUMMARY','[auto summary] Enable download auto summary');
define('_MI_WFDOWNLOADS_AUTOSUMMARYDESC','Automatically create download summary based on x amount of characters defined.');
-define('_MI_WFDOWNLOADS_AUTOSUMMARYLENGTH','[autosummary] Summary length');
+define('_MI_WFDOWNLOADS_AUTOSUMMARYLENGTH','[auto summary] Summary length');
define('_MI_WFDOWNLOADS_AUTOSUMMARYLENGTHDESC','The maximum amount of characters displayed for the summary.');
define('_MI_WFDOWNLOADS_UPLOADDIR','[upload files] Upload directory');
define('_MI_WFDOWNLOADS_UPLOADDIRDSC','Upload directory *MUST* be an absolute path! <br />No trailing slash.');
define('_MI_WFDOWNLOADS_ENABLERSS','[RSS feeds] Enable RSS Feeds');
-define('_MI_WFDOWNLOADS_ENABLERSSDSC','Select "' . _YES . '" to enable rss feeds.');
+define('_MI_WFDOWNLOADS_ENABLERSSDSC','Select "' . _YES . '" to enable RSS feeds.');
define('_MI_WFDOWNLOADS_DOWNLOADMINPOSTS',"Minimum posts required to download");
define('_MI_WFDOWNLOADS_DOWNLOADMINPOSTSDSC',"Enter the minimum number of posts required to download a file.");
@@ -135,7 +135,7 @@
define('_MI_WFDOWNLOADS_ALLOWSUBMISS2','Download only');
define('_MI_WFDOWNLOADS_ALLOWSUBMISS3','Mirror only');
define('_MI_WFDOWNLOADS_ALLOWSUBMISS4','Both');
-define('_MI_WFDOWNLOADS_ALLOWUPLOADS','[submissions] User can uploads files');
+define('_MI_WFDOWNLOADS_ALLOWUPLOADS','[submissions] User can upload files');
define('_MI_WFDOWNLOADS_ALLOWUPLOADSDSC','Allow Users to upload files directly to your website. <br />This includes both files & screenshots!');
define('_MI_WFDOWNLOADS_ALLOWUPLOADSGROUP','[submissions] Groups uploading files');
define('_MI_WFDOWNLOADS_ALLOWUPLOADSGROUPDSC','Select groups that can upload files directly to your website. <br />This includes both files & screenshots!');
@@ -143,9 +143,9 @@
define('_MI_WFDOWNLOADS_CATEGORYIMG','Categories images upload directory');
define('_MI_WFDOWNLOADS_MAINIMGDIR','Main images directory');
define('_MI_WFDOWNLOADS_USETHUMBS','[thumbnails] Use thumbnails');
-define('_MI_WFDOWNLOADS_USETHUMBSDSC','Supported file types: JPG, GIF, PNG. <br />Wfdownloads will use thumbnails for images (category & screenshots). <br />Set to "' . _NO . '" to use orginal image if the server does not support this option.');
+define('_MI_WFDOWNLOADS_USETHUMBSDSC','Supported file types: JPG, GIF, PNG. <br />Wfdownloads will use thumbnails for images (category & screenshots). <br />Set to "' . _NO . '" to use original image if the server does not support this option.');
define('_MI_WFDOWNLOADS_DATEFORMAT','Timestamp');
-define('_MI_WFDOWNLOADS_DATEFORMATDSC','Default Timestamp for module frontend. <br />More info here: <a href="http://www.php.net/manual/en/function.date.php">http://www.php.net/manual/en/function.date.php</a>');
+define('_MI_WFDOWNLOADS_DATEFORMATDSC','Default Timestamp for module front end. <br />More info here: <a href="http://www.php.net/manual/en/function.date.php">http://www.php.net/manual/en/function.date.php</a>');
define('_MI_WFDOWNLOADS_SHOWDISCLAIMER','[disclaimer] Show disclaimer before user submission');
define('_MI_WFDOWNLOADS_SHOWDOWNDISCL','[disclaimer] Show disclaimer before user download');
define('_MI_WFDOWNLOADS_DISCLAIMER','[disclaimer] Submission disclaimer text');
@@ -197,58 +197,58 @@
define('_MI_WFDOWNLOADS_GLOBAL_NEWCATEGORY_NOTIFY','New Category');
define('_MI_WFDOWNLOADS_GLOBAL_NEWCATEGORY_NOTIFYCAP','Notify me when a new file category is created.');
define('_MI_WFDOWNLOADS_GLOBAL_NEWCATEGORY_NOTIFYDSC','Receive notification when a new file category is created.');
-define('_MI_WFDOWNLOADS_GLOBAL_NEWCATEGORY_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify : New file category.');
+define('_MI_WFDOWNLOADS_GLOBAL_NEWCATEGORY_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify: New file category.');
define('_MI_WFDOWNLOADS_GLOBAL_FILEMODIFY_NOTIFY','Modify File Requested');
define('_MI_WFDOWNLOADS_GLOBAL_FILEMODIFY_NOTIFYCAP','Notify me of any file modification request.');
define('_MI_WFDOWNLOADS_GLOBAL_FILEMODIFY_NOTIFYDSC','Receive notification when any file modification request is submitted.');
-define('_MI_WFDOWNLOADS_GLOBAL_FILEMODIFY_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify : File Modification Requested');
+define('_MI_WFDOWNLOADS_GLOBAL_FILEMODIFY_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify: File Modification Requested');
define('_MI_WFDOWNLOADS_GLOBAL_FILEBROKEN_NOTIFY','Broken File Submitted');
define('_MI_WFDOWNLOADS_GLOBAL_FILEBROKEN_NOTIFYCAP','Notify me of any broken file report.');
define('_MI_WFDOWNLOADS_GLOBAL_FILEBROKEN_NOTIFYDSC','Receive notification when any broken file report is submitted.');
-define('_MI_WFDOWNLOADS_GLOBAL_FILEBROKEN_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify : Broken File Reported');
+define('_MI_WFDOWNLOADS_GLOBAL_FILEBROKEN_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify: Broken File Reported');
define('_MI_WFDOWNLOADS_GLOBAL_FILESUBMIT_NOTIFY','File Submitted');
define('_MI_WFDOWNLOADS_GLOBAL_FILESUBMIT_NOTIFYCAP','Notify me when any new file is submitted (awaiting approval).');
define('_MI_WFDOWNLOADS_GLOBAL_FILESUBMIT_NOTIFYDSC','Receive notification when any new file is submitted (awaiting approval).');
-define('_MI_WFDOWNLOADS_GLOBAL_FILESUBMIT_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify : New file submitted');
+define('_MI_WFDOWNLOADS_GLOBAL_FILESUBMIT_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify: New file submitted');
define('_MI_WFDOWNLOADS_GLOBAL_NEWFILE_NOTIFY','New File');
define('_MI_WFDOWNLOADS_GLOBAL_NEWFILE_NOTIFYCAP','Notify me when any new file is posted.');
define('_MI_WFDOWNLOADS_GLOBAL_NEWFILE_NOTIFYDSC','Receive notification when any new file is posted.');
-define('_MI_WFDOWNLOADS_GLOBAL_NEWFILE_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify : New file');
+define('_MI_WFDOWNLOADS_GLOBAL_NEWFILE_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify: New file');
define('_MI_WFDOWNLOADS_CATEGORY_FILESUBMIT_NOTIFY','File Submitted');
define('_MI_WFDOWNLOADS_CATEGORY_FILESUBMIT_NOTIFYCAP','Notify me when a new file is submitted (awaiting approval) to the current category.');
define('_MI_WFDOWNLOADS_CATEGORY_FILESUBMIT_NOTIFYDSC','Receive notification when a new file is submitted (awaiting approval) to the current category.');
-define('_MI_WFDOWNLOADS_CATEGORY_FILESUBMIT_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify : New file submitted in category');
+define('_MI_WFDOWNLOADS_CATEGORY_FILESUBMIT_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify: New file submitted in category');
define('_MI_WFDOWNLOADS_CATEGORY_NEWFILE_NOTIFY','New File');
define('_MI_WFDOWNLOADS_CATEGORY_NEWFILE_NOTIFYCAP','Notify me when a new file is posted to the current category.');
define('_MI_WFDOWNLOADS_CATEGORY_NEWFILE_NOTIFYDSC','Receive notification when a new file is posted to the current category.');
-define('_MI_WFDOWNLOADS_CATEGORY_NEWFILE_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify : New file in category');
+define('_MI_WFDOWNLOADS_CATEGORY_NEWFILE_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify: New file in category');
define('_MI_WFDOWNLOADS_FILE_APPROVE_NOTIFY','File Approved');
define('_MI_WFDOWNLOADS_FILE_APPROVE_NOTIFYCAP','Notify me when this file is approved.');
define('_MI_WFDOWNLOADS_FILE_APPROVE_NOTIFYDSC','Receive notification when this file is approved.');
-define('_MI_WFDOWNLOADS_FILE_APPROVE_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify : File Approved');
+define('_MI_WFDOWNLOADS_FILE_APPROVE_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify: File Approved');
/* Added by Lankford on 2007/3/21 */
define('_MI_WFDOWNLOADS_FILE_FILEMODIFIED_NOTIFY','File Modified');
define('_MI_WFDOWNLOADS_FILE_FILEMODIFIED_NOTIFYCAP','Notify me when this file is modified.');
define('_MI_WFDOWNLOADS_FILE_FILEMODIFIED_NOTIFYDSC','Receive notification when this file is modified.');
-define('_MI_WFDOWNLOADS_FILE_FILEMODIFIED_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify : File Modified');
+define('_MI_WFDOWNLOADS_FILE_FILEMODIFIED_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify: File Modified');
define('_MI_WFDOWNLOADS_CATEGORY_FILEMODIFIED_NOTIFY','File Modified');
define('_MI_WFDOWNLOADS_CATEGORY_FILEMODIFIED_NOTIFYCAP','Notify me when a file in this category is modified.');
define('_MI_WFDOWNLOADS_CATEGORY_FILEMODIFIED_NOTIFYDSC','Receive notification when a file in this category is modified.');
-define('_MI_WFDOWNLOADS_CATEGORY_FILEMODIFIED_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify : File Modified');
+define('_MI_WFDOWNLOADS_CATEGORY_FILEMODIFIED_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify: File Modified');
define('_MI_WFDOWNLOADS_GLOBAL_FILEMODIFIED_NOTIFY','File Modified');
define('_MI_WFDOWNLOADS_GLOBAL_FILEMODIFIED_NOTIFYCAP','Notify me when any file is modified.');
define('_MI_WFDOWNLOADS_GLOBAL_FILEMODIFIED_NOTIFYDSC','Receive notification when any file is modified.');
-define('_MI_WFDOWNLOADS_GLOBAL_FILEMODIFIED_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify : File Modified');
+define('_MI_WFDOWNLOADS_GLOBAL_FILEMODIFIED_NOTIFYSBJ','[{X_SITENAME}] {X_MODULE} auto-notify: File Modified');
/* End add block */
define('_MI_WFDOWNLOADS_AUTHOR_INFO',"Developer Information");
@@ -285,7 +285,7 @@
ACCURACY OR COMPLETENESS OF ANY STATEMENTS, INFORMATION OR MATERIALS
CONCERNING THE SOFTWARE THAT IS CONTAINED IN XOOPS WEBSITE. IN NO
EVENT WILL XOOPS BE LIABLE FOR ANY INDIRECT, PUNITIVE, SPECIAL,
-INCIDENTAL OR CONSEQUENTIAL DAMAGES HOWEVER THEY MAY ARISE AND EVEN IF
+INCIDENTAL OR CONSEQUENTIAL DAMAGES, HOWEVER THEY MAY ARISE AND EVEN IF
XOOPS HAS BEEN PREVIOUSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES..");
define('_MI_WFDOWNLOADS_AUTHOR_CREDITSTEXT',"The SmartFactory Team would like to thank the following people for their help and support during the development phase of this module: <br /><br />tom, mking, paco1969, mharoun, Talis, m0nty, steenlnielsen, Clubby, Geronimo, bd_csmc, herko, LANG, Stewdio, tedsmith, veggieryan, carnuke, MadFish, Kiang<br />and anyone else who has contributed to either directly or indirectly.");
@@ -309,7 +309,7 @@
define('_MI_WFDOWNLOADS_MIRROR_MAXIMGHEIGHTDSC','Maximum logo height permitted when uploading logo files.'); // not implemented yet
define('_MI_WFDOWNLOADS_MIRROR_ENABLE','[mirrors] Enable mirrors system');
-define('_MI_WFDOWNLOADS_MIRROR_ENABLEDSC','If enabled, morrors system (submit and use mirrors) is enabled in backend.');
+define('_MI_WFDOWNLOADS_MIRROR_ENABLEDSC','If enabled, mirrors system (submit and use mirrors) is enabled in back end.');
define('_MI_WFDOWNLOADS_MIRROR_ENABLEONCHK','[mirrors] Enable server online check');
define('_MI_WFDOWNLOADS_MIRROR_ENABLEONCHKDSC','Enables the host server check for the mirrors. <br />This can slow your page load down if you have many mirrors.');
define('_MI_WFDOWNLOADS_MIRROR_ALLOWSUBMISS','[mirrors] User mirror submissions');
@@ -328,7 +328,7 @@
// 3.23
define("_MI_WFDOWNLOADS_SUBCATSSORTBY","Sort subcategories by");
define("_MI_WFDOWNLOADS_SUBCATSSORTBYDSC","");
-define("_MI_WFDOWNLOADS_SUBCATSSORTBYCID","Category id");
+define("_MI_WFDOWNLOADS_SUBCATSSORTBYCID","Category ID");
define("_MI_WFDOWNLOADS_SUBCATSSORTBYTITLE","Category title");
define("_MI_WFDOWNLOADS_SUBCATSSORTBYWEIGHT","Category weight");
@@ -342,7 +342,7 @@
define("_MI_WFDOWNLOADS_MENU_BROKENS","Brokens");
define("_MI_WFDOWNLOADS_MENU_REPORTSMODIFICATIONS","Broken Reports & Modifications");
define("_MI_WFDOWNLOADS_MENU_IMAGES","Module images");
-define("_MI_WFDOWNLOADS_MENU_MIMETYPES","Mimetypes");
+define("_MI_WFDOWNLOADS_MENU_MIMETYPES","MIME types");
define("_MI_WFDOWNLOADS_MENU_RATINGS","Ratings & Votes");
define("_MI_WFDOWNLOADS_MENU_PERMISSIONS","Permissions");
define("_MI_WFDOWNLOADS_MENU_IMPORT","Import");
@@ -363,13 +363,13 @@
define("_MI_WFDOWNLOADS_VERSIONTYPESDSC","List of version types to enter. <br />Separate with | <br />IMPORTANT: Do not change this once the site is live, add new to the end of the list!");
define("_MI_WFDOWNLOADS_REVIEW_ENABLE","[reviews] Enable Reviews system");
-define("_MI_WFDOWNLOADS_REVIEW_ENABLEDSC","If enabled, Reviews system (submit and show reviews) is enabled in backend.");
+define("_MI_WFDOWNLOADS_REVIEW_ENABLEDSC","If enabled, Reviews system (submit and show reviews) is enabled in back end.");
define("_MI_WFDOWNLOADS_RATING_ENABLE","[ratings] Enable ratings system");
-define("_MI_WFDOWNLOADS_RATING_ENABLEDSC","If enabled, Ratings system (vote and show ratings) is enabled in backend.");
+define("_MI_WFDOWNLOADS_RATING_ENABLEDSC","If enabled, Ratings system (vote and show ratings) is enabled in back end.");
define("_MI_WFDOWNLOADS_BROKENREPORT_ENABLE","[broken reports] Enable Broken reports system");
-define("_MI_WFDOWNLOADS_BROKENREPORT_ENABLEDSC","If enabled, Broken reports system is enabled in backend.");
+define("_MI_WFDOWNLOADS_BROKENREPORT_ENABLEDSC","If enabled, Broken reports system is enabled in back end.");
define("_MI_WFDOWNLOADS_SUBMISSIONS_CONFIGS","Downloads submission generals permissions");
define("_MI_WFDOWNLOADS_SUBMISSIONS_CONFIGSDSC","");
|
|
From: <luc...@us...> - 2013-10-05 23:32:53
|
Revision: 12141
http://sourceforge.net/p/xoops/svn/12141
Author: luciorota
Date: 2013-10-05 23:32:51 +0000 (Sat, 05 Oct 2013)
Log Message:
-----------
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-10-05 23:30:51 UTC (rev 12140)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-10-05 23:32:51 UTC (rev 12141)
@@ -91,8 +91,10 @@
// Added Formulize module support (2006/05/04) jpc - start
$this->initVar('formulize_idreq', XOBJ_DTYPE_INT, 0);
- // Added Formulize module support (2006/05/04) jpc - end
+ // Added 3.23
+ $this->initVar('screenshots', XOBJ_DTYPE_ARRAY, array());
+
if (isset($id)) {
$item = $this->wfdownloads->getHandler('item')->get($id);
foreach ($item->vars as $k => $v) {
@@ -434,8 +436,8 @@
}
- function getForm($customArray = array())
- { // $custom array added April 22, 2006 by jwe)
+ function getForm($customArray = array()) // $custom array added April 22, 2006 by jwe)
+ {
global $xoopsUser;
@@ -657,8 +659,8 @@
}
- function getAdminForm($title, $customArray = array())
- { // $custom array added April 22, 2006 by jwe
+ function getAdminForm($title, $customArray = array()) // $custom array added April 22, 2006 by jwe
+ {
global $xoopsUser;
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
@@ -1099,7 +1101,6 @@
}
}
-
class WfdownloadsDownloadHandler extends XoopsPersistableObjectHandler
{
/**
|
|
From: <luc...@us...> - 2013-10-05 23:30:54
|
Revision: 12140
http://sourceforge.net/p/xoops/svn/12140
Author: luciorota
Date: 2013-10-05 23:30:51 +0000 (Sat, 05 Oct 2013)
Log Message:
-----------
fixed error in download.php
added "infinite" screenshots support // IN PROGRESS
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php
XoopsModules/wfdownloads/trunk/wfdownloads/sql/mysql.sql
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php 2013-10-05 23:10:55 UTC (rev 12139)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php 2013-10-05 23:30:51 UTC (rev 12140)
@@ -76,6 +76,7 @@
// Added Formulize module support (2006/05/04) jpc - start
if (!wfdownloads_checkModule('formulize')) {
$sform = $download->getAdminForm($title);
+ $sform->display();
} elseif ((isset($_POST['submit_category']) && !empty($_POST['submit_category'])) || $lid) {
$fid = $category->getVar('formulize_fid');
$customArray = array();
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php 2013-10-05 23:10:55 UTC (rev 12139)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php 2013-10-05 23:30:51 UTC (rev 12140)
@@ -288,9 +288,9 @@
echo "Imported {$xoopsDB->getAffectedRows()} categories into {$destination['cat']}<br />";
//Import data into downloads table
$sql = "INSERT INTO {$destination['downloads']} (";
- $sql.= " `cid`, `old_lid`, `old_cid`, `title`, `url`, `filename`, `filetype`, `homepage`, `version`, `size`, `platform`, `screenshot`, `screenshot2`, `screenshot3`, `screenshot4`, `submitter`, `publisher`, `status`, `date`, `hits`, `rating`, `votes`, `comments`, `license`, `mirror`, `price`, `paypalemail`, `features`, `requirements`, `homepagetitle`, `forumid`, `limitations`, `versiontypes`, `dhistory`, `published`, `expired`, `updated`, `offline`, `summary`, `description`, `ipaddress`, `notifypub`, `formulize_idreq`";
+ $sql.= " `cid`, `old_lid`, `old_cid`, `title`, `url`, `filename`, `filetype`, `homepage`, `version`, `size`, `platform`, `screenshot`, `screenshot2`, `screenshot3`, `screenshot4`, `submitter`, `publisher`, `status`, `date`, `hits`, `rating`, `votes`, `comments`, `license`, `mirror`, `price`, `paypalemail`, `features`, `requirements`, `homepagetitle`, `forumid`, `limitations`, `versiontypes`, `dhistory`, `published`, `expired`, `updated`, `offline`, `summary`, `description`, `ipaddress`, `notifypub`, `formulize_idreq`, `screenshots`";
$sql.= " ) SELECT ";
- $sql.= " 0, `lid`, `cid`, `title`, `url`, `filename`, `filetype`, `homepage`, `version`, `size`, `platform`, `screenshot`, `screenshot2`, `screenshot3`, `screenshot4`, `submitter`, `publisher`, `status`, `date`, `hits`, `rating`, `votes`, `comments`, `license`, `mirror`, `price`, `paypalemail`, `features`, `requirements`, `homepagetitle`, `forumid`, `limitations`, `versiontypes`, `dhistory`, `published`, `expired`, `updated`, `offline`, `summary`, `description`, `ipaddress`, `notifypub`, `formulize_idreq`";
+ $sql.= " 0, `lid`, `cid`, `title`, `url`, `filename`, `filetype`, `homepage`, `version`, `size`, `platform`, `screenshot`, `screenshot2`, `screenshot3`, `screenshot4`, `submitter`, `publisher`, `status`, `date`, `hits`, `rating`, `votes`, `comments`, `license`, `mirror`, `price`, `paypalemail`, `features`, `requirements`, `homepagetitle`, `forumid`, `limitations`, `versiontypes`, `dhistory`, `published`, `expired`, `updated`, `offline`, `summary`, `description`, `ipaddress`, `notifypub`, `formulize_idreq`, `screenshots`";
$sql.= " FROM {$source['downloads']}";
$xoopsDB->query($sql);
echo "Imported {$xoopsDB->getAffectedRows()} downloads into {$destination['downloads']}<br />";
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php 2013-10-05 23:10:55 UTC (rev 12139)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php 2013-10-05 23:30:51 UTC (rev 12140)
@@ -71,50 +71,68 @@
// =========================================================================================
function update_tables_to_323($module)
{
- $ret = array();
- global $xoopsDB;
-/* IN PROGRESS
- $cat_handler = xoops_getmodulehandler('category', 'wfdownloads');
- $result = $xoopsDB->query("SHOW COLUMNS FROM " . $cat_handler->table);
- while ($existing_field = $xoopsDB->fetchArray($result)) {
- $fields[$existing_field['Field']] = $existing_field['Type'];
- }
- if (in_array("nohtml", array_keys($fields))) {
- $dbupdater = new WfdownloadsDbupdater();
- //Invert column values
- // alter options in wfdownloads_cat
- $table = new WfdownloadsTable('wfdownloads_cat');
- $table->addAlteredField('nohtml', "dohtml tinyint(1) NOT NULL DEFAULT '1'");
- $table->addAlteredField('nosmiley', "dosmiley tinyint(1) NOT NULL DEFAULT '1'");
- $table->addAlteredField('noxcodes', "doxcode tinyint(1) NOT NULL DEFAULT '1'");
- $table->addAlteredField('noimages', "doimage tinyint(1) NOT NULL DEFAULT '1'");
- $table->addAlteredField('nobreak', "dobr tinyint(1) NOT NULL DEFAULT '1'");
+ $dbupdater = new WfdownloadsDbupdater();
- //inverting values no=1 <=> do=0
- // have to store teporarly as value = 2 to
- // avoid putting everithing to same value
- // if you change 1 to 0, then 0 to one,
- // every value will be 1, follow me?
- $table->addUpdatedWhere('dohtml', 2,'=1');
- $table->addUpdatedWhere('dohtml', 1,'=0');
- $table->addUpdatedWhere('dohtml', 0,'=2');
-
- $table->addUpdatedWhere('dosmiley', 2,'=1');
- $table->addUpdatedWhere('dosmiley', 1,'=0');
- $table->addUpdatedWhere('dosmiley', 0,'=2');
-
- $table->addUpdatedWhere('doxcode', 2,'=1');
- $table->addUpdatedWhere('doxcode', 1,'=0');
- $table->addUpdatedWhere('doxcode', 0,'=2');
-
- $table->addUpdatedWhere('doimage', 2,'=1');
- $table->addUpdatedWhere('doimage', 1,'=0');
- $table->addUpdatedWhere('doimage', 0,'=2');
- $ret = $dbupdater->updateTable($table);
+ $download_fields = array(
+ "lid" => array("Type" => "int(11) unsigned NOT NULL auto_increment", "Default" => false),
+ "cid" => array("Type" => "int(5) unsigned NOT NULL default '0'", "Default" => true),
+ "title" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "url" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "filename" => array("Type" => "varchar(150) NOT NULL default ''", "Default" => true),
+ "filetype" => array("Type" => "varchar(100) NOT NULL default ''", "Default" => true),
+ "homepage" => array("Type" => "varchar(100) NOT NULL default ''", "Default" => true),
+ "version" => array("Type" => "varchar(20) NOT NULL default ''", "Default" => true),
+ "size" => array("Type" => "int(8) NOT NULL default '0'", "Default" => true),
+ "platform" => array("Type" => "varchar(50) NOT NULL default ''", "Default" => true),
+ "screenshot" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "screenshot2" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "screenshot3" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "screenshot4" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "submitter" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "publisher" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "status" => array("Type" => "tinyint(2) NOT NULL default '0'", "Default" => true),
+ "date" => array("Type" => "int(10) NOT NULL default '0'", "Default" => true),
+ "hits" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
+ "rating" => array("Type" => "double(6,4) NOT NULL default '0.0000'", "Default" => true),
+ "votes" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
+ "comments" => array("Type" => "int(11) unsigned NOT NULL default '0'", "Default" => true),
+ "license" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "mirror" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "price" => array("Type" => "varchar(10) NOT NULL default 'Free'", "Default" => true),
+ "paypalemail" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "features" => array("Type" => "text NOT NULL", "Default" => false),
+ "requirements" => array("Type" => "text NOT NULL", "Default" => false),
+ "homepagetitle" => array("Type" => "varchar(255) NOT NULL default ''", "Default" => true),
+ "forumid" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "limitations" => array("Type" => "varchar(255) NOT NULL default '30 day trial'", "Default" => true),
+ "versiontypes" => array("Type" => "varchar(255) NOT NULL default 'None'", "Default" => true),
+ "dhistory" => array("Type" => "text NOT NULL", "Default" => false),
+ 'published' => array("Type" => "int(11) NOT NULL default '1089662528'", "Default" => true),
+ "expired" => array("Type" => "int(10) NOT NULL default '0'", "Default" => true),
+ "updated" => array("Type" => "int(11) NOT NULL default '0'", "Default" => true),
+ "offline" => array("Type" => "tinyint(1) NOT NULL default '0'", "Default" => true),
+ "description" => array("Type" => "text NOT NULL", "Default" => false),
+ "ipaddress" => array("Type" => "varchar(120) NOT NULL default '0'", "Default" => true),
+ "notifypub" => array("Type" => "int(1) NOT NULL default '0'", "Default" => true),
+ "summary" => array("Type" => "text NOT NULL", "Default" => false),
+ "formulize_idreq" => array("Type" => "int(5) NOT NULL default '0'", "Default" => true),
+ "screenshots" => array("Type" => "text NOT NULL default ''", "Default" => true)
+ );
+ //$renamed_fields = array(
+ // "old_name" => "new_name"
+ //);
+ echo "<br /><B>Checking Download table</B><br />";
+ $download_handler = xoops_getmodulehandler('download', 'wfdownloads');
+ $download_table = new WfdownloadsTable("wfdownloads_downloads");
+ $fields = get_table_info($download_handler->table, $download_fields);
+ // Check for renamed fields
+ //rename_fields($download_table, $renamed_fields, $fields, $download_fields);
+ update_table($download_fields, $fields, $download_table);
+ if ($dbupdater->updateTable($download_table)) {
+ echo "Downloads table updated<br />";
}
-*/
+ unset($fields);
- return $ret;
}
// =========================================================================================
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/sql/mysql.sql
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/sql/mysql.sql 2013-10-05 23:10:55 UTC (rev 12139)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/sql/mysql.sql 2013-10-05 23:30:51 UTC (rev 12140)
@@ -101,6 +101,7 @@
ipaddress varchar(120) NOT NULL default '0',
notifypub int(1) NOT NULL default '0',
formulize_idreq int(5) NOT NULL default '0',
+ screenshots text NOT NULL default '',
PRIMARY KEY (lid),
KEY cid (cid),
KEY status (status),
|
|
From: <be...@us...> - 2013-10-05 23:10:58
|
Revision: 12139
http://sourceforge.net/p/xoops/svn/12139
Author: beckmi
Date: 2013-10-05 23:10:55 +0000 (Sat, 05 Oct 2013)
Log Message:
-----------
Reversing to "root-based relative path" for iconPath16/32
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/menu.php
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php 2013-10-05 23:01:51 UTC (rev 12138)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php 2013-10-05 23:10:55 UTC (rev 12139)
@@ -31,10 +31,10 @@
$module_handler =& xoops_gethandler('module');
$xoopsModule =& $module_handler->getByDirname(basename(dirname(dirname(__FILE__))));
-//$pathIcon16 = XOOPS_URL . $xoopsModule->getInfo('icons16');
-$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
-//$pathIcon32 = XOOPS_URL . '/' . $xoopsModule->getInfo('icons32');
-$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
+$pathIcon16 = XOOPS_URL . '/' . $xoopsModule->getInfo('icons16');
+$pathIcon32 = XOOPS_URL . '/' . $xoopsModule->getInfo('icons32');
+$pathModuleAdmin = XOOPS_ROOT_PATH . '/' . $xoopsModule->getInfo('dirmoduleadmin');
+require_once $pathModuleAdmin . '/moduleadmin/moduleadmin.php';
include_once dirname(dirname(__FILE__)) . '/include/common.php';
@@ -57,13 +57,12 @@
'con_no' => "<img src='" . $pathIcon16 . '/off.png'."' alt='" . _AM_WFDOWNLOADS_ICO_CONBROKEN . "' title='" . _AM_WFDOWNLOADS_ICO_CONBROKEN . "' align='middle'>"
);*/
+//if ( file_exists($GLOBALS['xoops']->path('/' . $xoopsModule->getInfo('dirmoduleadmin') . '/moduleadmin/moduleadmin.php'))) {
+// include_once $GLOBALS['xoops']->path('/' . $xoopsModule->getInfo('dirmoduleadmin') . '/moduleadmin/moduleadmin.php');
+//} else {
+// echo xoops_error('/' . $xoopsModule->getInfo('dirmoduleadmin') . '/moduleadmin/ is required!!!');
+//}
-if ( file_exists($GLOBALS['xoops']->path('/' . $xoopsModule->getInfo('dirmoduleadmin') . '/moduleadmin/moduleadmin.php'))){
- include_once $GLOBALS['xoops']->path('/' . $xoopsModule->getInfo('dirmoduleadmin') . '/moduleadmin/moduleadmin.php');
-} else {
- echo xoops_error('/' . $xoopsModule->getInfo('dirmoduleadmin') . '/moduleadmin/ is required!!!');
-}
-
// Load language files
xoops_loadLanguage('admin', $xoopsModule->dirname());
xoops_loadLanguage('modinfo', $xoopsModule->dirname());
@@ -75,6 +74,6 @@
$gperm_handler = xoops_gethandler('groupperm');
if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
- include_once(XOOPS_ROOT_PATH . "/class/template.php");
- $xoopsTpl = new XoopsTpl();
+ include_once(XOOPS_ROOT_PATH . "/class/template.php");
+ $xoopsTpl = new XoopsTpl();
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/menu.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/menu.php 2013-10-05 23:01:51 UTC (rev 12138)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/menu.php 2013-10-05 23:10:55 UTC (rev 12139)
@@ -22,7 +22,7 @@
$module_handler = xoops_gethandler('module');
$module = $module_handler->getByDirname(basename(dirname(dirname(__FILE__))));
-$pathIcon32 = $module->getInfo('icons32');
+$pathIcon32 = '../../' . $module->getInfo('icons32');
xoops_loadLanguage('admin', $module->dirname());
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-10-05 23:01:51 UTC (rev 12138)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-10-05 23:10:55 UTC (rev 12139)
@@ -60,8 +60,8 @@
'mysqli' => '5.0.7'
);
$modversion['dirmoduleadmin'] = 'Frameworks/moduleclasses';
-$modversion['icons16'] = '../../Frameworks/moduleclasses/icons/16';
-$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32';
+$modversion['icons16'] = 'Frameworks/moduleclasses/icons/16';
+$modversion['icons32'] = 'Frameworks/moduleclasses/icons/32';
//help files
@@ -500,7 +500,7 @@
'formtype' => 'line_break',
'valuetype' => 'textbox',
'default' => 'head');
-
+
$modversion['config'][] = array(
'name' => 'download_minposts',
'title' => '_MI_WFDOWNLOADS_DOWNLOADMINPOSTS',
|
|
From: <be...@us...> - 2013-10-05 23:01:55
|
Revision: 12138
http://sourceforge.net/p/xoops/svn/12138
Author: beckmi
Date: 2013-10-05 23:01:51 +0000 (Sat, 05 Oct 2013)
Log Message:
-----------
Fixing Admin Form Edit, fixing Modifications Approval
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/modification.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-10-05 16:44:47 UTC (rev 12137)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-10-05 23:01:51 UTC (rev 12138)
@@ -32,7 +32,7 @@
* @var WfdownloadsCategory
* @access public
*/
- public $_category = null;
+ public $category = null;
/**
* @param int|null $id
@@ -40,7 +40,7 @@
public function __construct($id = null)
{
$this->wfdownloads = WfdownloadsWfdownloads::getInstance();
- $this->db = XoopsDatabaseFactory::getDatabaseConnection();
+ $this->db = XoopsDatabaseFactory::getDatabaseConnection();
$this->initVar('lid', XOBJ_DTYPE_INT);
$this->initVar('cid', XOBJ_DTYPE_INT, 0);
$this->initVar('title', XOBJ_DTYPE_TXTBOX, '');
@@ -131,88 +131,162 @@
global $xoopsConfig, $xoopsUser, $myts, $xoopsDB;
xoops_load('XoopsUserUtility');
- $download['id'] = $this->getVar('lid');
+ $download['id'] = $this->getVar('lid');
$download['cid'] = $this->getVar('cid');
$use_mirrors = $this->wfdownloads->getConfig('enable_mirrors');
- $add_mirror = false;
- if (!is_object($xoopsUser) && ($this->wfdownloads->getConfig('anonpost') == _WFDOWNLOADS_ANONPOST_MIRROR || $this->wfdownloads->getConfig('anonpost') == _WFDOWNLOADS_ANONPOST_BOTH) && ($this->wfdownloads->getConfig('submissions') == _WFDOWNLOADS_SUBMISSIONS_MIRROR || $this->wfdownloads->getConfig('submissions') == _WFDOWNLOADS_SUBMISSIONS_BOTH) && $use_mirrors == true) {
+ $add_mirror = false;
+ if (!is_object($xoopsUser)
+ && ($this->wfdownloads->getConfig('anonpost') == _WFDOWNLOADS_ANONPOST_MIRROR
+ || $this->wfdownloads->getConfig('anonpost') == _WFDOWNLOADS_ANONPOST_BOTH)
+ && ($this->wfdownloads->getConfig('submissions') == _WFDOWNLOADS_SUBMISSIONS_MIRROR
+ || $this->wfdownloads->getConfig('submissions') == _WFDOWNLOADS_SUBMISSIONS_BOTH)
+ && $use_mirrors == true
+ ) {
$add_mirror = true;
- } elseif (is_object($xoopsUser) && ($this->wfdownloads->getConfig('submissions') == _WFDOWNLOADS_SUBMISSIONS_MIRROR || $this->wfdownloads->getConfig('submissions') == _WFDOWNLOADS_SUBMISSIONS_BOTH || wfdownloads_userIsAdmin()) && $use_mirrors == true) {
+ } elseif (is_object($xoopsUser)
+ && ($this->wfdownloads->getConfig('submissions') == _WFDOWNLOADS_SUBMISSIONS_MIRROR
+ || $this->wfdownloads->getConfig('submissions') == _WFDOWNLOADS_SUBMISSIONS_BOTH
+ || wfdownloads_userIsAdmin())
+ && $use_mirrors == true
+ ) {
$add_mirror = true;
}
- $download['add_mirror'] = $add_mirror;
+ $download['add_mirror'] = $add_mirror;
$download['use_mirrors'] = $use_mirrors;
- $use_reviews = $this->wfdownloads->getConfig('enable_reviews');
+ $use_reviews = $this->wfdownloads->getConfig('enable_reviews');
$download['use_reviews'] = $use_reviews;
$use_ratings = $this->wfdownloads->getConfig('enable_ratings');
- $download['rateimg'] = "rate" . round(number_format($this->getVar('rating'), 0) / 2) . ".gif"; // this definition is not removed for compatibility issues
+ $download['rateimg']
+ =
+ "rate" . round(number_format($this->getVar('rating'), 0) / 2) . ".gif"; // this definition is not removed for compatibility issues
$download['average_rating'] = $this->getVar('rating'); // new
- $download['votes'] = ($this->getVar('votes') == 1) ? _MD_WFDOWNLOADS_ONEVOTE : sprintf(_MD_WFDOWNLOADS_NUMVOTES, $this->getVar('votes'));
- $download['hits'] = $this->getVar('hits');
- $download['use_ratings'] = $use_ratings;
+ $download['votes'] = ($this->getVar('votes') == 1)
+ ? _MD_WFDOWNLOADS_ONEVOTE
+ : sprintf(
+ _MD_WFDOWNLOADS_NUMVOTES,
+ $this->getVar('votes')
+ );
+ $download['hits'] = $this->getVar('hits');
+ $download['use_ratings'] = $use_ratings;
$download['path'] = $this->wfdownloads->getHandler('category')->getNicePath($download['cid']);
$download['imageheader'] = wfdownloads_headerImage();
- $download['title'] = trim($this->getVar('title'));
- $download['url'] = $this->getVar('url');
+ $download['title'] = trim($this->getVar('title'));
+ $download['url'] = $this->getVar('url');
$download['filename'] = $this->getVar('filename');
$download['filetype'] = $this->getVar('filetype');
if ($this->getVar('screenshot')) {
$download['screenshot_full'] = $this->getVar('screenshot');
- if ($this->getVar('screenshot') && file_exists(XOOPS_ROOT_PATH . '/' . $this->wfdownloads->getConfig('screenshots') . '/' . xoops_trim($this->getVar('screenshot')))) {
+ if ($this->getVar('screenshot')
+ && file_exists(
+ XOOPS_ROOT_PATH . '/' . $this->wfdownloads->getConfig('screenshots') . '/' . xoops_trim($this->getVar('screenshot'))
+ )
+ ) {
if ($this->wfdownloads->getConfig('usethumbs') == true) {
- $download['screenshot_thumb'] = wfdownloads_createThumb($download['screenshot_full'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
- $this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
+ $download['screenshot_thumb'] = wfdownloads_createThumb(
+ $download['screenshot_full'],
+ $this->wfdownloads->getConfig('screenshots'),
+ "thumbs",
+ $this->wfdownloads->getConfig('shotwidth'),
+ $this->wfdownloads->getConfig('shotheight'),
+ $this->wfdownloads->getConfig('imagequality'),
+ $this->wfdownloads->getConfig('updatethumbs'),
+ $this->wfdownloads->getConfig('keepaspect')
+ );
} else {
- $download['screenshot_thumb'] = XOOPS_URL . '/' . $this->wfdownloads->getConfig('screenshots') . '/' . xoops_trim($this->getVar('screenshot'));
+ $download['screenshot_thumb']
+ = XOOPS_URL . '/' . $this->wfdownloads->getConfig('screenshots') . '/' . xoops_trim($this->getVar('screenshot'));
}
}
}
if ($this->getVar('screenshot2') && $this->wfdownloads->getConfig('max_screenshot') >= 2) {
$download['screenshot_full2'] = $this->getVar('screenshot2');
- if ($this->getVar('screenshot2') && file_exists(XOOPS_ROOT_PATH . '/' . $this->wfdownloads->getConfig('screenshots') . '/' . xoops_trim($this->getVar('screenshot2')))) {
+ if ($this->getVar('screenshot2')
+ && file_exists(
+ XOOPS_ROOT_PATH . '/' . $this->wfdownloads->getConfig('screenshots') . '/' . xoops_trim($this->getVar('screenshot2'))
+ )
+ ) {
if ($this->wfdownloads->getConfig('usethumbs') == true) {
- $download['screenshot_thumb2'] = wfdownloads_createThumb($download['screenshot_full2'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
- $this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
+ $download['screenshot_thumb2'] = wfdownloads_createThumb(
+ $download['screenshot_full2'],
+ $this->wfdownloads->getConfig('screenshots'),
+ "thumbs",
+ $this->wfdownloads->getConfig('shotwidth'),
+ $this->wfdownloads->getConfig('shotheight'),
+ $this->wfdownloads->getConfig('imagequality'),
+ $this->wfdownloads->getConfig('updatethumbs'),
+ $this->wfdownloads->getConfig('keepaspect')
+ );
} else {
- $download['screenshot_thumb2'] = XOOPS_URL . '/' . $this->wfdownloads->getConfig('screenshots') . '/' . xoops_trim($this->getVar('screenshot2'));
+ $download['screenshot_thumb2']
+ = XOOPS_URL . '/' . $this->wfdownloads->getConfig('screenshots') . '/' . xoops_trim($this->getVar('screenshot2'));
}
}
}
if ($this->getVar('screenshot3') && $this->wfdownloads->getConfig('max_screenshot') >= 3) {
$download['screenshot_full3'] = $this->getVar('screenshot3');
- if ($this->getVar('screenshot3') && file_exists(XOOPS_ROOT_PATH . '/' . $this->wfdownloads->getConfig('screenshots') . '/' . xoops_trim($this->getVar('screenshot3')))) {
+ if ($this->getVar('screenshot3')
+ && file_exists(
+ XOOPS_ROOT_PATH . '/' . $this->wfdownloads->getConfig('screenshots') . '/' . xoops_trim($this->getVar('screenshot3'))
+ )
+ ) {
if ($this->wfdownloads->getConfig('usethumbs') == true) {
- $download['screenshot_thumb3'] = wfdownloads_createThumb($download['screenshot_full3'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
- $this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
+ $download['screenshot_thumb3'] = wfdownloads_createThumb(
+ $download['screenshot_full3'],
+ $this->wfdownloads->getConfig('screenshots'),
+ "thumbs",
+ $this->wfdownloads->getConfig('shotwidth'),
+ $this->wfdownloads->getConfig('shotheight'),
+ $this->wfdownloads->getConfig('imagequality'),
+ $this->wfdownloads->getConfig('updatethumbs'),
+ $this->wfdownloads->getConfig('keepaspect')
+ );
} else {
- $download['screenshot_thumb3'] = XOOPS_URL . '/' . $this->wfdownloads->getConfig('screenshots') . '/' . xoops_trim($this->getVar('screenshot3'));
+ $download['screenshot_thumb3']
+ = XOOPS_URL . '/' . $this->wfdownloads->getConfig('screenshots') . '/' . xoops_trim($this->getVar('screenshot3'));
}
}
}
if ($this->getVar('screenshot4') && $this->wfdownloads->getConfig('max_screenshot') >= 4) {
$download['screenshot_full4'] = $this->getVar('screenshot4');
- if ($this->getVar('screenshot4') && file_exists(XOOPS_ROOT_PATH . '/' . $this->wfdownloads->getConfig('screenshots') . '/' . xoops_trim($this->getVar('screenshot4')))) {
+ if ($this->getVar('screenshot4')
+ && file_exists(
+ XOOPS_ROOT_PATH . '/' . $this->wfdownloads->getConfig('screenshots') . '/' . xoops_trim($this->getVar('screenshot4'))
+ )
+ ) {
if ($this->wfdownloads->getConfig('usethumbs') == true) {
- $download['screenshot_thumb4'] = wfdownloads_createThumb($download['screenshot_full4'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
- $this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
+ $download['screenshot_thumb4'] = wfdownloads_createThumb(
+ $download['screenshot_full4'],
+ $this->wfdownloads->getConfig('screenshots'),
+ "thumbs",
+ $this->wfdownloads->getConfig('shotwidth'),
+ $this->wfdownloads->getConfig('shotheight'),
+ $this->wfdownloads->getConfig('imagequality'),
+ $this->wfdownloads->getConfig('updatethumbs'),
+ $this->wfdownloads->getConfig('keepaspect')
+ );
} else {
- $download['screenshot_thumb4'] = XOOPS_URL . '/' . $this->wfdownloads->getConfig('screenshots') . '/' . xoops_trim($this->getVar('screenshot4'));
+ $download['screenshot_thumb4']
+ = XOOPS_URL . '/' . $this->wfdownloads->getConfig('screenshots') . '/' . xoops_trim($this->getVar('screenshot4'));
}
}
}
- $download['homepage'] = (!$this->getVar('homepage') || $this->getVar('homepage') == "http://") ? '' : $myts->htmlSpecialChars(trim($this->getVar('homepage')));
- $homepagetitle = $this->getVar('homepagetitle');
+ $download['homepage'] = (!$this->getVar('homepage') || $this->getVar('homepage') == "http://")
+ ? ''
+ : $myts->htmlSpecialChars(
+ trim($this->getVar('homepage'))
+ );
+ $homepagetitle = $this->getVar('homepagetitle');
if ($download['homepage'] && !empty($download['homepage'])) {
$download['homepagetitle'] = ($homepagetitle != "") ? trim($download['homepage']) : trim($homepagetitle);
- $download['homepage'] = "<a href='" . $download['homepage'] . "' target='_blank'>" . $homepagetitle . "</a>";
+ $download['homepage'] = "<a href='" . $download['homepage'] . "' target='_blank'>" . $homepagetitle . "</a>";
} else {
$download['homepage'] = '';
}
@@ -225,7 +299,7 @@
}
}
$download['comments'] = $this->getVar('comments');
- $version = $this->getVar('version');
+ $version = $this->getVar('version');
if ($version != 0) {
$download['version'] = $this->getVar('version');
} else {
@@ -233,23 +307,23 @@
}
$download['downtime'] = wfdownloads_getDownloadTime($this->getVar('size'), 1, 1, 1, 1, 0);
$download['downtime'] = str_replace('|', '<br />', $download['downtime']);
- $download['size'] = wfdownloads_bytesToSize1024($this->getVar('size'));
+ $download['size'] = wfdownloads_bytesToSize1024($this->getVar('size'));
- $time = ($this->getVar('updated') != 0) ? $this->getVar('updated') : $this->getVar('published');
- $download['updated'] = formatTimestamp($time, $this->wfdownloads->getConfig('dateformat'));
+ $time = ($this->getVar('updated') != 0) ? $this->getVar('updated') : $this->getVar('published');
+ $download['updated'] = formatTimestamp($time, $this->wfdownloads->getConfig('dateformat'));
$download['lang_subdate'] = ($this->getVar('updated') != 0) ? _MD_WFDOWNLOADS_UPDATEDON : _MD_WFDOWNLOADS_SUBMITDATE;
$summary = $this->getVar('summary');
- if (
- ($this->wfdownloads->getConfig('autosummary') == _WFDOWNLOADS_AUTOSUMMARY_YES) ||
- ($this->wfdownloads->getConfig('autosummary') == _WFDOWNLOADS_AUTOSUMMARY_IFBLANK && empty($summary))) {
+ if (($this->wfdownloads->getConfig('autosummary') == _WFDOWNLOADS_AUTOSUMMARY_YES)
+ || ($this->wfdownloads->getConfig('autosummary') == _WFDOWNLOADS_AUTOSUMMARY_IFBLANK && empty($summary))
+ ) {
// generate autosummary
- $maxSummaryLength = (int) $this->wfdownloads->getConfig('autosumlength');
+ $maxSummaryLength = (int)$this->wfdownloads->getConfig('autosumlength');
if (wfdownloads_checkModule('xlanguage')) {
global $xlanguage;
- include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/vars.php');
- include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/functions.php');
+ include_once(XOOPS_ROOT_PATH . '/modules/xlanguage/include/vars.php');
+ include_once(XOOPS_ROOT_PATH . '/modules/xlanguage/include/functions.php');
$download['summary'] = xlanguage_ml($this->getVar('description'));
} else {
$download['summary'] = $this->getVar('description');
@@ -263,25 +337,37 @@
$download['summary'] = $summary;
}
- $download['description'] = $this->getVar('description'); //no html
- $download['price'] = ($this->getVar('price') != 0) ? $this->getVar('price') : _MD_WFDOWNLOADS_PRICEFREE;
- $limitationsArray = $this->wfdownloads->getConfig('limitations');
- $download['limitations'] = ($this->getVar('limitations') == '') ? _MD_WFDOWNLOADS_NOTSPECIFIED : $myts->htmlSpecialChars(trim($limitationsArray[$this->getVar('limitations')]));
- $versiontypesArray = $this->wfdownloads->getConfig('versiontypes');
- $download['versiontypes'] = ($this->getVar('versionypes') == '') ? _MD_WFDOWNLOADS_NOTSPECIFIED : $myts->htmlSpecialChars(trim($versiontypesArray[$this->getVar('versiontypes')]));
- $licenseArray = $this->wfdownloads->getConfig('license');
- $download['license'] = ($this->getVar('license') == '') ? _MD_WFDOWNLOADS_NOTSPECIFIED : $myts->htmlSpecialChars(trim($licenseArray[$this->getVar('license')]));
- $download['submitter'] = XoopsUserUtility::getUnameFromId($this->getVar('submitter'));
- $publisher = $this->getVar('publisher');
+ $download['description'] = $this->getVar('description'); //no html
+ $download['price'] = ($this->getVar('price') != 0) ? $this->getVar('price') : _MD_WFDOWNLOADS_PRICEFREE;
+ $limitationsArray = $this->wfdownloads->getConfig('limitations');
+ $download['limitations'] = ($this->getVar('limitations') == '')
+ ? _MD_WFDOWNLOADS_NOTSPECIFIED
+ : $myts->htmlSpecialChars(
+ trim($limitationsArray[$this->getVar('limitations')])
+ );
+ $versiontypesArray = $this->wfdownloads->getConfig('versiontypes');
+ $download['versiontypes'] = ($this->getVar('versionypes') == '')
+ ? _MD_WFDOWNLOADS_NOTSPECIFIED
+ : $myts->htmlSpecialChars(
+ trim($versiontypesArray[$this->getVar('versiontypes')])
+ );
+ $licenseArray = $this->wfdownloads->getConfig('license');
+ $download['license'] = ($this->getVar('license') == '')
+ ? _MD_WFDOWNLOADS_NOTSPECIFIED
+ : $myts->htmlSpecialChars(
+ trim($licenseArray[$this->getVar('license')])
+ );
+ $download['submitter'] = XoopsUserUtility::getUnameFromId($this->getVar('submitter'));
+ $publisher = $this->getVar('publisher');
if (!empty($publisher)) {
$download['publisher'] = $publisher;
} else {
$download['publisher'] = '';
}
- $platformArray = $this->wfdownloads->getConfig('platform');
+ $platformArray = $this->wfdownloads->getConfig('platform');
$download['platform'] = $myts->htmlSpecialChars($platformArray[$this->getVar('platform')]);
- $history = $this->getVar('dhistory', 'n');
- $download['history'] = $myts->displayTarea($history, true);
+ $history = $this->getVar('dhistory', 'n');
+ $download['history'] = $myts->displayTarea($history, true);
$download['features'] = '';
if ($this->getVar('features')) {
$downloadfeatures = explode('|', trim($this->getVar('features')));
@@ -298,23 +384,29 @@
}
}
$download['mail_subject'] = rawurlencode(sprintf(_MD_WFDOWNLOADS_INTFILEFOUND, $xoopsConfig['sitename']));
- $download['mail_body'] = rawurlencode(sprintf(_MD_WFDOWNLOADS_INTFILEFOUND, $xoopsConfig['sitename']) . ': ' . WFDOWNLOADS_URL . '/singlefile.php?cid=' . $download['cid'] . '&lid=' . $download['id']);
+ $download['mail_body'] = rawurlencode(
+ sprintf(_MD_WFDOWNLOADS_INTFILEFOUND, $xoopsConfig['sitename']) . ': ' . WFDOWNLOADS_URL . '/singlefile.php?cid=' . $download['cid']
+ . '&lid=' . $download['id']
+ );
$download['isadmin'] = (wfdownloads_userIsAdmin()) ? true : false;
$download['adminlink'] = '';
if ($download['isadmin'] == true) {
- $download['adminlink'] = '[<a href="' . WFDOWNLOADS_URL . '/admin/downloads.php?op=download.edit&lid=' . $download['id'] . '">' . _MD_WFDOWNLOADS_EDIT . '</a> | ';
- $download['adminlink'] .= '<a href="' . WFDOWNLOADS_URL . '/admin/downloads.php?op=download.delete&lid=' . $download['id'] . '">' . _MD_WFDOWNLOADS_DELETE . '</a>]';
+ $download['adminlink']
+ = '[<a href="' . WFDOWNLOADS_URL . '/admin/downloads.php?op=download.edit&lid=' . $download['id'] . '">' . _MD_WFDOWNLOADS_EDIT
+ . '</a> | ';
+ $download['adminlink'] .= '<a href="' . WFDOWNLOADS_URL . '/admin/downloads.php?op=download.delete&lid=' . $download['id'] . '">'
+ . _MD_WFDOWNLOADS_DELETE . '</a>]';
}
- $votestring = ($this->getVar('votes') == 1) ? _MD_WFDOWNLOADS_ONEVOTE : sprintf(_MD_WFDOWNLOADS_NUMVOTES, $this->getVar('votes'));
+ $votestring = ($this->getVar('votes') == 1) ? _MD_WFDOWNLOADS_ONEVOTE : sprintf(_MD_WFDOWNLOADS_NUMVOTES, $this->getVar('votes'));
$download['is_updated'] = ($this->getVar('updated') > 0) ? _MD_WFDOWNLOADS_UPDATEDON : _MD_WFDOWNLOADS_SUBMITDATE;
if (is_object($xoopsUser) && $download['isadmin'] != true) {
- $download['useradminlink'] = ((int) ($xoopsUser->getvar('uid')) == $this->getVar('submitter')) ? true : false;
+ $download['useradminlink'] = ((int)($xoopsUser->getvar('uid')) == $this->getVar('submitter')) ? true : false;
}
- $sql2 = "SELECT rated FROM " . $xoopsDB->prefix('wfdownloads_reviews') . " WHERE lid = '" . intval($download['id']) . "' AND submit = '1'";
+ $sql2 = "SELECT rated FROM " . $xoopsDB->prefix('wfdownloads_reviews') . " WHERE lid = '" . intval($download['id']) . "' AND submit = '1'";
$results = $xoopsDB->query($sql2);
$numrows = $xoopsDB->getRowsNum($results);
@@ -324,13 +416,15 @@
while ($review_text = $xoopsDB->fetchArray($results)) {
$totalReviewsRating += $review_text['rated'];
}
- $averageReviewsRating = ($download['reviews_num'] > 0) ? $totalReviewsRating / $download['reviews_num'] : 0;
+ $averageReviewsRating = ($download['reviews_num'] > 0) ? $totalReviewsRating / $download['reviews_num'] : 0;
$download['review_average_rating'] = $averageReviewsRating; // new
- $download['review_rateimg'] = 'rate' . round(number_format($averageReviewsRating, 0) / 2) . '.gif'; // this definition is not removed for compatibility issues
+ $download['review_rateimg']
+ =
+ 'rate' . round(number_format($averageReviewsRating, 0) / 2) . '.gif'; // this definition is not removed for compatibility issues
$download['icons'] = wfdownloads_displayIcons($this->getVar('published'), $this->getVar('status'), $this->getVar('hits'));
- $sql3 = "SELECT downurl FROM " . $xoopsDB->prefix('wfdownloads_mirrors') . " WHERE lid = '" . $download['id'] . "' AND submit = '1'";
+ $sql3 = "SELECT downurl FROM " . $xoopsDB->prefix('wfdownloads_mirrors') . " WHERE lid = '" . $download['id'] . "' AND submit = '1'";
$results3 = $xoopsDB->query($sql3);
$numrows2 = $xoopsDB->getRowsNum($results3);
@@ -340,8 +434,9 @@
}
- function getForm($customArray = array()) { // $custom array added April 22, 2006 by jwe)
- {
+ function getForm($customArray = array())
+ { // $custom array added April 22, 2006 by jwe)
+
global $xoopsUser;
include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
@@ -360,17 +455,28 @@
$sform->addElement(new XoopsFormHidden('filename', $this->getVar('filename', 'e')));
$sform->addElement(new XoopsFormHidden('filetype', $this->getVar('filetype', 'e')));
}
- if (($this->wfdownloads->getConfig('useruploads') && array_intersect($this->wfdownloads->getConfig('useruploadsgroup'), $groups)) || (wfdownloads_userIsAdmin()) ) {
- $userfile_file = new XoopsFormFile(_MD_WFDOWNLOADS_UPLOAD_FILEC, 'userfile', 0);
- $maxFileSize = wfdownloads_bytesToSize1024($this->wfdownloads->getConfig('maxfilesize'));
- if (wfdownloads_userIsAdmin()) {
- $criteria = new Criteria('mime_admin', true);
- } else {
- $criteria = new Criteria('mime_user', true);
- }
- $mimetypes = $this->wfdownloads->getHandler('mimetype')->getList($criteria);
- $allowedExtensions = implode(' | ', $mimetypes);
- $userfile_file->setDescription(sprintf(_MD_WFDOWNLOADS_UPLOAD_FILEC_DESC, $maxFileSize, $this->wfdownloads->getConfig('maximgwidth'), $this->wfdownloads->getConfig('maximgheight'), $allowedExtensions, substr($allowedExtensions, 0, 40) . '...'));
+ if (($this->wfdownloads->getConfig('useruploads') && array_intersect($this->wfdownloads->getConfig('useruploadsgroup'), $groups))
+ || (wfdownloads_userIsAdmin())
+ ) {
+ $userfile_file = new XoopsFormFile(_MD_WFDOWNLOADS_UPLOAD_FILEC, 'userfile', 0);
+ $maxFileSize = wfdownloads_bytesToSize1024($this->wfdownloads->getConfig('maxfilesize'));
+ if (wfdownloads_userIsAdmin()) {
+ $criteria = new Criteria('mime_admin', true);
+ } else {
+ $criteria = new Criteria('mime_user', true);
+ }
+ $mimetypes = $this->wfdownloads->getHandler('mimetype')->getList($criteria);
+ $allowedExtensions = implode(' | ', $mimetypes);
+ $userfile_file->setDescription(
+ sprintf(
+ _MD_WFDOWNLOADS_UPLOAD_FILEC_DESC,
+ $maxFileSize,
+ $this->wfdownloads->getConfig('maximgwidth'),
+ $this->wfdownloads->getConfig('maximgheight'),
+ $allowedExtensions,
+ substr($allowedExtensions, 0, 40) . '...'
+ )
+ );
$sform->addElement($userfile_file, false);
}
if ($use_mirrors !== true) {
@@ -381,140 +487,178 @@
if (wfdownloads_checkModule('formulize')) {
$sform->addElement(new XoopsFormHidden('cid', $this->getVar('cid', 'e')));
} else {
- $categories = $this->wfdownloads->getHandler('category')->getUserUpCategories();
+ $categories = $this->wfdownloads->getHandler('category')->getUserUpCategories();
$categoriesTree = new XoopsObjectTree($categories, 'cid', 'pid');
- $sform->addElement(new XoopsFormLabel(_MD_WFDOWNLOADS_CATEGORYC, $categoriesTree->makeSelBox('cid', 'title', "-", $this->getVar('cid', 'e'))));
+ $sform->addElement(
+ new XoopsFormLabel(_MD_WFDOWNLOADS_CATEGORYC, $categoriesTree->makeSelBox('cid', 'title', "-", $this->getVar('cid', 'e')))
+ );
}
// changed - end - March 4 2006 - jpc
- // Changed - start - April 22, 2006 - jwe
- if (count($customArray) == 0) {
- $sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_HOMEPAGETITLEC, 'homepagetitle', 50, 255, $this->getVar('homepagetitle', 'e')), false);
- $sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_HOMEPAGEC, 'homepage', 50, 255, $this->getVar('homepage', 'e')), false);
- $sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_VERSIONC, 'version', 10, 20, $this->getVar('version', 'e')), false);
- $sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_PUBLISHERC, 'publisher', 50, 255, $this->getVar('publisher', 'e')), false);
- $sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_FILESIZEC, 'size', 10, 20, $this->getVar('size', 'e')), false);
+ // Changed - start - April 22, 2006 - jwe
+ if (count($customArray) == 0) {
+ $sform->addElement(
+ new XoopsFormText(_MD_WFDOWNLOADS_HOMEPAGETITLEC, 'homepagetitle', 50, 255, $this->getVar('homepagetitle', 'e')),
+ false
+ );
+ $sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_HOMEPAGEC, 'homepage', 50, 255, $this->getVar('homepage', 'e')), false);
+ $sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_VERSIONC, 'version', 10, 20, $this->getVar('version', 'e')), false);
+ $sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_PUBLISHERC, 'publisher', 50, 255, $this->getVar('publisher', 'e')), false);
+ $sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_FILESIZEC, 'size', 10, 20, $this->getVar('size', 'e')), false);
- $platform_array = $this->wfdownloads->getConfig('platform');
+ $platform_array = $this->wfdownloads->getConfig('platform');
$platform_select = new XoopsFormSelect(_MD_WFDOWNLOADS_PLATFORMC, 'platform', $this->getVar('platform', 'e'));
$platform_select->addOptionArray($platform_array);
- $sform->addElement($platform_select);
+ $sform->addElement($platform_select);
- $license_array = $this->wfdownloads->getConfig('license');
+ $license_array = $this->wfdownloads->getConfig('license');
$license_select = new XoopsFormSelect(_MD_WFDOWNLOADS_LICENCEC, 'license', $this->getVar('license', 'e'));
$license_select->addOptionArray($license_array);
- $sform->addElement($license_select);
+ $sform->addElement($license_select);
- $limitations_array = $this->wfdownloads->getConfig('limitations');
+ $limitations_array = $this->wfdownloads->getConfig('limitations');
$limitations_select = new XoopsFormSelect(_MD_WFDOWNLOADS_LIMITATIONS, 'limitations', $this->getVar('limitations', 'e'));
$limitations_select->addOptionArray($limitations_array);
- $sform->addElement($limitations_select);
+ $sform->addElement($limitations_select);
- $versiontypes_array = $this->wfdownloads->getConfig('versiontypes');
+ $versiontypes_array = $this->wfdownloads->getConfig('versiontypes');
$versiontypes_select = new XoopsFormSelect(_MD_WFDOWNLOADS_VERSIONTYPES, 'versiontypes', $this->getVar('versiontypes', 'e'));
$versiontypes_select->addOptionArray($versiontypes_array);
- $sform->addElement($versiontypes_select);
+ $sform->addElement($versiontypes_select);
- $sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_PRICEC, 'price', 10, 20, $this->getVar('price', 'e')), false);
-/*
- if ($this->wfdownloads->getConfig('autosummary') == true) {
- $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
- $summary_dhtmltextarea->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_ON);
- $summary_dhtmltextarea->setExtra('disabled', 'disabled');
- $sform->addElement($summary_dhtmltextarea, false);
- } else {
- $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
- $summary_dhtmltextarea->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_OFF);
- $sform->addElement($summary_dhtmltextarea, false);
- }
-*/
- switch ($this->wfdownloads->getConfig('autosummary')) {
- case _WFDOWNLOADS_AUTOSUMMARY_YES :
- $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
+ $sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_PRICEC, 'price', 10, 20, $this->getVar('price', 'e')), false);
+ /*
+ if ($this->wfdownloads->getConfig('autosummary') == true) {
+ $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
+ $summary_dhtmltextarea->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_ON);
+ $summary_dhtmltextarea->setExtra('disabled', 'disabled');
+ $sform->addElement($summary_dhtmltextarea, false);
+ } else {
+ $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
+ $summary_dhtmltextarea->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_OFF);
+ $sform->addElement($summary_dhtmltextarea, false);
+ }
+ */
+ switch ($this->wfdownloads->getConfig('autosummary')) {
+ case _WFDOWNLOADS_AUTOSUMMARY_YES :
+ $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_SUMMARY, 'summary', $this->getVar(
+ 'summary',
+ 'e'
+ ), 10, 60, 'smartHiddenSummary');
$summary_dhtmltextarea->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_YES);
$summary_dhtmltextarea->setExtra('disabled', 'disabled');
- $sform->addElement($summary_dhtmltextarea, false);
- break;
- case _WFDOWNLOADS_AUTOSUMMARY_IFBLANK :
- $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
+ $sform->addElement($summary_dhtmltextarea, false);
+ break;
+ case _WFDOWNLOADS_AUTOSUMMARY_IFBLANK :
+ $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_SUMMARY, 'summary', $this->getVar(
+ 'summary',
+ 'e'
+ ), 10, 60, 'smartHiddenSummary');
$summary_dhtmltextarea->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_IFBLANK);
- $sform->addElement($summary_dhtmltextarea, false);
- break;
- default :
- case _WFDOWNLOADS_AUTOSUMMARY_NO :
- $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
+ $sform->addElement($summary_dhtmltextarea, false);
+ break;
+ default :
+ case _WFDOWNLOADS_AUTOSUMMARY_NO :
+ $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_SUMMARY, 'summary', $this->getVar(
+ 'summary',
+ 'e'
+ ), 10, 60, 'smartHiddenSummary');
$summary_dhtmltextarea->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_NO);
- $sform->addElement($summary_dhtmltextarea, false);
- break;
- }
+ $sform->addElement($summary_dhtmltextarea, false);
+ break;
+ }
- $description_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_DESCRIPTION, 'description', $this->getVar('description', 'e'), 15, 60, 'smartHiddenDescription');
+ $description_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_DESCRIPTION, 'description', $this->getVar(
+ 'description',
+ 'e'
+ ), 15, 60, 'smartHiddenDescription');
$description_dhtmltextarea->setDescription(_MD_WFDOWNLOADS_DESCRIPTION_DESC);
- $sform->addElement($description_dhtmltextarea, true);
+ $sform->addElement($description_dhtmltextarea, true);
$features_textarea = new XoopsFormTextArea(_MD_WFDOWNLOADS_KEYFEATURESC, 'features', $this->getVar('features', 'e'), 7, 60);
$features_textarea->setDescription(_MD_WFDOWNLOADS_KEYFEATURESC_DESC);
- $sform->addElement($features_textarea, false);
- $requirements_textarea = new XoopsFormTextArea(_MD_WFDOWNLOADS_REQUIREMENTSC, 'requirements', $this->getVar('requirements', 'e'), 7, 60);
+ $sform->addElement($features_textarea, false);
+ $requirements_textarea = new XoopsFormTextArea(_MD_WFDOWNLOADS_REQUIREMENTSC, 'requirements', $this->getVar(
+ 'requirements',
+ 'e'
+ ), 7, 60);
$requirements_textarea->setDescription(_MD_WFDOWNLOADS_REQUIREMENTSC_DESC);
- $sform->addElement($requirements_textarea, false);
- } else {
- // if we are using a custom form, then add in the form's elements here
- $sform->addElement(new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_DESCRIPTION, 'description', $this->getVar('description', 'e'), 15, 60, 'smartHiddenDescription'), true);
- $sform->addElement(new XoopsFormHidden('size', $this->getVar('size', 'e')));
- $sform = compileElements($customArray['fid'], $sform, $customArray['formulize_mgr'], $customArray['prevEntry'], $customArray['entry'], $customArray['go_back'], $customArray['parentLinks'], $customArray['owner_groups'], $customArray['groups']);
- }
- // Changed - end - April 22, 2006 - jwe
+ $sform->addElement($requirements_textarea, false);
+ } else {
+ // if we are using a custom form, then add in the form's elements here
+ $sform->addElement(
+ new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_DESCRIPTION, 'description', $this->getVar(
+ 'description',
+ 'e'
+ ), 15, 60, 'smartHiddenDescription'),
+ true
+ );
+ $sform->addElement(new XoopsFormHidden('size', $this->getVar('size', 'e')));
+ $sform = compileElements(
+ $customArray['fid'],
+ $sform,
+ $customArray['formulize_mgr'],
+ $customArray['prevEntry'],
+ $customArray['entry'],
+ $customArray['go_back'],
+ $customArray['parentLinks'],
+ $customArray['owner_groups'],
+ $customArray['groups']
+ );
+ }
+ // Changed - end - April 22, 2006 - jwe
$sform->addElement(new XoopsFormTextArea(_MD_WFDOWNLOADS_HISTORYC, 'dhistory', $this->getVar('dhistory', 'e'), 7, 60), false);
if (!$this->isNew() && $this->getVar('dhistory', 'n') != "") {
- $dhistoryaddedd_textarea = new XoopsFormTextArea(_MD_WFDOWNLOADS_HISTORYD, 'dhistoryaddedd', '', 7, 60);
- $dhistoryaddedd_textarea->setDescription(_MD_WFDOWNLOADS_HISTORYD_DESC);
+ $dhistoryaddedd_textarea = new XoopsFormTextArea(_MD_WFDOWNLOADS_HISTORYD, 'dhistoryaddedd', '', 7, 60);
+ $dhistoryaddedd_textarea->setDescription(_MD_WFDOWNLOADS_HISTORYD_DESC);
$sform->addElement($dhistoryaddedd_textarea, false);
}
- if (($this->wfdownloads->getConfig('useruploads') && array_intersect($this->wfdownloads->getConfig('useruploadsgroup'), $groups)) || wfdownloads_userIsAdmin() ) {
+ if (($this->wfdownloads->getConfig('useruploads') && array_intersect($this->wfdownloads->getConfig('useruploadsgroup'), $groups))
+ || wfdownloads_userIsAdmin()
+ ) {
$sform->addElement(new XoopsFormFile(_MD_WFDOWNLOADS_DUPLOADSCRSHOT, 'screenshot', 0), false);
if ($this->wfdownloads->getConfig('max_screenshot') >= 2) {
$sform->addElement(new XoopsFormFile(_MD_WFDOWNLOADS_DUPLOADSCRSHOT, 'screenshot2', 0), false);
}
if ($this->wfdownloads->getConfig('max_screenshot') >= 3) {
- $sform->addElement(new XoopsFormFile(_MD_WFDOWNLOADS_DUPLOADSCRSHOT, 'screenshot3', 0), false);
+ $sform->addElement(new XoopsFormFile(_MD_WFDOWNLOADS_DUPLOADSCRSHOT, 'screenshot3', 0), false);
}
if ($this->wfdownloads->getConfig('max_screenshot') >= 4) {
- $sform->addElement(new XoopsFormFile(_MD_WFDOWNLOADS_DUPLOADSCRSHOT, 'screenshot4', 0), false);
+ $sform->addElement(new XoopsFormFile(_MD_WFDOWNLOADS_DUPLOADSCRSHOT, 'screenshot4', 0), false);
}
}
- $option_tray = new XoopsFormElementTray(_MD_WFDOWNLOADS_OPTIONS, '<br />');
- $notify_checkbox = new XoopsFormCheckBox('', 'notifypub');
- $notify_checkbox->addOption(1, _MD_WFDOWNLOADS_NOTIFYAPPROVE);
- $option_tray->addElement($notify_checkbox);
+ $option_tray = new XoopsFormElementTray(_MD_WFDOWNLOADS_OPTIONS, '<br />');
+ $notify_checkbox = new XoopsFormCheckBox('', 'notifypub');
+ $notify_checkbox->addOption(1, _MD_WFDOWNLOADS_NOTIFYAPPROVE);
+ $option_tray->addElement($notify_checkbox);
$sform->addElement($option_tray);
// button tray
- $button_tray = new XoopsFormElementTray('', '');
- if ($this->isNew()) {
- $button_tray->addElement(new XoopsFormHidden('op', 'download.save'));
- $button_submit = new XoopsFormButton('', '', _SUBMIT, 'submit');
- $button_submit->setExtra('onclick="this.form.elements.op.value=\'download.save\'"');
- $button_tray->addElement($button_submit);
- } else {
- $button_tray->addElement(new XoopsFormHidden('lid', (int) $this->getVar('lid')));
- $button_tray->addElement(new XoopsFormHidden('op', 'download.save'));
- $button_submit = new XoopsFormButton('', '', _SUBMIT, 'submit');
- $button_submit->setExtra('onclick="this.form.elements.op.value=\'download.save\'"');
- $button_tray->addElement($button_submit);
- }
- $button_reset = new XoopsFormButton('', '', _RESET, 'reset');
- $button_tray->addElement($button_reset);
- $button_cancel = new XoopsFormButton('', '', _CANCEL, 'button');
- $button_cancel->setExtra('onclick="history.go(-1)"');
- $button_tray->addElement($button_cancel);
+ $button_tray = new XoopsFormElementTray('', '');
+ if ($this->isNew()) {
+ $button_tray->addElement(new XoopsFormHidden('op', 'download.save'));
+ $button_submit = new XoopsFormButton('', '', _SUBMIT, 'submit');
+ $button_submit->setExtra('onclick="this.form.elements.op.value=\'download.save\'"');
+ $button_tray->addElement($button_submit);
+ } else {
+ $button_tray->addElement(new XoopsFormHidden('lid', (int)$this->getVar('lid')));
+ $button_tray->addElement(new XoopsFormHidden('op', 'download.save'));
+ $button_submit = new XoopsFormButton('', '', _SUBMIT, 'submit');
+ $button_submit->setExtra('onclick="this.form.elements.op.value=\'download.save\'"');
+ $button_tray->addElement($button_submit);
+ }
+ $button_reset = new XoopsFormButton('', '', _RESET, 'reset');
+ $button_tray->addElement($button_reset);
+ $button_cancel = new XoopsFormButton('', '', _CANCEL, 'button');
+ $button_cancel->setExtra('onclick="history.go(-1)"');
+ $button_tray->addElement($button_cancel);
$sform->addElement($button_tray);
return $sform;
}
-
- function getAdminForm($title, $customArray=array()) { // $custom array added April 22, 2006 by jwe
+ function getAdminForm($title, $customArray = array())
+ { // $custom array added April 22, 2006 by jwe
global $xoopsUser;
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
@@ -525,24 +669,27 @@
$sform = new XoopsThemeForm($title, "storyform", $_SERVER['REQUEST_URI']);
$sform->setExtra('enctype="multipart/form-data"');
if (!$this->isNew()) {
- $sform -> addElement(new XoopsFormLabel(_AM_WFDOWNLOADS_FILE_ID, (int) $this->getVar('lid')));
+ $sform->addElement(new XoopsFormLabel(_AM_WFDOWNLOADS_FILE_ID, (int)$this->getVar('lid')));
}
if ($this->getVar('ipaddress') != "") {
$sform->addElement(new XoopsFormLabel(_AM_WFDOWNLOADS_FILE_IP, $this->getVar('ipaddress')));
}
- $titles_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_FILE_TITLE, '<br />');
- $titles = new XoopsFormText('', 'title', 50, 255, $this->getVar('title', 'e'));
- $titles_tray -> addElement($titles);
- $titles_checkbox = new XoopsFormCheckBox('', 'title_checkbox', 0);
- $titles_checkbox -> addOption(1, _AM_WFDOWNLOADS_FILE_USE_UPLOAD_TITLE);
- $titles_tray -> addElement($titles_checkbox);
+ $titles_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_FILE_TITLE, '<br />');
+ $titles = new XoopsFormText('', 'title', 50, 255, $this->getVar('title', 'e'));
+ $titles_tray->addElement($titles);
+ $titles_checkbox = new XoopsFormCheckBox('', 'title_checkbox', 0);
+ $titles_checkbox->addOption(1, _AM_WFDOWNLOADS_FILE_USE_UPLOAD_TITLE);
+ $titles_tray->addElement($titles_checkbox);
$sform->addElement($titles_tray);
if (!$this->isNew()) {
//$sform -> addElement(new XoopsFormText(_AM_WFDOWNLOADS_FILE_SUBMITTERID, 'submitter', 10, 10, $this->getVar('submitter', 'e')), true);
- $submitter_select = new XoopsFormSelectUser (_AM_WFDOWNLOADS_FILE_SUBMITTER, 'submitter', false, $this->getVar('submitter', 'e'), 1, false);
- $submitter_select->setDescription(_AM_WFDOWNLOADS_FILE_SUBMITTER_DESC);
+ $submitter_select = new XoopsFormSelectUser (_AM_WFDOWNLOADS_FILE_SUBMITTER, 'submitter', false, $this->getVar(
+ 'submitter',
+ 'e'
+ ), 1, false);
+ $submitter_select->setDescription(_AM_WFDOWNLOADS_FILE_SUBMITTER_DESC);
$sform->addElement($submitter_select);
} else {
$sform->addElement(new XoopsFormHidden('submitter', $xoopsUser->getVar('uid', 'e')));
@@ -550,247 +697,339 @@
$sform->addElement(new XoopsFormText(_AM_WFDOWNLOADS_FILE_DLURL, 'url', 50, 255, $this->getVar('url', 'e')), false);
$sform->addElement(new XoopsFormText(_AM_WFDOWNLOADS_FILE_FILENAME, 'filename', 50, 255, $this->getVar('filename', 'e')), false);
-/*
- $filename_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_FILE_FILENAME);
- $filename_tray->addElement(new XoopsFormLabel($this->getVar('filename')));
- $filename_tray->addElement(new XoopsFormHidden("filename", $this->getVar('filename', 'e')));
- $sform->addElement($filename_tray, false);
-*/
+ /*
+ $filename_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_FILE_FILENAME);
+ $filename_tray->addElement(new XoopsFormLabel($this->getVar('filename')));
+ $filename_tray->addElement(new XoopsFormHidden("filename", $this->getVar('filename', 'e')));
+ $sform->addElement($filename_tray, false);
+ */
$sform->addElement(new XoopsFormText(_AM_WFDOWNLOADS_FILE_FILETYPE, 'filetype', 50, 100, $this->getVar('filetype', 'e')), false);
if ($use_mirrors !== true) {
$sform->addElement(new XoopsFormText(_AM_WFDOWNLOADS_FILE_MIRRORURL, 'mirror', 50, 255, $this->getVar('mirror', 'e')), false);
}
- $userfile_file = new XoopsFormFile(_MD_WFDOWNLOADS_UPLOAD_FILEC, 'userfile', 0);
- $maxFileSize = wfdownloads_bytesToSize1024($this->wfdownloads->getConfig('maxfilesize'));
- $criteria = new Criteria('mime_admin', true);
- $mimetypes = $this->wfdownloads->getHandler('mimetype')->getList($criteria);
- $allowedExtensions = implode(' | ', $mimetypes);
- $userfile_file->setDescription(sprintf(_MD_WFDOWNLOADS_UPLOAD_FILEC_DESC, $maxFileSize, $this->wfdownloads->getConfig('maximgwidth'), $this->wfdownloads->getConfig('maximgheight'), $allowedExtensions, substr($allowedExtensions, 0, 40) . '...'));
+ $userfile_file = new XoopsFormFile(_MD_WFDOWNLOADS_UPLOAD_FILEC, 'userfile', 0);
+ $maxFileSize = wfdownloads_bytesToSize1024($this->wfdownloads->getConfig('maxfilesize'));
+ $criteria = new Criteria('mime_admin', true);
+ $mimetypes = $this->wfdownloads->getHandler('mimetype')->getList($criteria);
+ $allowedExtensions = implode(' | ', $mimetypes);
+ $userfile_file->setDescription(
+ sprintf(
+ _MD_WFDOWNLOADS_UPLOAD_FILEC_DESC,
+ $maxFileSize,
+ $this->wfdownloads->getConfig('maximgwidth'),
+ $this->wfdownloads->getConfig('maximgheight'),
+ $allowedExtensions,
+ substr($allowedExtensions, 0, 40) . '...'
+ )
+ );
$sform->addElement($userfile_file, false);
// changed - start - March 4 2006 - jpc
// if (file_exists(XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php")) {
// $sform->addElement(new XoopsFormHidden('cid', $this->getVar('cid', 'e')));
// } else {
- $categories = $this->wfdownloads->getHandler('category')->getObjects();
+ $categories = $this->wfdownloads->getHandler('category')->getObjects();
$categoriesTree = new XoopsObjectTree($categories, 'cid', 'pid');
- $sform->addElement(new XoopsFormLabel(_AM_WFDOWNLOADS_FILE_CATEGORY, $categoriesTree->makeSelBox('cid', 'title', '-', $this->getVar('cid', 'e'))));
+ $sform->addElement(
+ new XoopsFormLabel(_AM_WFDOWNLOADS_FILE_CATEGORY, $categoriesTree->makeSelBox('cid', 'title', '-', $this->getVar('cid', 'e')))
+ );
// }
// changed - end - March 4 2006 - jpc
- // changed and added - start - April 22, 2006 - jwe
+ // changed and added - start - April 22, 2006 - jwe
if (count($customArray) == 0) {
- $sform->addElement(new XoopsFormText(_AM_WFDOWNLOADS_FILE_HOMEPAGETITLE, 'homepagetitle', 50, 255, $this->getVar('homepagetitle', 'e')), false);
+ $sform->addElement(
+ new XoopsFormText(_AM_WFDOWNLOADS_FILE_HOMEPAGETITLE, 'homepagetitle', 50, 255, $this->getVar('homepagetitle', 'e')),
+ false
+ );
$sform->addElement(new XoopsFormText(_AM_WFDOWNLOADS_FILE_HOMEPAGE, 'homepage', 50, 255, $this->getVar('homepage', 'e')), false);
$sform->addElement(new XoopsFormText(_AM_WFDOWNLOADS_FILE_VERSION, 'version', 10, 20, $this->getVar('version', 'e')), false);
$sform->addElement(new XoopsFormText(_AM_WFDOWNLOADS_FILE_PUBLISHER, 'publisher', 50, 255, $this->getVar('publisher', 'e')), false);
+
$sform->addElement(new XoopsFormText(_AM_WFDOWNLOADS_FILE_SIZE, 'size', 10, 20, $this->getVar('size', 'e')), false);
- $platform_array = $this->wfdownloads->getConfig('platform');
- $platform_select = new XoopsFormSelect('', 'platform', $this->getVar('platform', 'e'), '', '', 0);
- $platform_select->addOptionArray($platform_array);
- $platform_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_FILE_PLATFORM, ' ');
- $platform_tray->addElement($platform_select);
+ $platform_array = $this->wfdownloads->getConfig('platform');
+ $platform_select = new XoopsFormSelect('', 'platform', $this->getVar('platform', 'e'), '', '', 0);
+ $platform_select->addOptionArray($platform_array);
+ $platform_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_FILE_PLATFORM, ' ');
+ $platform_tray->addElement($platform_select);
$sform->addElement($platform_tray);
- $license_array = $this->wfdownloads->getConfig('license');
- $license_select = new XoopsFormSelect('', 'license', $this->getVar('license', 'e'), '', '', 0);
- $license_select->addOptionArray($license_array);
- $license_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_FILE_LICENCE, ' ');
- $license_tray->addElement($license_select);
+ $license_array = $this->wfdownloads->getConfig('license');
+ $license_select = new XoopsFormSelect('', 'license', $this->getVar('license', 'e'), '', '', 0);
+ $license_select->addOptionArray($license_array);
+ $license_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_FILE_LICENCE, ' ');
+ $license_tray->addElement($license_select);
$sform->addElement($license_tray);
- $limitations_array = $this->wfdownloads->getConfig('limitations');
- $limitations_select = new XoopsFormSelect('', 'limitations', $this->getVar('limitations', 'e'), '', '', 0);
- $limitations_select->addOptionArray($limitations_array);
- $limitations_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_FILE_LIMITATIONS, ' ');
- $limitations_tray->addElement($limitations_select);
+ $limitations_array = $this->wfdownloads->getConfig('limitations');
+ $limitations_select = new XoopsFormSelect('', 'limitations', $this->getVar('limitations', 'e'), '', '', 0);
+ $limitations_select->addOptionArray($limitations_array);
+ $limitations_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_FILE_LIMITATIONS, ' ');
+ $limitations_tray->addElement($limitations_select);
$sform->addElement($limitations_tray);
- $versiontypes_array = $this->wfdownloads->getConfig('versiontypes');
- $versiontypes_select = new XoopsFormSelect('', 'versiontypes', $this->getVar('versiontypes', 'e'), '', '', 0);
- $versiontypes_select->addOptionArray($versiontypes_array);
- $versiontypes_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_FILE_VERSIONTYPES, ' ');
- $versiontypes_tray->addElement($versiontypes_select);
+ $versiontypes_array = $this->wfdownloads->getConfig('versiontypes');
+ $versiontypes_select = new XoopsFormSelect('', 'versiontypes', $this->getVar('versiontypes', 'e'), '', '', 0);
+ $versiontypes_select->addOptionArray($versiontypes_array);
+ $versiontypes_tray = new XoopsFormElementTray(_AM_WFDOWNLOADS_FILE_VERSIONTYPES, ' ');
+ $versiontypes_tray->addElement($versiontypes_select);
$sform->addElement($versiontypes_tray);
$sform->addElement(new XoopsFormText(_AM_WFDOWNLOADS_FILE_PRICE, 'price', 10, 20, $this->getVar('price', 'e')), false);
- $mode = 'html';
- $summary_tray = new XoopsFormElementTray(_MD_WFDOWNLOADS_SUMMARY, '<br />');
- $options['name'] = 'summary';
- $options['value'] = $this->getVar('summary', 'e');
- $options['rows'] = 10;
- $options['cols'] = '100%';
- $options['width'] = '100%';
- $options['height'] = '200px';
- $options['mode'] = $mode; // for editors that support mode option
- $summary_editor = new XoopsFormEditor('', $this->wfdownloads->getConfig('editor_options'), $options, $nohtml = false, $onfailure = 'textarea');
- $summary_tray->addElement($summary_editor);
-/*
- if ($this->wfdownloads->getConfig('autosummary') == true) {
- $summary_tray->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_ON);
- } else {
- $summary_tray->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_OFF);
- }
-*/
- switch ($this->wfdownloads->getConfig('autosummary')) {
- case _WFDOWNLOADS_AUTOSUMMARY_YES :
- $summary_tray->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_YES);
- break;
- case _WFDOWNLOADS_AUTOSUMMARY_IFBLANK :
- $summary_tray->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_IFBLANK);
- break;
- default :
- case _WFDOWNLOADS_AUTOSUMMARY_NO :
- $summary_tray->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_NO);
- break;
- }
- $sform->addElement($summary_tray);
+ $mode = 'html';
+ $summary_tray = new XoopsFormElementTray(_MD_WFDOWNLOADS_SUMMARY, '<br />');
+ $options['name'] = 'summary';
+ $options['value'] = $this->getVar('summary', 'e');
+ $options['rows'] = 10;
+ $options['cols'] = '100%';
+ $options['width'] = '100%';
+ $options['height'] = '200px';
+ $options['mode'] = $mode; // for editors that support mode option
+ $summary_editor = new XoopsFormEditor('', $this->wfdownloads->getConfig('editor_options'), $options, $nohtml = false,
+ $onfailure = 'textarea');
+ $summary_tray->addElement($summary_editor);
+ /*
+ if ($this->wfdownloads->getConfig('autosummary') == true) {
+ $summary_tray->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_ON);
+ } else {
+ $summary_tray->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_OFF);
+ }
+ */
+ switch ($this->wfdownloads->getConfig('autosummary')) {
+ case _WFDOWNLOADS_AUTOSUMMARY_YES :
+ $summary_tray->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_YES);
+ break;
+ case _WFDOWNLOADS_AUTOSUMMARY_IFBLANK :
+ $summary_tray->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_IFBLANK);
+ break;
+ default :
+ case _WFDOWNLOADS_AUTOSUMMARY_NO :
+ $summary_tray->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_NO);
+ break;
+ }
+ $sform->addElement($summary_tray);
- $description_tray = new XoopsFormElementTray(_MD_WFDOWNLOADS_DESCRIPTION, '<br />');
- $options['name'] ...
[truncated message content] |
|
From: <luc...@us...> - 2013-10-05 16:44:51
|
Revision: 12137
http://sourceforge.net/p/xoops/svn/12137
Author: luciorota
Date: 2013-10-05 16:44:47 +0000 (Sat, 05 Oct 2013)
Log Message:
-----------
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-10-05 16:39:39 UTC (rev 12136)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-10-05 16:44:47 UTC (rev 12137)
@@ -1,4 +1,4 @@
-<b><u>=> Version 3.23 Beta (2013-10-03)</u></b>
+<b><u>=> Version 3.23 Beta (2013-10-05)</u></b>
- module standardization: header.php, admin/admin_header.php, xoops_version.php
- module standardization: standardize directories/files names/structures
- module standardization: standardize code headers
@@ -26,6 +26,7 @@
- added: folder checker (mamba + luciorota)
- added: file checker (luciorota)
- added: module is clonable, built-in module clone function (trabis/luciorota)
+- added: cloned module can import data from wfdownloads (luciorota)
- added: user links to downloaders/voters (mamba)
- removed: unupgraded languages from repository (luciorota)
- removed: unused templates (luciorota)
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-10-05 16:39:39 UTC (rev 12136)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-10-05 16:44:47 UTC (rev 12137)
@@ -42,9 +42,9 @@
$modversion['onUpdate'] = 'include/module.php';
$modversion['onUninstall'] = 'include/module.php';
-$modversion['date'] = '2013-10-03';
-$modversion['release_date'] = '2013/10/03';
-$modversion['releasedate'] = '2013-10-03';
+$modversion['date'] = '2013-10-05';
+$modversion['release_date'] = '2013/10/05';
+$modversion['releasedate'] = '2013-10-05';
$modversion['status'] = 'BETA 1';
$modversion['teammembers'] = "Bender, David, FrankBlack, Xpider, M0nty, Mithrandir, Marcan, felix[fx2024], Sudhaker, Jegelstaff";
|
|
From: <luc...@us...> - 2013-10-05 16:39:42
|
Revision: 12136
http://sourceforge.net/p/xoops/svn/12136
Author: luciorota
Date: 2013-10-05 16:39:39 +0000 (Sat, 05 Oct 2013)
Log Message:
-----------
created import procedure from original wfdownloads 3.23 module to cloned module
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php 2013-10-05 13:47:28 UTC (rev 12135)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php 2013-10-05 16:39:39 UTC (rev 12136)
@@ -118,8 +118,8 @@
// Is wf-downloads installed?
if ($wfdownloads->getModule()->dirname() != "wf"."downloads") {
$got_options = false;
- if (wfdownloads_checkModule('wf'.'downloads')) {
- $moduleVersion = round(wfdownloads_checkModule('wf'.'downloads') / 100, 2);
+ if (wfdownloads_checkModule('wf'.'downloads')) { // don't modify, is for cloning
+ $moduleVersion = round(wfdownloads_checkModule('wf'.'downloads') / 100, 2); // don't modify, is for cloning
$button = new XoopsFormButton(_AM_WFDOWNLOADS_IMPORT_WFD . '<br />' . $moduleVersion, "wmp_button", _AM_WFDOWNLOADS_IMPORT_BUTTON_IMPORT, "submit");
$button->setExtra("onclick='document.forms.form.op.value=\"import.wfd322\"'");
$form->addElement($button);
@@ -205,100 +205,162 @@
function import_wfd_to_wfdownloads()
{
global $xoopsDB;
+ $module_handler =& xoops_gethandler('module');
+ // Get source module/config
+ $wfdDirname = 'wf'.'downloads'; // don't modify, is for cloning
+ $wfdModule = $module_handler->getByDirname($wfdDirname);
+ if (empty($wfdModuleConfig)) {
+ $config_handler = xoops_gethandler("config");
+ $wfdModuleConfig = $config_handler->getConfigsByCat(0, $wfdModule->mid());
+ }
+ $wfdCategoriesHandler = xoops_getModuleHandler('category', $wfdDirname);
+ $wfdDownloadsHandler = xoops_getModuleHandler('download', $wfdDirname);
+ // Get destination module/handlers/configs
+ $wfdownloads = WfdownloadsWfdownloads::getInstance();
+
+ echo "<br /><b>Copying Files</b><br />";
+ // Copy categories images/thumbnails
+ if (!wfdownloads_copyDir(XOOPS_ROOT_PATH . '/' . $wfdModuleConfig['catimage'], XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('catimage'))) {
+ return false;
+ }
+ echo "Copied categories images and thumbnails<br />";
+ // Copy screenshots images/thumbnails
+ if (!wfdownloads_copyDir(XOOPS_ROOT_PATH . '/' . $wfdModuleConfig['screenshots'], XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('screenshots'))) {
+ return false;
+ }
+ echo "Copied downloads screenshots and thumbnails<br />";
+ // Copy files
+ if (!wfdownloads_copyDir($wfdModuleConfig['uploaddir'], $wfdownloads->getConfig('uploaddir'))) {
+ return false;
+ }
+ echo "Copied files<br />";
+
echo "<br /><b>Importing Data</b><br />";
$destination = array(
"cat" => $xoopsDB->prefix("wfdownloads_cat"),
"downloads" => $xoopsDB->prefix("wfdownloads_downloads"),
+ "mirrors" => $xoopsDB->prefix("wfdownloads_mirrors"),
+ "reviews" => $xoopsDB->prefix("wfdownloads_reviews"),
"broken" => $xoopsDB->prefix("wfdownloads_broken"),
"mod" => $xoopsDB->prefix("wfdownloads_mod"),
"votes" => $xoopsDB->prefix("wfdownloads_votedata"));
$source = array(
- "cat" => $xoopsDB ->prefix("wf"."downloads_cat"),
- "downloads" => $xoopsDB->prefix("wf"."downloads_downloads"),
- "broken" => $xoopsDB->prefix("wf"."downloads_broken"),
- "mod" => $xoopsDB->prefix("wf"."downloads_mod"),
- "votes" => $xoopsDB->prefix("wf"."downloads_votedata"));
+ "cat" => $xoopsDB ->prefix("wf"."downloads_cat"), // don't modify, is for cloning
+ "downloads" => $xoopsDB->prefix("wf"."downloads_downloads"), // don't modify, is for cloning
+ "mirrors" => $xoopsDB->prefix("wf"."downloads_mirrors"), // don't modify, is for cloning
+ "reviews" => $xoopsDB->prefix("wf"."downloads_reviews"), // don't modify, is for cloning
+ "broken" => $xoopsDB->prefix("wf"."downloads_broken"), // don't modify, is for cloning
+ "mod" => $xoopsDB->prefix("wf"."downloads_mod"), // don't modify, is for cloning
+ "votes" => $xoopsDB->prefix("wf"."downloads_votedata")); // don't modify, is for cloning
//Add temporary field to category table
- $xoopsDB->query("ALTER TABLE " . $destination['cat'] . " ADD `old_cid` int NOT NULL default 0");
- $xoopsDB->query("ALTER TABLE " . $destination['cat'] . " ADD `old_pid` int NOT NULL default 0");
-
+ $xoopsDB->query("ALTER TABLE {$destination['cat']} ADD `old_cid` int NOT NULL default 0");
+ $xoopsDB->query("ALTER TABLE {$destination['cat']} ADD `old_pid` int NOT NULL default 0");
//Add temporary fields to downloads table
- $xoopsDB->query("ALTER TABLE " . $destination['downloads'] . " ADD `old_lid` int NOT NULL default 0");
- $xoopsDB->query("ALTER TABLE " . $destination['downloads'] . " ADD `old_cid` int NOT NULL default 0");
+ $xoopsDB->query("ALTER TABLE {$destination['downloads']} ADD `old_lid` int NOT NULL default 0");
+ $xoopsDB->query("ALTER TABLE {$destination['downloads']} ADD `old_cid` int NOT NULL default 0");
+ //Get latest mirror ID to determine which records will need an updated lid value afterwards
+ $result = $xoopsDB->query("SELECT MAX(mirror_id) FROM {$destination['mirrors']}");
+ list($max_mirrorid) = $xoopsDB->fetchRow($result);
+ //Get latest review ID to determine which records will need an updated lid value afterwards
+ $result = $xoopsDB->query("SELECT MAX(review_id) FROM {$destination['reviews']}");
+ list($max_reviewid) = $xoopsDB->fetchRow($result);
//Get latest mod request ID to determine which records will need an updated lid value afterwards
- $result = $xoopsDB->query("SELECT MAX(requestid) FROM " . $destination['mod']);
+ $result = $xoopsDB->query("SELECT MAX(requestid) FROM {$destination['mod']}");
list($max_requestid) = $xoopsDB->fetchRow($result);
//Get latest report ID to determine, which records will need an updated lid value afterwards
- $result = $xoopsDB->query("SELECT MAX(reportid) FROM " . $destination['broken']);
+ $result = $xoopsDB->query("SELECT MAX(reportid) FROM {$destination['broken']}");
list($max_reportid) = $xoopsDB->fetchRow($result);
//Get latest vote ID to determine which records will need an updated lid value afterwards
- $result = $xoopsDB->query("SELECT MAX(ratingid) FROM " . $destination['votes']);
+ $result = $xoopsDB->query("SELECT MAX(ratingid) FROM {$destination['votes']}");
list($max_ratingid) = $xoopsDB->fetchRow($result);
//Import data into category table
- $sql = "INSERT INTO " . $destination['cat'] . " (";
- $sql.= "`old_cid`, `old_pid`, `title`, `imgurl`, `summary`";
- $sql.= ") SELECT ";
- $sql.= "`cid`, `pid`, `title`, `imgurl`, `summary`";
- $sql.= "FROM " . $source['cat'];
+ $sql = "INSERT INTO {$destination['cat']} (";
+ $sql.= " `old_cid`, `old_pid`, `title`, `imgurl`, `description`, `total`, `summary`, `spotlighttop`, `spotlighthis`, `dohtml`, `dosmiley`, `doxcode`, `doimage`, `dobr`, `weight`, `formulize_fid`";
+ $sql.= " ) SELECT ";
+ $sql.= " `cid`, `pid`, `title`, `imgurl`, `description`, `total`, `summary`, `spotlighttop`, `spotlighthis`, `dohtml`, `dosmiley`, `doxcode`, `doimage`, `dobr`, `weight`, `formulize_fid`";
+ $sql.= " FROM {$source['cat']}";
$xoopsDB->query($sql);
- echo "Imported " . $xoopsDB->getAffectedRows() . " categories into " . $destination['cat'] . "<br />";
+ echo "Imported {$xoopsDB->getAffectedRows()} categories into {$destination['cat']}<br />";
//Import data into downloads table
- $xoopsDB->query("
- INSERT INTO " . $destination['downloads'] . " (
- `cid`, `old_lid`, `old_cid`, `title`, `url`, `homepage`, `version`, `size`, `platform`, `screenshot`, `screenshot2`, `screenshot3`, `screenshot4`, `submitter`, `status`, `published`, `hits`, `rating`, `votes`, `comments`, `features`, `requirements`, `dhistory`, `summary`, `description`)
- SELECT
- 0, `lid`, `cid`, `title`, `url`, `homepage`, `version`, `size`, `platform`, `screenshot`, `screenshot2`, `screenshot3`, `screenshot4`, `submitter`, `status`, `published`, `hits`, `rating`, `votes`, `comments`, `features`, `requirements`, `dhistory`, `summary`, `description`
- FROM " . $source['downloads']);
- echo "Imported " . $xoopsDB->getAffectedRows() . " downloads into " . $destination['downloads'] . "<br />";
+ $sql = "INSERT INTO {$destination['downloads']} (";
+ $sql.= " `cid`, `old_lid`, `old_cid`, `title`, `url`, `filename`, `filetype`, `homepage`, `version`, `size`, `platform`, `screenshot`, `screenshot2`, `screenshot3`, `screenshot4`, `submitter`, `publisher`, `status`, `date`, `hits`, `rating`, `votes`, `comments`, `license`, `mirror`, `price`, `paypalemail`, `features`, `requirements`, `homepagetitle`, `forumid`, `limitations`, `versiontypes`, `dhistory`, `published`, `expired`, `updated`, `offline`, `summary`, `description`, `ipaddress`, `notifypub`, `formulize_idreq`";
+ $sql.= " ) SELECT ";
+ $sql.= " 0, `lid`, `cid`, `title`, `url`, `filename`, `filetype`, `homepage`, `version`, `size`, `platform`, `screenshot`, `screenshot2`, `screenshot3`, `screenshot4`, `submitter`, `publisher`, `status`, `date`, `hits`, `rating`, `votes`, `comments`, `license`, `mirror`, `price`, `paypalemail`, `features`, `requirements`, `homepagetitle`, `forumid`, `limitations`, `versiontypes`, `dhistory`, `published`, `expired`, `updated`, `offline`, `summary`, `description`, `ipaddress`, `notifypub`, `formulize_idreq`";
+ $sql.= " FROM {$source['downloads']}";
+ $xoopsDB->query($sql);
+ echo "Imported {$xoopsDB->getAffectedRows()} downloads into {$destination['downloads']}<br />";
+
+ //Import data into mirrors table
+ $sql = "INSERT INTO {$destination['mirrors']} (";
+ $sql.= " `lid`, `title`, `homeurl`, `location`, `continent`, `downurl`, `submit`, `date`, `uid`";
+ $sql.= " ) SELECT";
+ $sql.= " `lid`, `title`, `homeurl`, `location`, `continent`, `downurl`, `submit`, `date`, `uid`";
+ $sql.= " FROM {$source['mirrors']}";
+ $xoopsDB->query($sql);
+ echo "Imported {$xoopsDB->getAffectedRows()} mirrors into {$destination['mirrors']}<br />";
+ //Import data into reviews table
+ $sql = "INSERT INTO {$destination['reviews']} (";
+ $sql.= " `lid`, `title`, `review`, `submit`, `date`, `uid`, `rate`";
+ $sql.= " ) SELECT";
+ $sql.= " `lid`, `title`, `review`, `submit`, `date`, `uid`, `rate`";
+ $sql.= " FROM {$source['reviews']}";
+ $xoopsDB->query($sql);
+ echo "Imported {$xoopsDB->getAffectedRows()} reviews into {$destination['reviews']}<br />";
//Import data into brokens table
- $xoopsDB->query("
- INSERT INTO " . $destination['broken'] . " (
- `lid`, `sender`, `ip`)
- SELECT
- `lid`, `sender`, `ip`
- FROM " . $source['broken']);
- echo "Imported " . $xoopsDB->getAffectedRows()." broken reports into " . $destination['broken'] . "<br />";
+ $sql = "INSERT INTO {$destination['broken']} (";
+ $sql.= " `lid`, `sender`, `ip`";
+ $sql.= " ) SELECT";
+ $sql.= " `lid`, `sender`, `ip`";
+ $sql.= " FROM {$source['broken']}";
+ $xoopsDB->query($sql);
+ echo "Imported {$xoopsDB->getAffectedRows()} broken reports into {$destination['broken']}<br />";
//Import data into votedata table
- $xoopsDB->query("
- INSERT INTO " . $destination['votes'] . " (
- `lid`, `ratinguser`, `rating`, `ratinghostname`, `ratingtimestamp`)
- SELECT
- `lid`, `ratinguser`, `rating`, `ratinghostname`, `ratingtimestamp`
- FROM " . $source['votes']);
- echo "Imported " . $xoopsDB->getAffectedRows()." votes into " . $destination['votes'] . "<br />";
+ $sql = "INSERT INTO {$destination['votes']} (";
+ $sql.= " `lid`, `ratinguser`, `rating`, `ratinghostname`, `ratingtimestamp`";
+ $sql.= " ) SELECT";
+ $sql.= " `lid`, `ratinguser`, `rating`, `ratinghostname`, `ratingtimestamp`";
+ $sql.= " FROM {$source['votes']}";
+ $xoopsDB->query($sql);
+ echo "Imported {$xoopsDB->getAffectedRows()} votes into {$destination['votes']}<br />";
//Import data into mod request table
- $xoopsDB->query("
- INSERT INTO " . $destination['mod'] . " (
- `lid`, `cid`, `title`, `url`, `homepage`, `version`, `size`, `platform`, `screenshot`, `description`, `modifysubmitter`, `features`, `requirements`, `publisher`, `dhistory`, `summary`)
- SELECT
- `lid`, `cid`, `title`, `url`, `homepage`, `version`, `size`, `platform`, `screenshot`, `description`, `modifysubmitter`, `features`, `requirements`, `publisher`, `dhistory`, `summary`
- FROM " . $source['mod']);
- echo "Imported " . $xoopsDB->getAffectedRows() . " modification requests into " . $destination['mod'] . "<br />";
+ $sql = "INSERT INTO {$destination['mod']} (";
+ $sql.= " `lid`, `cid`, `title`, `url`, `homepage`, `version`, `size`, `platform`, `screenshot`, `description`, `modifysubmitter`, `features`, `requirements`, `publisher`, `dhistory`, `summary`)";
+ $sql.= " SELECT";
+ $sql.= " `lid`, `cid`, `title`, `url`, `homepage`, `version`, `size`, `platform`, `screenshot`, `description`, `modifysubmitter`, `features`, `requirements`, `publisher`, `dhistory`, `summary`";
+ $sql.= " FROM {$source['mod']}";
+ $xoopsDB->query($sql);
+ echo "Imported {$xoopsDB->getAffectedRows()} modification requests into {$destination['mod']}<br />";
- //Update category ID to new value
- $xoopsDB->query("UPDATE " . $destination['downloads'] . " d, " . $destination['cat'] . " c SET d.cid=c.cid WHERE d.old_cid=c.old_cid AND d.old_cid != 0");
- $xoopsDB->query("UPDATE " . $destination['cat'] . " c1, " . $destination['cat'] . " c2 SET c1.pid=c2.cid WHERE c1.old_pid=c2.old_cid AND c1.old_pid != 0");
+ // Update category ID to new value
+ $xoopsDB->query("UPDATE {$destination['downloads']} d, {$destination['cat']} c SET d.cid=c.cid WHERE d.old_cid=c.old_cid AND d.old_cid != 0");
+ $xoopsDB->query("UPDATE {$destination['cat']} c1, {$destination['cat']} c2 SET c1.pid=c2.cid WHERE c1.old_pid=c2.old_cid AND c1.old_pid != 0");
+ // Update lid values in mod table
if ($max_requestid) {
- $xoopsDB->query("UPDATE " . $destination['mod'] . " m, " . $destination['cat'] . " c SET m.cid=c.cid WHERE m.requestid > " . $max_requestid . " AND c.old_cid=m.cid");
- //Update lid values in mod table
- $xoopsDB->query("UPDATE " . $destination['mod'] . " m, " . $destination['downloads'] . " d SET m.lid=d.lid WHERE m.requestid > " . $max_requestid . " AND m.lid=d.old_lid");
+ $xoopsDB->query("UPDATE {$destination['mod']} m, {$destination['cat']} c SET m.cid=c.cid WHERE m.requestid > {$max_requestid} AND c.old_cid=m.cid");
+ $xoopsDB->query("UPDATE {$destination['mod']} m, {$destination['downloads']} d SET m.lid=d.lid WHERE m.requestid > {$max_requestid} AND m.lid=d.old_lid");
}
+ // Update lid values in mirrors table
+ if ($max_mirrorid) {
+ $xoopsDB->query("UPDATE {$destination['mirrors']} v, {$destination['downloads']} d SET v.lid=d.lid WHERE v.mirror_id > {$max_mirrorid} AND v.lid=d.old_lid");
+ }
+ // Update lid values in reviews table
+ if ($max_reviewid) {
+ $xoopsDB->query("UPDATE {$destination['reviews']} v, {$destination['downloads']} d SET v.lid=d.lid WHERE v.review_id > {$max_reviewid} AND v.lid=d.old_lid");
+ }
+ // Update lid values in votedata table
if ($max_ratingid) {
- //Update lid values in votedata table
- $xoopsDB->query("UPDATE " . $destination['votes'] . " v, " . $destination['downloads'] . " d SET v.lid=d.lid WHERE v.ratingid > " . $max_ratingid . " AND v.lid=d.old_lid");
+ $xoopsDB->query("UPDATE {$destination['votes']} v, {$destination['downloads']} d SET v.lid=d.lid WHERE v.ratingid > {$max_ratingid} AND v.lid=d.old_lid");
}
+ // Update lid values in broken table
if ($max_reportid) {
- //Update lid values in brokens table
- $xoopsDB->query("UPDATE " . $destination['broken'] . " b, " . $destination['downloads'] . " d SET b.lid=d.lid WHERE b.reportid > " . $max_reportid . " AND b.lid=d.old_lid");
+ $xoopsDB->query("UPDATE {$destination['broken']} b, {$destination['downloads']} d SET b.lid=d.lid WHERE b.reportid > {$max_reportid} AND b.lid=d.old_lid");
}
- //Update description
- //$xoopsDB->query("UPDATE " . $destination['downloads'] . " d, " . $source['text'] . " t SET d.description=t.description WHERE t.lid=d.old_lid");
//Remove temporary fields
$xoopsDB->query("ALTER TABLE ." . $destination['cat'] . " DROP `old_cid`");
|
|
From: <luc...@us...> - 2013-10-05 13:47:32
|
Revision: 12135
http://sourceforge.net/p/xoops/svn/12135
Author: luciorota
Date: 2013-10-05 13:47:28 +0000 (Sat, 05 Oct 2013)
Log Message:
-----------
removed unused function
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php 2013-10-05 12:52:14 UTC (rev 12134)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php 2013-10-05 13:47:28 UTC (rev 12135)
@@ -1,165 +1,164 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-/**
- * Wfdownloads module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package wfdownload
- * @since 3.23
- * @author Xoops Development Team
- * @version svn:$id$
- */
-$currentFile = basename(__FILE__);
-include_once dirname(__FILE__) . '/admin_header.php';
-
-if (@$_POST['op'] == 'submit') {
- if (!$GLOBALS['xoopsSecurity']->check()) {
- redirect_header($currentFile, 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
- exit();
- }
-
- $cloneDirname = $_POST['clonedirname'];
-
- // Check if name is valid
- if (empty($cloneDirname) || preg_match('/[^a-zA-Z0-9\_\-]/', $cloneDirname)) {
- redirect_header($currentFile, 3, sprintf(_AM_WFDOWNLOADS_CLONE_INVALIDNAME, $cloneDirname));
- exit();
- }
- // Check wether the cloned module exists or not
- if ($cloneDirname && is_dir(XOOPS_ROOT_PATH . '/modules/' . $cloneDirname)) {
- redirect_header($currentFile, 3, sprintf(_AM_WFDOWNLOADS_CLONE_EXISTS, $cloneDirname));
- }
-
- $patterns = array(
- strtolower(WFDOWNLOADS_DIRNAME) => strtolower($cloneDirname),
- strtoupper(WFDOWNLOADS_DIRNAME) => strtoupper($cloneDirname),
- ucfirst(strtolower(WFDOWNLOADS_DIRNAME)) => ucfirst(strtolower($cloneDirname))
- );
-
- $patKeys = array_keys($patterns);
- $patValues = array_values($patterns);
- wfdownloads_cloneFileDir(WFDOWNLOADS_ROOT_PATH);
- $logocreated = wfdownloads_createLogo(strtolower($cloneDirname));
-
- $message = "";
- if (is_dir(XOOPS_ROOT_PATH . '/modules/' . strtolower($cloneDirname))) {
- $message .= sprintf(_AM_WFDOWNLOADS_CLONE_CONGRAT, "<a href='" . XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=installlist'>" . ucfirst(strtolower($cloneDirname)) . "</a>") . "<br />\n";
- if (!$logocreated) {
- $message .= _AM_WFDOWNLOADS_CLONE_IMAGEFAIL;
- }
- } else {
- $message .= _AM_WFDOWNLOADS_CLONE_FAIL;
- }
-
- wfdownloads_xoops_cp_header();
- $indexAdmin = new ModuleAdmin();
- echo $indexAdmin->addNavigation($currentFile);
- echo $message;
- include 'admin_footer.php';
- exit();
-
-} else {
- wfdownloads_xoops_cp_header();
- $indexAdmin = new ModuleAdmin();
- echo $indexAdmin->addNavigation($currentFile);
- include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
- $form = new XoopsThemeForm(sprintf(_AM_WFDOWNLOADS_CLONE_TITLE, $wfdownloads->getModule()->getVar('name', 'E')), 'clone', $currentFile, 'post', true);
- $cloneDirname_text = new XoopsFormText(_AM_WFDOWNLOADS_CLONE_NAME, 'clonedirname', 20, 20, '');
- $cloneDirname_text->setDescription(_AM_WFDOWNLOADS_CLONE_NAME_DSC);
- $form->addElement($cloneDirname_text, true);
- $form->addElement(new XoopsFormHidden('op', 'submit'));
- $form->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit'));
- $form->display();
- include 'admin_footer.php';
- exit();
-}
-
-// recursive clonning script
-function wfdownloads_cloneFileDir($path)
-{
- global $patKeys;
- global $patValues;
-
- $newPath = str_replace($patKeys[0], $patValues[0], $path);
-
- if (is_dir($path)) {
- // create new dir
- mkdir($newPath);
- // check all files in dir, and process it
- if ($handle = opendir($path)) {
- while ($file = readdir($handle)) {
- if ($file != '.' && $file != '..' && $file != '.svn') {
- wfdownloads_cloneFileDir("{$path}/{$file}");
- }
- }
- closedir($handle);
- }
- } else {
- if (preg_match('/(.jpg|.gif|.png|.zip|.ttf)$/i', $path)) {
- // image
- copy($path, $newPath);
- } else {
- // file, read it
- $content = file_get_contents($path);
- $content = str_replace($patKeys, $patValues, $content);
- file_put_contents($newPath, $content);
- }
- }
-}
-
-function wfdownloads_createLogo($dirname)
-{
- $wfdownloads = WfdownloadsWfdownloads::getInstance();
- // Check extension/functions
- if (!extension_loaded("gd")) {
- return false;
- } else {
- $required_functions = array(
- "imagecreatetruecolor",
- "imagecolorallocate",
- "imagefilledrectangle",
- "imagejpeg",
- "imagedestroy",
- "imageftbbox"
- );
- foreach ($required_functions as $func) {
- if (!function_exists($func)) {
- return false;
- }
- }
- }
- // Check original image/font
- if (!file_exists($imageBase = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/images/module_logo.png")) {
- return false;
- }
- if (!file_exists($font = XOOPS_ROOT_PATH . "/modules/" . $wfdownloads->getModule()->dirname() . "/images/VeraBd.ttf")) {
- return false;
- }
- // Create image
- $imageModule = imagecreatefrompng($imageBase);
- // Erase old text
- $greyColor = imagecolorallocate($imageModule, 237, 237, 237);
- imagefilledrectangle($imageModule, 5, 35, 85, 46, $greyColor);
- // Write text
- $textColor = imagecolorallocate($imageModule, 0, 0, 0);
- $space_to_border = (80 - strlen($dirname) * 6.5) / 2;
- imagefttext($imageModule, 8.5, 0, $space_to_border, 45, $textColor, $font, ucfirst($dirname), array());
- // Set transparency color
- $whiteColor = imagecolorallocatealpha($imageModule, 255, 255, 255, 127);
- imagefill($imageModule, 0, 0, $whiteColor);
- imagecolortransparent($imageModule, $whiteColor);
- // Save new image
- imagepng($imageModule, XOOPS_ROOT_PATH . "/modules/" . $dirname . "/images/module_logo.png");
- imagedestroy($imageModule);
-
- return true;
-}
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * Wfdownloads module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package wfdownload
+ * @since 3.23
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+$currentFile = basename(__FILE__);
+include_once dirname(__FILE__) . '/admin_header.php';
+
+if (@$_POST['op'] == 'submit') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header($currentFile, 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit();
+ }
+
+ $cloneDirname = $_POST['clonedirname'];
+
+ // Check if name is valid
+ if (empty($cloneDirname) || preg_match('/[^a-zA-Z0-9\_\-]/', $cloneDirname)) {
+ redirect_header($currentFile, 3, sprintf(_AM_WFDOWNLOADS_CLONE_INVALIDNAME, $cloneDirname));
+ exit();
+ }
+ // Check wether the cloned module exists or not
+ if ($cloneDirname && is_dir(XOOPS_ROOT_PATH . '/modules/' . $cloneDirname)) {
+ redirect_header($currentFile, 3, sprintf(_AM_WFDOWNLOADS_CLONE_EXISTS, $cloneDirname));
+ }
+
+ $patterns = array(
+ strtolower(WFDOWNLOADS_DIRNAME) => strtolower($cloneDirname),
+ strtoupper(WFDOWNLOADS_DIRNAME) => strtoupper($cloneDirname),
+ ucfirst(strtolower(WFDOWNLOADS_DIRNAME)) => ucfirst(strtolower($cloneDirname))
+ );
+
+ $patKeys = array_keys($patterns);
+ $patValues = array_values($patterns);
+ wfdownloads_cloneFileDir(WFDOWNLOADS_ROOT_PATH);
+ $logocreated = wfdownloads_createLogo(strtolower($cloneDirname));
+
+ $message = "";
+ if (is_dir(XOOPS_ROOT_PATH . '/modules/' . strtolower($cloneDirname))) {
+ $message .= sprintf(_AM_WFDOWNLOADS_CLONE_CONGRAT, "<a href='" . XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=installlist'>" . ucfirst(strtolower($cloneDirname)) . "</a>") . "<br />\n";
+ if (!$logocreated) {
+ $message .= _AM_WFDOWNLOADS_CLONE_IMAGEFAIL;
+ }
+ } else {
+ $message .= _AM_WFDOWNLOADS_CLONE_FAIL;
+ }
+
+ wfdownloads_xoops_cp_header();
+ $indexAdmin = new ModuleAdmin();
+ echo $indexAdmin->addNavigation($currentFile);
+ echo $message;
+ include 'admin_footer.php';
+ exit();
+
+} else {
+ wfdownloads_xoops_cp_header();
+ $indexAdmin = new ModuleAdmin();
+ echo $indexAdmin->addNavigation($currentFile);
+ include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+ $form = new XoopsThemeForm(sprintf(_AM_WFDOWNLOADS_CLONE_TITLE, $wfdownloads->getModule()->getVar('name', 'E')), 'clone', $currentFile, 'post', true);
+ $cloneDirname_text = new XoopsFormText(_AM_WFDOWNLOADS_CLONE_NAME, 'clonedirname', 20, 20, '');
+ $cloneDirname_text->setDescription(_AM_WFDOWNLOADS_CLONE_NAME_DSC);
+ $form->addElement($cloneDirname_text, true);
+ $form->addElement(new XoopsFormHidden('op', 'submit'));
+ $form->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit'));
+ $form->display();
+ include 'admin_footer.php';
+ exit();
+}
+
+// recursive clonning script
+function wfdownloads_cloneFileDir($path)
+{
+ global $patKeys;
+ global $patValues;
+
+ $newPath = str_replace($patKeys[0], $patValues[0], $path);
+
+ if (is_dir($path)) {
+ // create new dir
+ mkdir($newPath);
+ // check all files in dir, and process it
+ if ($handle = opendir($path)) {
+ while ($file = readdir($handle)) {
+ if ($file != '.' && $file != '..' && $file != '.svn') {
+ wfdownloads_cloneFileDir("{$path}/{$file}");
+ }
+ }
+ closedir($handle);
+ }
+ } else {
+ if (preg_match('/(.jpg|.gif|.png|.zip|.ttf)$/i', $path)) {
+ // image
+ copy($path, $newPath);
+ } else {
+ // file, read it
+ $content = file_get_contents($path);
+ $content = str_replace($patKeys, $patValues, $content);
+ file_put_contents($newPath, $content);
+ }
+ }
+}
+
+function wfdownloads_createLogo($dirname)
+{
+ $wfdownloads = WfdownloadsWfdownloads::getInstance();
+ // Check extension/functions
+ if (!extension_loaded("gd")) {
+ return false;
+ } else {
+ $required_functions = array(
+ "imagecreatetruecolor",
+ "imagecolorallocate",
+ "imagefilledrectangle",
+ "imagejpeg",
+ "imagedestroy",
+ "imageftbbox"
+ );
+ foreach ($required_functions as $func) {
+ if (!function_exists($func)) {
+ return false;
+ }
+ }
+ }
+ // Check original image/font
+ if (!file_exists($imageBase = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/images/module_logo.png")) {
+ return false;
+ }
+ if (!file_exists($font = XOOPS_ROOT_PATH . "/modules/" . $wfdownloads->getModule()->dirname() . "/images/VeraBd.ttf")) {
+ return false;
+ }
+ // Create image
+ $imageModule = imagecreatefrompng($imageBase);
+ // Erase old text
+ $greyColor = imagecolorallocate($imageModule, 237, 237, 237);
+ imagefilledrectangle($imageModule, 5, 35, 85, 46, $greyColor);
+ // Write text
+ $textColor = imagecolorallocate($imageModule, 0, 0, 0);
+ $space_to_border = (80 - strlen($dirname) * 6.5) / 2;
+ imagefttext($imageModule, 8.5, 0, $space_to_border, 45, $textColor, $font, ucfirst($dirname), array());
+ // Set transparency color
+ $whiteColor = imagecolorallocatealpha($imageModule, 255, 255, 255, 127);
+ imagefill($imageModule, 0, 0, $whiteColor);
+ imagecolortransparent($imageModule, $whiteColor);
+ // Save new image
+ imagepng($imageModule, XOOPS_ROOT_PATH . "/modules/" . $dirname . "/images/module_logo.png");
+ imagedestroy($imageModule);
+ return true;
+}
|
|
From: <be...@us...> - 2013-10-05 12:52:17
|
Revision: 12134
http://sourceforge.net/p/xoops/svn/12134
Author: beckmi
Date: 2013-10-05 12:52:14 +0000 (Sat, 05 Oct 2013)
Log Message:
-----------
Adding missing translations, fixing missing index
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php 2013-10-05 12:19:51 UTC (rev 12133)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php 2013-10-05 12:52:14 UTC (rev 12134)
@@ -92,7 +92,7 @@
case "limitations" :
case "versiontypes" :
$tempArray = $wfdownloads->getConfig($key);
- $content = $tempArray[$download->getVar($key)];
+ $content = isset($tempArray[$download->getVar($key)]) ? $tempArray[$download->getVar($key)] : '';
break;
case "cid" :
$category_list = $wfdownloads->getHandler('category')->getObjects(new Criteria("cid", $download->getVar($key)));
@@ -139,7 +139,7 @@
$sform->display();
$modify_user = new XoopsUser($modification->getVar('modifysubmitter'));
- $modifyname = XoopsUserUtility::getUnameFromId((int)$modify_user->getVar('uid'));
+ $modifyname = XoopsUserUtility::getUnameFromId((int) $modify_user->getVar('uid'));
$modifyemail = $modify_user->getVar('email');
echo "<div><b>" . _AM_WFDOWNLOADS_MOD_MODIFYSUBMITTER . "</b> $modifyname</div>";
@@ -205,7 +205,7 @@
$button_tray = new XoopsFormElementTray('', '');
$button_tray->addElement(new XoopsFormHidden('requestid', $requestid));
- $button_tray->addElement(new XoopsFormHidden('lid', (int)$modification->getVar('lid')));
+ $button_tray->addElement(new XoopsFormHidden('lid', (int) $modification->getVar('lid')));
$hidden = new XoopsFormHidden('op', 'modification.change');
$button_tray->addElement($hidden);
if (!$modification->isNew()) {
@@ -275,7 +275,7 @@
case "reports.modifications.list" :
default:
$start_report = WfdownloadsRequest::getInt('start_report', 0);
-
+
$criteria = new CriteriaCompo();
$reports_count = $wfdownloads->getHandler('report')->getCount();
$criteria->setSort('date');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2013-10-05 12:19:51 UTC (rev 12133)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2013-10-05 12:52:14 UTC (rev 12134)
@@ -288,6 +288,9 @@
define("_AM_WFDOWNLOADS_MOD_VERSIONTYPES","Release status");
define("_AM_WFDOWNLOADS_MOD_DHISTORY","Download history");
define("_AM_WFDOWNLOADS_MOD_SCREENSHOT","Screenshot image");
+define("_AM_WFDOWNLOADS_MOD_SCREENSHOT2","Screenshot 2");
+define("_AM_WFDOWNLOADS_MOD_SCREENSHOT3","Screenshot 3");
+define("_AM_WFDOWNLOADS_MOD_SCREENSHOT4","Screenshot 4");
define("_AM_WFDOWNLOADS_MOD_HOMEPAGE","Home Page");
define("_AM_WFDOWNLOADS_MOD_HOMEPAGETITLE","Home page title");
define("_AM_WFDOWNLOADS_MOD_VERSION","Version");
@@ -665,3 +668,11 @@
// admin/categories.php
define("_AM_WFDOWNLOADS_FCATEGORY_ID","ID");
+
+//Editor:
+define("_AM_WFDOWNLOADS_MOD_DOHTML","'Allow HTML tags");
+define("_AM_WFDOWNLOADS_MOD_DOSMILEY","Allow XOOPS Smilies");
+define("_AM_WFDOWNLOADS_MOD_DOXCODE","Allow XOOPS BBcode");
+define("_AM_WFDOWNLOADS_MOD_DOIMAGE","Allow XOOPS Images");
+define("_AM_WFDOWNLOADS_MOD_DOBR","Convert line breaks");
+define("_AM_WFDOWNLOADS_MOD_FORMULIZE_IDREQ","Formulize Form ID");
|
|
From: <be...@us...> - 2013-10-05 12:19:57
|
Revision: 12133
http://sourceforge.net/p/xoops/svn/12133
Author: beckmi
Date: 2013-10-05 12:19:51 +0000 (Sat, 05 Oct 2013)
Log Message:
-----------
Code reformatting toward PSR-2
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php
XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/dbupdater.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/ip_log.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/mimetype.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/mirror.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/modification.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/object.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/rating.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/report.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/request.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/review.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/session.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/xoopstree.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/comment_functions.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/search.inc.php
XoopsModules/wfdownloads/trunk/wfdownloads/index.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/common.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/help.html
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/help2.html
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/help3.html
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/help4.html
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/help5.html
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/help6.html
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/help/index.html
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php
XoopsModules/wfdownloads/trunk/wfdownloads/module.css
XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_common_letterschoice.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_disclaimer.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_viewcat.html
XoopsModules/wfdownloads/trunk/wfdownloads/thickbox.css
XoopsModules/wfdownloads/trunk/wfdownloads/visit.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php 2013-10-04 21:19:57 UTC (rev 12132)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php 2013-10-05 12:19:51 UTC (rev 12133)
@@ -1,177 +1,165 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-/**
- * Wfdownloads module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package wfdownload
- * @since 3.23
- * @author Xoops Development Team
- * @version svn:$id$
- */
-$currentFile = basename(__FILE__);
-include_once dirname(__FILE__) . '/admin_header.php';
-
-if (@$_POST['op'] == 'submit') {
- if (!$GLOBALS['xoopsSecurity']->check()) {
- redirect_header($currentFile, 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
- exit();
- }
-
- $cloneDirname = $_POST['clonedirname'];
-
- // Check if name is valid
- if (empty($cloneDirname) || preg_match('/[^a-zA-Z0-9\_\-]/', $cloneDirname)) {
- redirect_header($currentFile, 3, sprintf(_AM_WFDOWNLOADS_CLONE_INVALIDNAME, $cloneDirname));
- exit();
- }
- // Check wether the cloned module exists or not
- if ($cloneDirname && is_dir(XOOPS_ROOT_PATH . '/modules/' . $cloneDirname)) {
- redirect_header($currentFile, 3, sprintf(_AM_WFDOWNLOADS_CLONE_EXISTS, $cloneDirname));
- }
-
- $patterns = array(
- strtolower(WFDOWNLOADS_DIRNAME) => strtolower($cloneDirname),
- strtoupper(WFDOWNLOADS_DIRNAME) => strtoupper($cloneDirname),
- ucfirst(strtolower(WFDOWNLOADS_DIRNAME)) => ucfirst(strtolower($cloneDirname))
- );
-
- $patKeys = array_keys($patterns);
- $patValues = array_values($patterns);
- wfdownloads_cloneFileDir(WFDOWNLOADS_ROOT_PATH);
- $logocreated = wfdownloads_createLogo(strtolower($cloneDirname));
-
- $message = "";
- if (is_dir(XOOPS_ROOT_PATH . '/modules/' . strtolower($cloneDirname))) {
- $message .= sprintf(_AM_WFDOWNLOADS_CLONE_CONGRAT, "<a href='" . XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=installlist'>" . ucfirst(strtolower($cloneDirname)) . "</a>") . "<br />\n";
- if (!$logocreated) {
- $message .= _AM_WFDOWNLOADS_CLONE_IMAGEFAIL;
- }
- } else {
- $message .= _AM_WFDOWNLOADS_CLONE_FAIL;
- }
-
- wfdownloads_xoops_cp_header();
- $indexAdmin = new ModuleAdmin();
- echo $indexAdmin->addNavigation($currentFile);
- echo $message;
- include 'admin_footer.php';
- exit();
-
-} else {
- wfdownloads_xoops_cp_header();
- $indexAdmin = new ModuleAdmin();
- echo $indexAdmin->addNavigation($currentFile);
- include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
- $form = new XoopsThemeForm(sprintf(_AM_WFDOWNLOADS_CLONE_TITLE, $wfdownloads->getModule()->getVar('name', 'E')), 'clone', $currentFile, 'post', true);
- $cloneDirname_text = new XoopsFormText(_AM_WFDOWNLOADS_CLONE_NAME, 'clonedirname', 20, 20, '');
- $cloneDirname_text->setDescription(_AM_WFDOWNLOADS_CLONE_NAME_DSC);
- $form->addElement($cloneDirname_text, true);
- $form->addElement(new XoopsFormHidden('op', 'submit'));
- $form->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit'));
- $form->display();
- include 'admin_footer.php';
- exit();
-}
-
-
-
-// work around for PHP < 5.0.x
-if (!function_exists('file_put_contents')) {
- function file_put_contents($filename, $data, $file_append = false)
- {
- if ($fp = fopen($filename, (!$file_append ? 'w+' : 'a+'))) {
- fputs($fp, $data);
- fclose($fp);
- }
- }
-}
-
-// recursive clonning script
-function wfdownloads_cloneFileDir($path)
-{
- global $patKeys;
- global $patValues;
-
- $newPath = str_replace($patKeys[0], $patValues[0], $path);
-
- if (is_dir($path)) {
- // create new dir
- mkdir($newPath);
- // check all files in dir, and process it
- if ($handle = opendir($path)) {
- while ($file = readdir($handle)) {
- if ($file != '.' && $file != '..' && $file != '.svn') {
- wfdownloads_cloneFileDir("{$path}/{$file}");
- }
- }
- closedir($handle);
- }
- } else {
- if (preg_match('/(.jpg|.gif|.png|.zip|.ttf)$/i', $path)) {
- // image
- copy($path, $newPath);
- } else {
- // file, read it
- $content = file_get_contents($path);
- $content = str_replace($patKeys, $patValues, $content);
- file_put_contents($newPath, $content);
- }
- }
-}
-
-function wfdownloads_createLogo($dirname)
-{
- $wfdownloads = WfdownloadsWfdownloads::getInstance();
- // Check extension/functions
- if (!extension_loaded("gd")) {
- return false;
- } else {
- $required_functions = array(
- "imagecreatetruecolor",
- "imagecolorallocate",
- "imagefilledrectangle",
- "imagejpeg",
- "imagedestroy",
- "imageftbbox"
- );
- foreach ($required_functions as $func) {
- if (!function_exists($func)) {
- return false;
- }
- }
- }
- // Check original image/font
- if (!file_exists($imageBase = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/images/module_logo.png")) {
- return false;
- }
- if (!file_exists($font = XOOPS_ROOT_PATH . "/modules/" . $wfdownloads->getModule()->dirname() . "/images/VeraBd.ttf")) {
- return false;
- }
- // Create image
- $imageModule = imagecreatefrompng($imageBase);
- // Erase old text
- $greyColor = imagecolorallocate($imageModule, 237, 237, 237);
- imagefilledrectangle($imageModule, 5, 35, 85, 46, $greyColor);
- // Write text
- $textColor = imagecolorallocate($imageModule, 0, 0, 0);
- $space_to_border = (80 - strlen($dirname) * 6.5) / 2;
- imagefttext($imageModule, 8.5, 0, $space_to_border, 45, $textColor, $font, ucfirst($dirname), array());
- // Set transparency color
- $whiteColor = imagecolorallocatealpha($imageModule, 255, 255, 255, 127);
- imagefill($imageModule, 0, 0, $whiteColor);
- imagecolortransparent($imageModule, $whiteColor);
- // Save new image
- imagepng($imageModule, XOOPS_ROOT_PATH . "/modules/" . $dirname . "/images/module_logo.png");
- imagedestroy($imageModule);
- return true;
-}
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * Wfdownloads module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package wfdownload
+ * @since 3.23
+ * @author Xoops Development Team
+ * @version svn:$id$
+ */
+$currentFile = basename(__FILE__);
+include_once dirname(__FILE__) . '/admin_header.php';
+
+if (@$_POST['op'] == 'submit') {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header($currentFile, 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit();
+ }
+
+ $cloneDirname = $_POST['clonedirname'];
+
+ // Check if name is valid
+ if (empty($cloneDirname) || preg_match('/[^a-zA-Z0-9\_\-]/', $cloneDirname)) {
+ redirect_header($currentFile, 3, sprintf(_AM_WFDOWNLOADS_CLONE_INVALIDNAME, $cloneDirname));
+ exit();
+ }
+ // Check wether the cloned module exists or not
+ if ($cloneDirname && is_dir(XOOPS_ROOT_PATH . '/modules/' . $cloneDirname)) {
+ redirect_header($currentFile, 3, sprintf(_AM_WFDOWNLOADS_CLONE_EXISTS, $cloneDirname));
+ }
+
+ $patterns = array(
+ strtolower(WFDOWNLOADS_DIRNAME) => strtolower($cloneDirname),
+ strtoupper(WFDOWNLOADS_DIRNAME) => strtoupper($cloneDirname),
+ ucfirst(strtolower(WFDOWNLOADS_DIRNAME)) => ucfirst(strtolower($cloneDirname))
+ );
+
+ $patKeys = array_keys($patterns);
+ $patValues = array_values($patterns);
+ wfdownloads_cloneFileDir(WFDOWNLOADS_ROOT_PATH);
+ $logocreated = wfdownloads_createLogo(strtolower($cloneDirname));
+
+ $message = "";
+ if (is_dir(XOOPS_ROOT_PATH . '/modules/' . strtolower($cloneDirname))) {
+ $message .= sprintf(_AM_WFDOWNLOADS_CLONE_CONGRAT, "<a href='" . XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=installlist'>" . ucfirst(strtolower($cloneDirname)) . "</a>") . "<br />\n";
+ if (!$logocreated) {
+ $message .= _AM_WFDOWNLOADS_CLONE_IMAGEFAIL;
+ }
+ } else {
+ $message .= _AM_WFDOWNLOADS_CLONE_FAIL;
+ }
+
+ wfdownloads_xoops_cp_header();
+ $indexAdmin = new ModuleAdmin();
+ echo $indexAdmin->addNavigation($currentFile);
+ echo $message;
+ include 'admin_footer.php';
+ exit();
+
+} else {
+ wfdownloads_xoops_cp_header();
+ $indexAdmin = new ModuleAdmin();
+ echo $indexAdmin->addNavigation($currentFile);
+ include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+ $form = new XoopsThemeForm(sprintf(_AM_WFDOWNLOADS_CLONE_TITLE, $wfdownloads->getModule()->getVar('name', 'E')), 'clone', $currentFile, 'post', true);
+ $cloneDirname_text = new XoopsFormText(_AM_WFDOWNLOADS_CLONE_NAME, 'clonedirname', 20, 20, '');
+ $cloneDirname_text->setDescription(_AM_WFDOWNLOADS_CLONE_NAME_DSC);
+ $form->addElement($cloneDirname_text, true);
+ $form->addElement(new XoopsFormHidden('op', 'submit'));
+ $form->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit'));
+ $form->display();
+ include 'admin_footer.php';
+ exit();
+}
+
+// recursive clonning script
+function wfdownloads_cloneFileDir($path)
+{
+ global $patKeys;
+ global $patValues;
+
+ $newPath = str_replace($patKeys[0], $patValues[0], $path);
+
+ if (is_dir($path)) {
+ // create new dir
+ mkdir($newPath);
+ // check all files in dir, and process it
+ if ($handle = opendir($path)) {
+ while ($file = readdir($handle)) {
+ if ($file != '.' && $file != '..' && $file != '.svn') {
+ wfdownloads_cloneFileDir("{$path}/{$file}");
+ }
+ }
+ closedir($handle);
+ }
+ } else {
+ if (preg_match('/(.jpg|.gif|.png|.zip|.ttf)$/i', $path)) {
+ // image
+ copy($path, $newPath);
+ } else {
+ // file, read it
+ $content = file_get_contents($path);
+ $content = str_replace($patKeys, $patValues, $content);
+ file_put_contents($newPath, $content);
+ }
+ }
+}
+
+function wfdownloads_createLogo($dirname)
+{
+ $wfdownloads = WfdownloadsWfdownloads::getInstance();
+ // Check extension/functions
+ if (!extension_loaded("gd")) {
+ return false;
+ } else {
+ $required_functions = array(
+ "imagecreatetruecolor",
+ "imagecolorallocate",
+ "imagefilledrectangle",
+ "imagejpeg",
+ "imagedestroy",
+ "imageftbbox"
+ );
+ foreach ($required_functions as $func) {
+ if (!function_exists($func)) {
+ return false;
+ }
+ }
+ }
+ // Check original image/font
+ if (!file_exists($imageBase = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/images/module_logo.png")) {
+ return false;
+ }
+ if (!file_exists($font = XOOPS_ROOT_PATH . "/modules/" . $wfdownloads->getModule()->dirname() . "/images/VeraBd.ttf")) {
+ return false;
+ }
+ // Create image
+ $imageModule = imagecreatefrompng($imageBase);
+ // Erase old text
+ $greyColor = imagecolorallocate($imageModule, 237, 237, 237);
+ imagefilledrectangle($imageModule, 5, 35, 85, 46, $greyColor);
+ // Write text
+ $textColor = imagecolorallocate($imageModule, 0, 0, 0);
+ $space_to_border = (80 - strlen($dirname) * 6.5) / 2;
+ imagefttext($imageModule, 8.5, 0, $space_to_border, 45, $textColor, $font, ucfirst($dirname), array());
+ // Set transparency color
+ $whiteColor = imagecolorallocatealpha($imageModule, 255, 255, 255, 127);
+ imagefill($imageModule, 0, 0, $whiteColor);
+ imagecolortransparent($imageModule, $whiteColor);
+ // Save new image
+ imagepng($imageModule, XOOPS_ROOT_PATH . "/modules/" . $dirname . "/images/module_logo.png");
+ imagedestroy($imageModule);
+
+ return true;
+}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php 2013-10-04 21:19:57 UTC (rev 12132)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php 2013-10-05 12:19:51 UTC (rev 12133)
@@ -60,7 +60,7 @@
case "report.add" :
default :
// Get report sender 'uid'
- $senderUid = is_object($xoopsUser) ? (int)$xoopsUser->getVar('uid') : 0;
+ $senderUid = is_object($xoopsUser) ? (int) $xoopsUser->getVar('uid') : 0;
$senderIp = getenv('REMOTE_ADDR');
if (!empty($_POST['submit'])) {
@@ -155,7 +155,7 @@
$broken['title'] = trim($download->getVar('title'));
$broken['id'] = $report->getVar('reportid');
- $broken['reporter'] = XoopsUserUtility::getUnameFromId((int)$report->getVar('sender'));
+ $broken['reporter'] = XoopsUserUtility::getUnameFromId((int) $report->getVar('sender'));
$broken['date'] = formatTimestamp($report->getVar('published'), $wfdownloads->getConfig('dateformat'));
$broken['acknowledged'] = ($report->getVar('acknowledged') == 1) ? _YES : _NO ;
$broken['confirmed'] = ($report->getVar('confirmed') == 1) ? _YES : _NO ;
@@ -170,7 +170,7 @@
$time = ($download->getVar('updated') != false) ? $download->getVar('updated') : $download->getVar('published');
$down['updated'] = formatTimestamp($time, $wfdownloads->getConfig('dateformat'));
$is_updated = ($download->getVar('updated') != false) ? _MD_WFDOWNLOADS_UPDATEDON : _MD_WFDOWNLOADS_SUBMITDATE;
- $down['publisher'] = XoopsUserUtility::getUnameFromId((int)$download->getVar('submitter'));
+ $down['publisher'] = XoopsUserUtility::getUnameFromId((int) $download->getVar('submitter'));
$xoopsTpl->assign('brokenreportexists', false);
$xoopsTpl->assign('file_id', $lid);
@@ -182,4 +182,4 @@
include 'footer.php';
}
break;
-}
\ No newline at end of file
+}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php 2013-10-04 21:19:57 UTC (rev 12132)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php 2013-10-05 12:19:51 UTC (rev 12133)
@@ -20,7 +20,8 @@
*/
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
include_once dirname(dirname(__FILE__)) . '/include/common.php';
-class WfdownloadsCategory extends XoopsObject {
+class WfdownloadsCategory extends XoopsObject
+{
/**
* @var WfdownloadsWfdownloads
* @access public
@@ -63,6 +64,7 @@
public function __call($method, $args)
{
$arg = isset($args[0]) ? $args[0] : null;
+
return $this->getVar($method, $arg);
}
@@ -116,7 +118,7 @@
$description_textarea = new XoopsFormDhtmlTextArea(_AM_WFDOWNLOADS_FCATEGORY_DESCRIPTION, 'description', $this->getVar('description', 'e'), 15, 60);
$form->addElement($description_textarea, true);
-
+
$summary_textarea = new XoopsFormTextArea(_AM_WFDOWNLOADS_FCATEGORY_SUMMARY, 'summary', $this->getVar('summary'), 10, 60);
$form->addElement($summary_textarea);
@@ -140,7 +142,7 @@
// Added Formulize module support (2006/05/04) jpc - start
if (wfdownloads_checkModule('formulize')) {
- if(file_exists(XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php")) {
+ if (file_exists(XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php")) {
include_once XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php";
$fids = allowedForms();
$fids_select = array();
@@ -176,20 +178,22 @@
$button_cancel->setExtra('onclick="history.go(-1)"');
$button_tray->addElement($button_cancel);
$form->addElement($button_tray);
+
return $form;
}
}
-class WfdownloadsCategoryHandler extends XoopsPersistableObjectHandler {
+class WfdownloadsCategoryHandler extends XoopsPersistableObjectHandler
+{
/**
* @var WfdownloadsWfdownloads
* @access public
*/
public $wfdownloads = null;
-
+
var $allCategories = false;
var $topCategories = false;
-
+
/**
* @param null|object $db
*/
@@ -199,7 +203,8 @@
$this->wfdownloads = WfdownloadsWfdownloads::getInstance();
}
- function getNicePath($cid, $root_filename = "index.php", $item_filename = "viewcat.php?op=") {
+ function getNicePath($cid, $root_filename = "index.php", $item_filename = "viewcat.php?op=")
+ {
include_once WFDOWNLOADS_ROOT_PATH . '/class/xoopstree.php';
$mytree = new WfdownloadsXoopsTree($this->table, $this->keyName, 'pid');
$pathstring = $mytree->getNicePathFromId($cid, $this->identifierName, $item_filename);
@@ -210,74 +215,82 @@
$pathstring = trim($pathstring);
$pathstring = str_replace(':', '>', $pathstring);
// $pathstring = substr($pathstring, 0, strlen($pathstring) - 13); // not needed now with fixed icms core! but required for XOOPS
-
return $pathstring;
}
/**
* Get categories that the current user has permissions for
*
- * @param bool $id_as_key
- * @param bool $as_object
+ * @param bool $id_as_key
+ * @param bool $as_object
* @return array
*/
- function getUserCategories($id_as_key = false, $as_object = true) {
+ function getUserCategories($id_as_key = false, $as_object = true)
+ {
global $xoopsUser;
$gperm_handler = xoops_gethandler('groupperm');
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
$allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $this->wfdownloads->getModule()->mid());
+
return $this->getObjects(new Criteria('cid', '(' . implode(',', $allowedDownCategoriesIds) . ')', 'IN'), $id_as_key, $as_object);
}
/**
* Get categories that the current user has permissions for
*
- * @param bool $id_as_key
- * @param bool $as_object
+ * @param bool $id_as_key
+ * @param bool $as_object
* @return array
*/
- function getUserDownCategories($id_as_key = false, $as_object = true) {
+ function getUserDownCategories($id_as_key = false, $as_object = true)
+ {
global $xoopsUser;
$gperm_handler = xoops_gethandler('groupperm');
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
$allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $this->wfdownloads->getModule()->mid());
+
return $this->getObjects(new Criteria('cid', '(' . implode(',', $allowedDownCategoriesIds) . ')', 'IN'), $id_as_key, $as_object);
}
- function getUserUpCategories($id_as_key = false, $as_object = true) {
+ function getUserUpCategories($id_as_key = false, $as_object = true)
+ {
global $xoopsUser;
$gperm_handler = xoops_gethandler('groupperm');
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
$allowedUpCategoriesIds = $gperm_handler->getItemIds('WFUpCatPerm', $groups, $this->wfdownloads->getModule()->mid());
+
return $this->getObjects(new Criteria('cid', '(' . implode(',', $allowedUpCategoriesIds) . ')', 'IN'), $id_as_key, $as_object);
}
- function getChildCats($category) {
+ function getChildCats($category)
+ {
$allcats = $this->getObjects();
include_once XOOPS_ROOT_PATH . '/class/tree.php';
$tree = new XoopsObjectTree($allcats, $this->keyName, 'pid');
+
return $tree->getAllChild($category->getVar($this->keyName));
}
- function getAllSubcatsTopParentCid() {
+ function getAllSubcatsTopParentCid()
+ {
if (!$this->allCategories) {
$this->allCategories = $this->getObjects(null, true);
}
-
+
include_once XOOPS_ROOT_PATH . '/class/tree.php';
$tree = new XoopsObjectTree($this->allCategories, $this->keyName, 'pid');
$treeobj = $tree->getTree();
-
+
/**
* Let's create an array where key will be cid of the top categories and
* value will be an array containing all the cid of its subcategories
* If value = 0, then this topcat does not have any subcats
*/
$topcatsarray = array();
- foreach($treeobj[0]['child'] as $topcid) {
+ foreach ($treeobj[0]['child'] as $topcid) {
if (!isset($this->topCategories[$topcid])) {
$this->topCategories[$topcid] = $topcid;
}
@@ -288,13 +301,13 @@
$topcatsarray[$topcid] = $childrenids;
unset($childrenids);
}
-
+
/**
* Now we need to create another array where key will be all subcategories cid and
* value will be the cid of its top most category
*/
$allsubcats_linked_totop = array();
-
+
foreach ($topcatsarray as $topcatcid=>$subcatsarray) {
if ($subcatsarray == 0) {
$allsubcats_linked_totop[$topcatcid] = $topcatcid;
@@ -304,15 +317,15 @@
}
}
}
-
+
/**
- * Finally, let's finish by adding to this array, all the top categories which values
+ * Finally, let's finish by adding to this array, all the top categories which values
* will be their cid
*/
- foreach($this->topCategories as $topcid) {
+ foreach ($this->topCategories as $topcid) {
$allsubcats_linked_totop[$topcid] = $topcid;
}
-
+
return $allsubcats_linked_totop;
}
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/dbupdater.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/dbupdater.php 2013-10-04 21:19:57 UTC (rev 12132)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/dbupdater.php 2013-10-05 12:19:51 UTC (rev 12133)
@@ -42,8 +42,8 @@
die("XOOPS root path not defined");
}
-class WfdownloadsTable {
-
+class WfdownloadsTable
+{
/**
* @var string $_name name of the table
*/
@@ -110,6 +110,7 @@
function name()
{
global $xoopsDB;
+
return $xoopsDB->prefix($this->_name);
}
@@ -350,9 +351,11 @@
$ret = $xoopsDB->query($query);
if (! $ret) {
echo "<li class='err'>" . sprintf(_AM_WFDOWNLOADS_DB_MSG_DROP_TABLE_ERR, $this->name()) . "</li>";
+
return false;
} else {
echo "<li class='ok'>" . sprintf(_AM_WFDOWNLOADS_DB_MSG_DROP_TABLE, $this->name()) . "</li>";
+
return true;
}
}
@@ -479,6 +482,7 @@
echo "<li class='ok'>" . sprintf(_AM_WFDOWNLOADS_DB_MSG_DROPFIELD, $dropedField, $this->name()) . "</li>";
}
}
+
return $ret;
}
}
@@ -493,8 +497,8 @@
* @link http://www.smartfactory.ca The SmartFactory
*/
-class WfdownloadsDbupdater {
-
+class WfdownloadsDbupdater
+{
function WfdownloadsDbupdater()
{
@@ -516,9 +520,11 @@
$ret = $xoopsDB->query($query);
if (! $ret) {
echo "<li class='err'>$badmsg</li>";
+
return false;
} else {
echo "<li class='ok'>$goodmsg</li>";
+
return true;
}
}
@@ -542,9 +548,11 @@
$ret = $xoopsDB->query($query);
if (! $ret) {
echo "<li class='err'>" . sprintf(_AM_WFDOWNLOADS_DB_MSG_RENAME_TABLE_ERR, $from) . "</li>";
+
return false;
} else {
echo "<li class='ok'>" . sprintf(_AM_WFDOWNLOADS_DB_MSG_RENAME_TABLE, $from, $to) . "</li>";
+
return true;
}
}
@@ -595,7 +603,6 @@
$ret = $table->updateFieldsValues($table) && $ret;
}
-
// If table has droped field, alter the table
if ($table->getDropedFields()) {
$ret = $table->dropFields($table) && $ret;
@@ -608,7 +615,6 @@
echo "</ul>";
-
return $ret;
}
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-10-04 21:19:57 UTC (rev 12132)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-10-05 12:19:51 UTC (rev 12133)
@@ -20,7 +20,8 @@
*/
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
include_once dirname(dirname(__FILE__)) . '/include/common.php';
-class WfdownloadsDownload extends XoopsObject {
+class WfdownloadsDownload extends XoopsObject
+{
/**
* @var WfdownloadsWfdownloads
* @access public
@@ -109,6 +110,7 @@
public function __call($method, $args)
{
$arg = isset($args[0]) ? $args[0] : null;
+
return $this->getVar($method, $arg);
}
@@ -120,11 +122,12 @@
if (!isset($this->_category)) {
$this->_category = $this->wfdownloads->getHandler('category')->get($this->getVar('cid'));
}
+
return $this->_category;
}
-
- function getDownloadInfo() {
+ function getDownloadInfo()
+ {
global $xoopsConfig, $xoopsUser, $myts, $xoopsDB;
xoops_load('XoopsUserUtility');
@@ -238,10 +241,10 @@
$summary = $this->getVar('summary');
if (
- ($this->wfdownloads->getConfig('autosummary') == _WFDOWNLOADS_AUTOSUMMARY_YES) ||
+ ($this->wfdownloads->getConfig('autosummary') == _WFDOWNLOADS_AUTOSUMMARY_YES) ||
($this->wfdownloads->getConfig('autosummary') == _WFDOWNLOADS_AUTOSUMMARY_IFBLANK && empty($summary))) {
// generate autosummary
- $maxSummaryLength = (int)$this->wfdownloads->getConfig('autosumlength');
+ $maxSummaryLength = (int) $this->wfdownloads->getConfig('autosumlength');
if (wfdownloads_checkModule('xlanguage')) {
global $xlanguage;
@@ -308,7 +311,7 @@
$download['is_updated'] = ($this->getVar('updated') > 0) ? _MD_WFDOWNLOADS_UPDATEDON : _MD_WFDOWNLOADS_SUBMITDATE;
if (is_object($xoopsUser) && $download['isadmin'] != true) {
- $download['useradminlink'] = ((int)($xoopsUser->getvar('uid')) == $this->getVar('submitter')) ? true : false;
+ $download['useradminlink'] = ((int) ($xoopsUser->getvar('uid')) == $this->getVar('submitter')) ? true : false;
}
$sql2 = "SELECT rated FROM " . $xoopsDB->prefix('wfdownloads_reviews') . " WHERE lid = '" . intval($download['id']) . "' AND submit = '1'";
@@ -332,13 +335,13 @@
$numrows2 = $xoopsDB->getRowsNum($results3);
$download['mirrors_num'] = ($numrows2) ? $numrows2 : 0;
+
return $download;
}
-
-
- function getForm($customArray = array()) { // $custom array added April 22, 2006 by jwe) {
+ function getForm($customArray = array()) { // $custom array added April 22, 2006 by jwe)
+ {
global $xoopsUser;
include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
@@ -375,7 +378,7 @@
}
// changed - start - March 4 2006 - jpc
- if(wfdownloads_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
$sform->addElement(new XoopsFormHidden('cid', $this->getVar('cid', 'e')));
} else {
$categories = $this->wfdownloads->getHandler('category')->getUserUpCategories();
@@ -385,7 +388,7 @@
// changed - end - March 4 2006 - jpc
// Changed - start - April 22, 2006 - jwe
- if(count($customArray) == 0) {
+ if (count($customArray) == 0) {
$sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_HOMEPAGETITLEC, 'homepagetitle', 50, 255, $this->getVar('homepagetitle', 'e')), false);
$sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_HOMEPAGEC, 'homepage', 50, 255, $this->getVar('homepage', 'e')), false);
$sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_VERSIONC, 'version', 10, 20, $this->getVar('version', 'e')), false);
@@ -493,7 +496,7 @@
$button_submit->setExtra('onclick="this.form.elements.op.value=\'download.save\'"');
$button_tray->addElement($button_submit);
} else {
- $button_tray->addElement(new XoopsFormHidden('lid', (int)$this->getVar('lid')));
+ $button_tray->addElement(new XoopsFormHidden('lid', (int) $this->getVar('lid')));
$button_tray->addElement(new XoopsFormHidden('op', 'download.save'));
$button_submit = new XoopsFormButton('', '', _SUBMIT, 'submit');
$button_submit->setExtra('onclick="this.form.elements.op.value=\'download.save\'"');
@@ -506,7 +509,6 @@
$button_tray->addElement($button_cancel);
$sform->addElement($button_tray);
-
return $sform;
}
@@ -523,9 +525,9 @@
$sform = new XoopsThemeForm($title, "storyform", $_SERVER['REQUEST_URI']);
$sform->setExtra('enctype="multipart/form-data"');
if (!$this->isNew()) {
- $sform -> addElement(new XoopsFormLabel(_AM_WFDOWNLOADS_FILE_ID, (int)$this->getVar('lid')));
+ $sform -> addElement(new XoopsFormLabel(_AM_WFDOWNLOADS_FILE_ID, (int) $this->getVar('lid')));
}
- if ($this->getVar('ipaddress') != "") {
+ if ($this->getVar('ipaddress') != "") {
$sform->addElement(new XoopsFormLabel(_AM_WFDOWNLOADS_FILE_IP, $this->getVar('ipaddress')));
}
@@ -568,7 +570,7 @@
$sform->addElement($userfile_file, false);
// changed - start - March 4 2006 - jpc
-// if(file_exists(XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php")) {
+// if (file_exists(XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php")) {
// $sform->addElement(new XoopsFormHidden('cid', $this->getVar('cid', 'e')));
// } else {
$categories = $this->wfdownloads->getHandler('category')->getObjects();
@@ -796,7 +798,7 @@
$button_tray->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit'));
} else {
$button_tray->addElement(new XoopsFormHidden('status', 2));
- $button_tray->addElement(new XoopsFormHidden('lid', (int)$this->getVar('lid')));
+ $button_tray->addElement(new XoopsFormHidden('lid', (int) $this->getVar('lid')));
$button_submit = new XoopsFormButton('', '', _SUBMIT, 'submit');
$button_submit->setExtra('onclick="this.form.elements.op.value=\'download.save\'"');
$button_tray->addElement($button_submit);
@@ -811,13 +813,13 @@
$button_tray->addElement($button_cancel);
$sform->addElement($button_tray);
+
return $sform;
}
-
-
// Added Formulize module support (2006/05/04) jpc - start
- function getCategoryForm() {
+ function getCategoryForm()
+ {
include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
include_once(XOOPS_ROOT_PATH . '/class/tree.php');
$sform = new XoopsThemeForm(_MD_WFDOWNLOADS_FFS_SUBMITCATEGORYHEAD, 'storyform', $_SERVER['REQUEST_URI']);
@@ -833,30 +835,31 @@
$button_tray->addElement(new XoopsFormHidden('lid', $this->getVar('lid', 'e')));
}
$sform->addElement($button_tray);
+
return $sform;
}
// Added Formulize module support (2006/05/04) jpc - end
-
-
/**
* Returns an array representation of the object
*
* @return array
*/
- function toArray() {
+ function toArray()
+ {
$ret = array();
$vars = $this->getVars();
foreach (array_keys($vars) as $i) {
$ret[$i] = $this->getVar($i);
}
+
return $ret;
}
}
+}
-
-
-class WfdownloadsDownloadHandler extends XoopsPersistableObjectHandler {
+class WfdownloadsDownloadHandler extends XoopsPersistableObjectHandler
+{
/**
* @var WfdownloadsWfdownloads
* @access public
@@ -875,10 +878,11 @@
/**
* Get maximum published date from a criteria
*
- * @param CriteriaElement $criteria
+ * @param CriteriaElement $criteria
* @return mixed
*/
- function getMaxPublishdate($criteria = null) {
+ function getMaxPublishdate($criteria = null)
+ {
if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
if ($criteria->groupby != "") {
$groupby = true;
@@ -898,13 +902,14 @@
}
if ($groupby == false) {
list($count) = $this->db->fetchRow($result);
+
return $count;
- }
- else {
+ } else {
$ret = array();
while (list($id, $count) = $this->db->fetchRow($result)) {
$ret[$id] = $count;
}
+
return $ret;
}
}
@@ -914,7 +919,8 @@
*
* @return CriteriaElement
*/
- function getActiveCriteria() {
+ function getActiveCriteria()
+ {
global $xoopsUser;
$gperm_handler = xoops_gethandler('groupperm');
@@ -928,16 +934,18 @@
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
$allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $this->wfdownloads->getModule()->mid());
$criteria->add(new Criteria('cid', '(' . implode(',', $allowedDownCategoriesIds) . ')', 'IN'));
+
return $criteria;
}
/**
* Get array of active downloads with optional additional criteria
*
- * @param CriteriaCompo $crit Additional criteria
+ * @param CriteriaCompo $crit Additional criteria
* @return array
*/
- function getActiveDownloads($crit = null) {
+ function getActiveDownloads($crit = null)
+ {
if (is_object($crit)) {
$criteria = $crit;
} else {
@@ -945,47 +953,53 @@
}
$active_crit = $this->getActiveCriteria();
$criteria->add($active_crit);
+
return $this->getObjects($criteria);
}
/**
* Get count of active downloads
*
- * @param CriteriaElement $crit Additional criteria
+ * @param CriteriaElement $crit Additional criteria
* @return array/int
*/
- function getActiveCount($crit = null) {
+ function getActiveCount($crit = null)
+ {
$criteria = $this->getActiveCriteria();
if (is_object($crit)) {
$criteria->add($crit);
}
+
return $this->getCount($criteria);
}
/**
* Increment hit counter for a download
*
- * @param int $lid
+ * @param int $lid
* @return bool
*/
- function incrementHits($lid) {
- $sql = "UPDATE " . $this->table . " SET hits=hits+1 WHERE lid='" . (int)$lid . "'";
+ function incrementHits($lid)
+ {
+ $sql = "UPDATE " . $this->table . " SET hits=hits+1 WHERE lid='" . (int) $lid . "'";
+
return $this->db->queryF($sql);
}
- function delete($download, $force = false) {
+ function delete($download, $force = false)
+ {
if (parent::delete($download, $force)) {
- $criteria = new Criteria('lid', (int)$download->getVar('lid'));
+ $criteria = new Criteria('lid', (int) $download->getVar('lid'));
$this->wfdownloads->getHandler('rating')->deleteAll($criteria);
$this->wfdownloads->getHandler('mirror')->deleteAll($criteria);
$this->wfdownloads->getHandler('review')->deleteAll($criteria);
$this->wfdownloads->getHandler('report')->deleteAll($criteria);
// delete comments
- xoops_comment_delete((int)$this->wfdownloads->getModule()->mid(), (int)$download->getVar('lid'));
+ xoops_comment_delete((int) $this->wfdownloads->getModule()->mid(), (int) $download->getVar('lid'));
// Added Formulize module support (2006/05/04) jpc - start
if (wfdownloads_checkModule('formulize')) {
- if(file_exists(XOOPS_ROOT_PATH . '/modules/formulize/include/functions.php') AND $download->getVar('formulize_idreq') > 0) {
+ if (file_exists(XOOPS_ROOT_PATH . '/modules/formulize/include/functions.php') AND $download->getVar('formulize_idreq') > 0) {
include_once XOOPS_ROOT_PATH . '/modules/formulize/include/functions.php';
//deleteFormEntries(array($download->getVar('formulize_idreq')));
$category = $this->wfdownloads->getHandler('category')->get($download->getVar('cid'));
@@ -995,6 +1009,7 @@
// Added Formulize module support (2006/05/04) jpc - end
return true;
}
+
return false;
}
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/ip_log.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/ip_log.php 2013-10-04 21:19:57 UTC (rev 12132)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/ip_log.php 2013-10-05 12:19:51 UTC (rev 12133)
@@ -20,7 +20,8 @@
*/
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
include_once dirname(dirname(__FILE__)) . '/include/common.php';
-class WfdownloadsIP_Log extends XoopsObject {
+class WfdownloadsIP_Log extends XoopsObject
+{
/**
* @var WfdownloadsWfdownloads
* @access public
@@ -49,7 +50,8 @@
}
}
-class WfdownloadsIP_LogHandler extends XoopsPersistableObjectHandler {
+class WfdownloadsIP_LogHandler extends XoopsPersistableObjectHandler
+{
/**
* @var WfdownloadsWfdownloads
* @access public
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/mimetype.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/mimetype.php 2013-10-04 21:19:57 UTC (rev 12132)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/mimetype.php 2013-10-05 12:19:51 UTC (rev 12133)
@@ -31,7 +31,8 @@
*/
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
include_once dirname(dirname(__FILE__)) . '/include/common.php';
-class WfdownloadsMimetype extends XoopsObject {
+class WfdownloadsMimetype extends XoopsObject
+{
/**
* @var WfdownloadsWfdownloads
* @access public
@@ -59,7 +60,7 @@
}
}
}
-
+
function getForm($action = false)
{
include_once(XOOPS_ROOT_PATH . '/class/xoopsformloader.php');
@@ -89,9 +90,9 @@
$muser_radio = new XoopsFormRadioYN(_AM_WFDOWNLOADS_MIME_USERF, 'mime_user', $this->getVar('mime_user', 'e'));
$form->addElement($muser_radio);
-
+
$form->addElement(new XoopsFormHidden('op', 'save'));
-
+
$button_tray = new XoopsFormElementTray('', '');
if ($this->isNew()) {
$butt_create = new XoopsFormButton('', '', _AM_WFDOWNLOADS_MIME_CREATE, 'submit');
@@ -112,17 +113,19 @@
$button_tray->addElement($butt_cancel);
}
$form->addElement($button_tray);
+
return $form;
}
}
-class WfdownloadsMimetypeHandler extends XoopsPersistableObjectHandler {
+class WfdownloadsMimetypeHandler extends XoopsPersistableObjectHandler
+{
/**
* @var WfdownloadsWfdownloads
* @access public
*/
public $wfdownloads = null;
-
+
/**
* @param null|object $db
*/
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/mirror.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/mirror.php 2013-10-04 21:19:57 UTC (rev 12132)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/mirror.php 2013-10-05 12:19:51 UTC (rev 12133)
@@ -20,7 +20,8 @@
*/
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
include_once dirname(dirname(__FILE__)) . '/include/common.php';
-class WfdownloadsMirror extends XoopsObject {
+class WfdownloadsMirror extends XoopsObject
+{
/**
* @var WfdownloadsWfdownloads
* @access public
@@ -44,7 +45,7 @@
$this->initVar('submit', XOBJ_DTYPE_INT); // boolean
$this->initVar('date', XOBJ_DTYPE_INT);
$this->initVar('uid', XOBJ_DTYPE_INT);
-
+
if (isset($id)) {
$item = $this->wfdownloads->getHandler('item')->get($id);
foreach ($item->vars as $k => $v) {
@@ -53,9 +54,10 @@
}
}
- function getForm() {
+ function getForm()
+ {
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
- $uid = !empty($xoopsUser) ? (int)($xoopsUser->getVar('uid')) : 0;
+ $uid = !empty($xoopsUser) ? (int) ($xoopsUser->getVar('uid')) : 0;
$sform = new XoopsThemeForm(_AM_WFDOWNLOADS_MIRROR_SNEWMNAMEDESC, 'mirrorform', $_SERVER['REQUEST_URI']);
$sform -> addElement(new XoopsFormText(_AM_WFDOWNLOADS_MIRROR_FHOMEURLTITLE, 'title', 50, 255, $this->getVar('title', 'e')), true);
@@ -79,8 +81,8 @@
$approve_checkbox -> addOption(1, " ");
$sform -> addElement($approve_checkbox);
- $sform -> addElement(new XoopsFormHidden('lid', (int)($this->getVar('lid'))));
- $sform -> addElement(new XoopsFormHidden('mirror_id', (int)($this->getVar('mirror_id'))));
+ $sform -> addElement(new XoopsFormHidden('lid', (int) ($this->getVar('lid'))));
+ $sform -> addElement(new XoopsFormHidden('mirror_id', (int) ($this->getVar('mirror_id'))));
$sform -> addElement(new XoopsFormHidden('uid', $uid));
$sform -> addElement(new XoopsFormHidden('confirm', 1));
$button_tray = new XoopsFormElementTray('', '');
@@ -108,6 +110,7 @@
$button_tray -> addElement($cancel_button);
}
$sform -> addElement($button_tray);
+
return $sform;
}
/**
@@ -115,17 +118,20 @@
*
* @return array
*/
- function toArray() {
+ function toArray()
+ {
$ret = array();
$vars = $this->getVars();
foreach (array_keys($vars) as $i) {
$ret[$i] = $this->getVar($i);
}
+
return $ret;
}
}
-class WfdownloadsMirrorHandler extends XoopsPersistableObjectHandler {
+class WfdownloadsMirrorHandler extends XoopsPersistableObjectHandler
+{
/**
* @var WfdownloadsWfdownloads
* @access public
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/modification.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/modification.php 2013-10-04 21:19:57 UTC (rev 12132)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/modification.php 2013-10-05 12:19:51 UTC (rev 12133)
@@ -22,8 +22,8 @@
include_once dirname(dirname(__FILE__)) . '/include/common.php';
require_once XOOPS_ROOT_PATH . '/modules/wfdownloads/class/download.php';
-class WfdownloadsModification extends WfdownloadsDownload {
-
+class WfdownloadsModification extends WfdownloadsDownload
+{
/**
* @param int|null $id
*/
@@ -37,7 +37,7 @@
//Obsolete
unset($this->vars['ipaddress']);
unset($this->vars['notifypub']);
-
+
if (isset($id)) {
$item = $this->wfdownloads->getHandler('item')->get($id);
foreach ($item->vars as $k => $v) {
@@ -47,7 +47,8 @@
}
}
-class WfdownloadsModificationHandler extends XoopsPersistableObjectHandler {
+class WfdownloadsModificationHandler extends XoopsPersistableObjectHandler
+{
/**
* @var WfdownloadsWfdownloads
* @access public
@@ -63,17 +64,19 @@
$this->wfdownloads = WfdownloadsWfdownloads::getInstance();
}
- function approveModification($requestid) {
+ function approveModification($requestid)
+ {
$sql = "UPDATE " . $this->table . " m, ". $wfdownloads->getHandler('download')->table . " d";
$sql.= " SET d.cid = 'm.cid', d.title = 'm.title',
d.url = 'm.url', d.filename = 'm.filename', d.filetype = 'm.filetype', d.mirror = 'm.mirror', d.license = 'm.license', d.features = 'm.features', d.homepage = 'm.homepage', d.version = 'm.version', d.size = 'm.size', d.platform = 'm.platform',
d.screenshot = 'm.screenshot', d.screenshot2 = 'm.screenshot2', d.screenshot3 = 'm.screenshot3', d.screenshot4 = 'm.screenshot4', d.publisher = 'm.publisher', d.status = '2', d.price = 'm.price', d.requirements = 'm.requirements',
d.homepagetitle = 'm.homepagetitle', d.limitations = 'm.limitations', d.versiontypes = 'm.versiontypes', d.dhistory = 'm.dhistory', d.updated = 'm.updated',
d.summary = 'm.summary', d.description = 'm.description'";
- $sql = " WHERE d.lid = 'm.lid' AND m.requestid='" . (int)$requestid . "'";
+ $sql = " WHERE d.lid = 'm.lid' AND m.requestid='" . (int) $requestid . "'";
if ($this->db->query($sql)) {
- return $this->deleteAll(new Criteria('requestid', (int)$requestid));
+ return $this->deleteAll(new Criteria('requestid', (int) $requestid));
}
+
return false;
}
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/object.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/object.php 2013-10-04 21:19:57 UTC (rev 12132)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/object.php 2013-10-05 12:19:51 UTC (rev 12133)
@@ -28,8 +28,8 @@
* @package Kernel
*/
-class XoopsPersistableObjectHandler extends XoopsObjectHandler {
-
+class XoopsPersistableObjectHandler extends XoopsObjectHandler
+{
/**#@+
* Information about the class, the handler is managing
*
@@ -50,7 +50,8 @@
*
* @return void
*/
- function XoopsPersistableObjectHandler(&$db, $tablename, $classname, $keyname, $idenfierName = false) {
+ function XoopsPersistableObjectHandler(&$db, $tablename, $classname, $keyname, $idenfierName = false)
+ {
$this->XoopsObjectHandler($db);
$this->table = $db->prefix($tablename);
$this->keyName = $keyname;
@@ -72,14 +73,15 @@
if ($isNew === true) {
$obj->setNew();
}
+
return $obj;
}
/**
* retrieve an object
*
- * @param mixed $id ID of the object - or array of ids for joint keys. Joint keys MUST be given in the same order as in the constructor
- * @param bool $as_object whether to return an object or an array
+ * @param mixed $id ID of the object - or array of ids for joint keys. Joint keys MUST be given in the same order as in the constructor
+ * @param bool $as_object whether to return an object or an array
* @return mixed reference to the object, false if failed
*/
function &get($id, $as_object = true) {
@@ -95,17 +97,19 @@
$obj_array = $this->getObjects($criteria, false, $as_object);
if (count($obj_array) != 1) {
$obj = $this->create();
+
return $obj;
}
+
return $obj_array[0];
}
/**
* retrieve objects from the database
*
- * @param object $criteria {@link CriteriaElement} conditions to be met
- * @param bool $id_as_key use the ID as key for the array?
- * @param bool $as_object return an array of objects?
+ * @param object $criteria {@link CriteriaElement} conditions to be met
+ * @param bool $id_as_key use the ID as key for the array?
+ * @param bool $as_object return an array of objects?
*
* @return array
*/
@@ -133,13 +137,14 @@
/**
* Convert a database resultset to a returnable array
*
- * @param object $result database resultset
- * @param bool $id_as_key - should NOT be used with joint keys
- * @param bool $as_object
+ * @param object $result database resultset
+ * @param bool $id_as_key - should NOT be used with joint keys
+ * @param bool $as_object
*
* @return array
*/
- function convertResultSet($result, $id_as_key = false, $as_object = true) {
+ function convertResultSet($result, $id_as_key = false, $as_object = true)
+ {
$ret = array();
while ($myrow = $this->db->fetchArray($result)) {
$obj =& $this->create(false);
@@ -182,7 +187,8 @@
*
* @return array
*/
- function getList($criteria = null, $limit = 0, $start = 0) {
+ function getList($criteria = null, $limit = 0, $start = 0)
+ {
$ret = array();
if ($criteria == null) {
$criteria = new CriteriaCompo();
@@ -193,8 +199,8 @@
}
$sql = 'SELECT '.$this->keyName;
- if(!empty($this->identifierName)){
- $sql .= ', '.$this->identifierName;
+ if (!empty($this->identifierName)) {
+ $sql .= ', '.$this->identifierName;
}
$sql .= ' FROM '.$this->table;
if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
@@ -215,6 +221,7 @@
//identifiers should be textboxes, so sanitize them like that
$ret[$myrow[$this->keyName]] = empty($this->identifierName)?1:$myts->htmlSpecialChars($myrow[$this->identifierName]);
}
+
return $ret;
}
@@ -222,8 +229,8 @@
* count objects matching a condition
*
- * @param object $criteria {@link CriteriaElement} to match
- * @return int count of objects
+ * @param object $criteria {@link CriteriaElement} to match
+ * @return int count of objects
*/
function getCount($criteria = null)
{
@@ -248,12 +255,14 @@
}
if ($groupby == false) {
list($count) = $this->db->fetchRow($result);
+
return $count;
} else {
$ret = array();
while (list($id, $count) = $this->db->fetchRow($result)) {
$ret[$id] = $count;
}
+
return $ret;
}
}
@@ -261,9 +270,9 @@
/**
* delete an object from the database
*
- * @param object $obj reference to the object to delete
- * @param bool $force
- * @return bool false if failed.
+ * @param object $obj reference to the object to delete
+ * @param bool $force
+ * @return bool false if failed.
*/
function delete(&$obj, $force = false)
{
@@ -285,16 +294,17 @@
if (!$result) {
return false;
}
+
return true;
}
/**
* insert a new object in the database
*
- * @param object $obj reference to the object
- * @param bool $force whether to force the query execution despite security settings
- * @param bool $checkObject check if the object is dirty and clean the attributes
- * @return bool false if failed, true if already present and unchanged or successful
+ * @param object $obj reference to the object
+ * @param bool $force whether to force the query execution despite security settings
+ * @param bool $checkObject check if the object is dirty and clean the attributes
+ * @return bool false if failed, true if already present and unchanged or successful
*/
function insert(&$obj, $force = false, $checkObject = true)
@@ -302,6 +312,7 @@
if ($checkObject != false) {
if (!is_object($obj)) {
var_dump($obj);
+
return false;
}
/**
@@ -309,10 +320,12 @@
*/
if (!is_a($obj, $this->className)) {
$obj->setErrors(get_class($obj)." Differs from ".$this->className);
+
return false;
}
if (!$obj->isDirty()) {
$obj->setErrors("Not dirty"); //will usually not be outputted as errors are not displayed when the method returns true, but it can be helpful when troubleshooting code - Mith
+
return true;
}
}
@@ -372,17 +385,18 @@
if ($obj->isNew() && !is_array($this->keyName)) {
$obj->assignVar($this->keyName, $this->db->getInsertId());
}
+
return true;
}
/**
* Change a value for objects with a certain criteria
*
- * @param string $fieldname Name of the field
- * @param string $fieldvalue Value to write
- * @param object $criteria {@link CriteriaElement}
+ * @param string $fieldname Name of the field
+ * @param string $fieldvalue Value to write
+ * @param object $criteria {@link CriteriaElement}
*
- * @return bool
+ * @return bool
**/
function updateAll($fieldname, $fieldvalue, $criteria = null, $force = false)
{
@@ -406,13 +420,14 @@
if (!$result) {
return false;
}
+
return true;
}
/**
* delete all objects meeting the conditions
*
- * @param object $criteria {@link CriteriaElement} with conditions to meet
+ * @param object $criteria {@link CriteriaElement} with conditions to meet
* @return bool
*/
@@ -425,8 +440,10 @@
return false;
}
$rows = $this->db->getAffectedRows();
+
return $rows > 0 ? $rows : true;
}
+
return false;
}
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/rating.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/rating.php 2013-10-04 21:19:57 UTC (rev 12132)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/rating.php 2013-10-05 12:19:51 UTC (rev 12133)
@@ -20,7 +20,8 @@
*/
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
include_once dirname(dirname(__FILE__)) . '/include/common.php';
-class WfdownloadsRating extends XoopsObject {
+class WfdownloadsRating extends XoopsObject
+{
/**
* @var WfdownloadsWfdownloads
* @access public
@@ -40,7 +41,7 @@
$this->initVar('rating', XOBJ_DTYPE_INT);
$this->initVar('ratinghostname', XOBJ_DTYPE_TXTBOX);
$this->initVar('ratingtimestamp', XOBJ_DTYPE_INT);
-
+
if (isset($id)) {
$item = $this->wfdownloads->getHandler('item')->get($id);
foreach ($item->vars as $k => $v) {
@@ -50,7 +51,8 @@
}
}
-class WfdownloadsRatingHandler extends XoopsPersistableObjectHandler {
+class WfdownloadsRatingHandler extends XoopsPersistableObjectHandler
+{
/**
* @var WfdownloadsWfdownloads
* @access public
@@ -69,10 +71,11 @@
/**
* Get average ratings of users matching a condition
*
- * @param object $criteria {@link CriteriaElement} to match
+ * @param object $criteria {@link CriteriaElement} to match
* @return array/int
*/
- function getUserAverage($criteria = null) {
+ function getUserAverage($criteria = null)
+ {
$groupby = false;
$field = '';
if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) {
@@ -94,6 +97,7 @@
}
if ($groupby == false) {
list($average, $count) = $this->db->fetchRow($result);
+
return array(
'avg' => $average,
'count' => $count
@@ -106,6 +110,7 @@
'count' => $count
);
}
+
return $ret;
}
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/report.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/report.php 2013-10-04 21:19:57 UTC (rev 12132)
+++ XoopsModules/wfdownloads/trunk/wfdow...
[truncated message content] |
|
From: <ce...@us...> - 2013-10-04 21:19:59
|
Revision: 12132
http://sourceforge.net/p/xoops/svn/12132
Author: cesag
Date: 2013-10-04 21:19:57 +0000 (Fri, 04 Oct 2013)
Log Message:
-----------
Normalization for "Define" added (Cesag).
Modified Paths:
--------------
XoopsModules/userlog/trunk/userlog/language/english/admin.php
XoopsModules/userlog/trunk/userlog/language/english/modinfo.php
Modified: XoopsModules/userlog/trunk/userlog/language/english/admin.php
===================================================================
--- XoopsModules/userlog/trunk/userlog/language/english/admin.php 2013-10-04 21:09:17 UTC (rev 12131)
+++ XoopsModules/userlog/trunk/userlog/language/english/admin.php 2013-10-04 21:19:57 UTC (rev 12132)
@@ -230,7 +230,7 @@
define('_AM_USERLOG_STATS_BROWSER', "Browser");
define('_AM_USERLOG_STATS_OS', "Operating System");
define('_AM_USERLOG_STATS_TIME_UPDATE', "Last update time:");
-define('_AM_USERLOG_STATS_TYPE',"Types to get stats");
+define('_AM_USERLOG_STATS_TYPE', "Types to get stats");
define('_AM_USERLOG_STATS_TYPE_DSC',_AM_USERLOG_STATS_REFERRAL . " | " . _AM_USERLOG_STATS_BROWSER . " | " . _AM_USERLOG_STATS_OS);
// %3\$s for above
define('_AM_USERLOG_ALL', "All Times");
Modified: XoopsModules/userlog/trunk/userlog/language/english/modinfo.php
===================================================================
--- XoopsModules/userlog/trunk/userlog/language/english/modinfo.php 2013-10-04 21:09:17 UTC (rev 12131)
+++ XoopsModules/userlog/trunk/userlog/language/english/modinfo.php 2013-10-04 21:19:57 UTC (rev 12132)
@@ -29,8 +29,8 @@
define('_MI_USERLOG_STATUS_DSC', "Active: Module will do its job. Idle: The module will not log anything");
define('_MI_USERLOG_ACTIVE', "Active");
define('_MI_USERLOG_IDLE', "Idle");
-define('_MI_USERLOG_POSTLOG',"Log any POST method?");
-define('_MI_USERLOG_POSTLOG_DSC',"In some weird situations (e.g.: send a pm, custom forms, hacks, ported modules like mediawiki, ...), there is no redirect message after submit. If you want to log any POST method regardless of redirect message set it to yes.");
+define('_MI_USERLOG_POSTLOG', "Log any POST method?");
+define('_MI_USERLOG_POSTLOG_DSC', "In some weird situations (e.g.: send a pm, custom forms, hacks, ported modules like mediawiki, ...), there is no redirect message after submit. If you want to log any POST method regardless of redirect message set it to yes.");
// config categories
define('_MI_USERLOG_CONFCAT_LOGFILE', "Log file settings");
define('_MI_USERLOG_CONFCAT_LOGFILE_DSC', "Log file (Set it if you need to store logs in a file, otherwise ignore it)");
@@ -38,10 +38,10 @@
define('_MI_USERLOG_CONFCAT_FORMAT_DSC', "Format settings");
define('_MI_USERLOG_CONFCAT_PAGENAV', "Page navigation");
define('_MI_USERLOG_CONFCAT_PAGENAV_DSC', "Page navigation settings");
-define('_MI_USERLOG_CONFCAT_LOGDB',"Log database settings");
-define('_MI_USERLOG_CONFCAT_LOGDB_DSC',"Log database (Set it if you need to store logs in database, otherwise ignore it)");
-define('_MI_USERLOG_CONFCAT_PROB',"Probability settings");
-define('_MI_USERLOG_CONFCAT_PROB_DSC',"Probability to work on database (These default numbers are recommended for a high traffic website, e.g.: more than 30,000 hits per day).");
+define('_MI_USERLOG_CONFCAT_LOGDB', "Log database settings");
+define('_MI_USERLOG_CONFCAT_LOGDB_DSC', "Log database (Set it if you need to store logs in database, otherwise ignore it)");
+define('_MI_USERLOG_CONFCAT_PROB', "Probability settings");
+define('_MI_USERLOG_CONFCAT_PROB_DSC', "Probability to work on database (These default numbers are recommended for a high traffic website, e.g.: more than 30,000 hits per day).");
// config logfile
define('_MI_USERLOG_MAXLOGFILESIZE', "Maximum file size for current working Log file (in bytes)");
|
|
From: <ce...@us...> - 2013-10-04 21:09:20
|
Revision: 12131
http://sourceforge.net/p/xoops/svn/12131
Author: cesag
Date: 2013-10-04 21:09:17 +0000 (Fri, 04 Oct 2013)
Log Message:
-----------
Returning Define deleted by mistake (Cesag).
Modified Paths:
--------------
XoopsModules/userlog/trunk/userlog/language/english/admin.php
XoopsModules/userlog/trunk/userlog/language/english/modinfo.php
Modified: XoopsModules/userlog/trunk/userlog/language/english/admin.php
===================================================================
--- XoopsModules/userlog/trunk/userlog/language/english/admin.php 2013-10-04 20:41:45 UTC (rev 12130)
+++ XoopsModules/userlog/trunk/userlog/language/english/admin.php 2013-10-04 21:09:17 UTC (rev 12131)
@@ -66,6 +66,10 @@
define('_AM_USERLOG_COOKIE', "\$_COOKIE");
define('_AM_USERLOG_HEADER', "Headers list");
define('_AM_USERLOG_LOGGER', "Logger");
+define('_AM_USERLOG_SET_ACTIVE', "Setting is active?");
+define('_AM_USERLOG_INSIDE', "Log visitors come from inside your site?");
+define('_AM_USERLOG_OUTSIDE', "Log visitors come from outside your site?");
+define('_AM_USERLOG_UNSET_PASS', "Do not log passwords?");
define('_AM_USERLOG_STORE_FILE', "Store logs in file?");
define('_AM_USERLOG_STORE_DB', "Store logs in database?");
define('_AM_USERLOG_VIEWS', "Log user views?");
@@ -222,6 +226,12 @@
define('_AM_USERLOG_STATS_FILE', "Files");
define('_AM_USERLOG_STATS_FILEALL', "Files in all paths");
define('_AM_USERLOG_STATS_VIEWS', "Views");
+define('_AM_USERLOG_STATS_REFERRAL', "Referrals");
+define('_AM_USERLOG_STATS_BROWSER', "Browser");
+define('_AM_USERLOG_STATS_OS', "Operating System");
+define('_AM_USERLOG_STATS_TIME_UPDATE', "Last update time:");
+define('_AM_USERLOG_STATS_TYPE',"Types to get stats");
+define('_AM_USERLOG_STATS_TYPE_DSC',_AM_USERLOG_STATS_REFERRAL . " | " . _AM_USERLOG_STATS_BROWSER . " | " . _AM_USERLOG_STATS_OS);
// %3\$s for above
define('_AM_USERLOG_ALL', "All Times");
define('_AM_USERLOG_TODAY', "Today");
@@ -255,4 +265,8 @@
define('_AM_USERLOG_ITEMS_DSC', "These are typical links of your active modules.");
define('_AM_USERLOG_ITEMS_NUM', "Number of items to display.");
define('_AM_USERLOG_CONFIG_CHMOD_ERROR', "Could not create any folder inside '%1\$s' because its chmod is under %2\$d.");
-define('_AM_USERLOG_CONFIG_CREATE_FOLDER', "If you need to store logs in file, you should create folder '%1\$s' and set chmod = %2\$d manually using Cpanel.");
\ No newline at end of file
+define('_AM_USERLOG_CONFIG_CREATE_FOLDER', "If you need to store logs in file, you should create folder '%1\$s' and set chmod = %2\$d manually using Cpanel.");
+define('_AM_USERLOG_LOGIN_REG_HISTORY', "Login/Register History");
+// stats.php, login_reg_history block
+define('_AM_USERLOG_FAIL', "failed");
+define('_AM_USERLOG_SUCCESS', "successful");
\ No newline at end of file
Modified: XoopsModules/userlog/trunk/userlog/language/english/modinfo.php
===================================================================
--- XoopsModules/userlog/trunk/userlog/language/english/modinfo.php 2013-10-04 20:41:45 UTC (rev 12130)
+++ XoopsModules/userlog/trunk/userlog/language/english/modinfo.php 2013-10-04 21:09:17 UTC (rev 12131)
@@ -29,17 +29,20 @@
define('_MI_USERLOG_STATUS_DSC', "Active: Module will do its job. Idle: The module will not log anything");
define('_MI_USERLOG_ACTIVE', "Active");
define('_MI_USERLOG_IDLE', "Idle");
+define('_MI_USERLOG_POSTLOG',"Log any POST method?");
+define('_MI_USERLOG_POSTLOG_DSC',"In some weird situations (e.g.: send a pm, custom forms, hacks, ported modules like mediawiki, ...), there is no redirect message after submit. If you want to log any POST method regardless of redirect message set it to yes.");
// config categories
-define('_MI_USERLOG_CONFCAT_LOGFILE', "Log file (Set it if you need to store logs in a file, otherwise ignore it)");
-define('_MI_USERLOG_CONFCAT_LOGFILE_DSC', "Preferences for Log file");
+define('_MI_USERLOG_CONFCAT_LOGFILE', "Log file settings");
+define('_MI_USERLOG_CONFCAT_LOGFILE_DSC', "Log file (Set it if you need to store logs in a file, otherwise ignore it)");
define('_MI_USERLOG_CONFCAT_FORMAT', "Format");
-define('_MI_USERLOG_CONFCAT_FORMAT_DSC', "Preferences for format");
+define('_MI_USERLOG_CONFCAT_FORMAT_DSC', "Format settings");
define('_MI_USERLOG_CONFCAT_PAGENAV', "Page navigation");
-define('_MI_USERLOG_CONFCAT_PAGENAV_DSC', "Preferences for page navigation");
-define('_MI_USERLOG_CONFCAT_LOGDB', "Log database (Set it if you need to store logs in database, otherwise ignore it)");
-define('_MI_USERLOG_CONFCAT_LOGDB_DSC', "Preferences for Log database");
-define('_MI_USERLOG_CONFCAT_PROB', "Probability to work on database (These default numbers are recommended for a high traffic website, e.g.: more than 30,000 hits per day).");
-define('_MI_USERLOG_CONFCAT_PROB_DSC', "Preferences for Probability");
+define('_MI_USERLOG_CONFCAT_PAGENAV_DSC', "Page navigation settings");
+define('_MI_USERLOG_CONFCAT_LOGDB',"Log database settings");
+define('_MI_USERLOG_CONFCAT_LOGDB_DSC',"Log database (Set it if you need to store logs in database, otherwise ignore it)");
+define('_MI_USERLOG_CONFCAT_PROB',"Probability settings");
+define('_MI_USERLOG_CONFCAT_PROB_DSC',"Probability to work on database (These default numbers are recommended for a high traffic website, e.g.: more than 30,000 hits per day).");
+
// config logfile
define('_MI_USERLOG_MAXLOGFILESIZE', "Maximum file size for current working Log file (in bytes)");
define('_MI_USERLOG_MAXLOGFILESIZE_DSC', "Advise: Set it below 1MB because some servers set limitations for viewing large files in CPanel.");
@@ -50,6 +53,7 @@
// config format
define('_MI_USERLOG_DATEFORMAT', "Date format");
define('_MI_USERLOG_DATEFORMAT_DSC', "If you leave it empty, this module will use Core default");
+define('_MI_USERLOG_DATEFORMAT_HISTORY', "Date format for historical times, e.g.: 1 day ago");
// config pagenav
define('_MI_USERLOG_SETS_PERPAGE', "Number of settings per page");
define('_MI_USERLOG_SETS_PERPAGE_DSC', "The default value for viewing settings");
|
|
From: <ce...@us...> - 2013-10-04 20:41:48
|
Revision: 12130
http://sourceforge.net/p/xoops/svn/12130
Author: cesag
Date: 2013-10-04 20:41:45 +0000 (Fri, 04 Oct 2013)
Log Message:
-----------
Standard norms updated and fixed typos for the English folder (Cesag).
Modified Paths:
--------------
XoopsModules/userlog/trunk/userlog/docs/changelog.txt
XoopsModules/userlog/trunk/userlog/language/english/admin.php
XoopsModules/userlog/trunk/userlog/language/english/modinfo.php
Modified: XoopsModules/userlog/trunk/userlog/docs/changelog.txt
===================================================================
--- XoopsModules/userlog/trunk/userlog/docs/changelog.txt 2013-10-04 17:31:25 UTC (rev 12129)
+++ XoopsModules/userlog/trunk/userlog/docs/changelog.txt 2013-10-04 20:41:45 UTC (rev 12130)
@@ -1,6 +1,8 @@
Userlog
Changelog:
VERSION 1.16:
+- Standard norms updated and fixed typos for the English folder (Cesag) (2013/10/04)
+- Adding PHP 5.5.x implementation for preg_replace_callback (Mamba) (2013/09/23)
- bug fix: persian translations turned to utf-8 without BOM in language/persian/*.* (2013/05/20)
- improve: if empty($subscribe_from) item() will return $script_arr["item_name"] name of the item = array("subscribe_from1", "subscribe_from2") Name of the script
in class/log.php ,class/plugin/newbb.php , modules/newbb/class/plugin/userlog.php (2013/05/20)
Modified: XoopsModules/userlog/trunk/userlog/language/english/admin.php
===================================================================
--- XoopsModules/userlog/trunk/userlog/language/english/admin.php 2013-10-04 17:31:25 UTC (rev 12129)
+++ XoopsModules/userlog/trunk/userlog/language/english/admin.php 2013-10-04 20:41:45 UTC (rev 12130)
@@ -19,289 +19,240 @@
* @author The XOOPS Project <www.xoops.org> <www.xoops.ir>
* @version $Id: admin.php 1 2013-02-26 16:25:04Z irmtfan $
*/
-
// admin menus
-define("_AM_USERLOG_ADMENU_INDEX","Home");
-define("_AM_USERLOG_ADMENU_SETTING","Setting");
-define("_AM_USERLOG_ADMENU_LOGS","Logs");
-define("_AM_USERLOG_ADMENU_FILE","File manager");
-define("_AM_USERLOG_ADMENU_STATS","Statistics");
-define("_AM_USERLOG_ABOUT","About");
+define('_AM_USERLOG_ADMENU_INDEX', "Home");
+define('_AM_USERLOG_ADMENU_SETTING', "Setting");
+define('_AM_USERLOG_ADMENU_LOGS', "Logs");
+define('_AM_USERLOG_ADMENU_FILE', "File manager");
+define('_AM_USERLOG_ADMENU_STATS', "Statistics");
+define('_AM_USERLOG_ABOUT', "About");
// general error
-define("_AM_USERLOG_ERROR","An error occured during the operation. %1\$s");
-
+define('_AM_USERLOG_ERROR', "An error occurred during the operation. %1\$s");
// setting.php loglog object options
-define("_AM_USERLOG_LOG_ID","Log ID");
-define("_AM_USERLOG_LOG_ID_DSC","Log ID in the database");
-define("_AM_USERLOG_LOG_TIME","Log time");
-define("_AM_USERLOG_LOG_TIME_DSC","Time of log record");
-define("_AM_USERLOG_UID","User ID");
-define("_AM_USERLOG_UID_DSC","User ID number");
-define("_AM_USERLOG_ADMIN","Is Admin?(y/n)");
-define("_AM_USERLOG_ADMIN_DSC","True if user is Admin in all or any section of your website that have been logged. e.g.: webmasters, moderator in forums");
-define("_AM_USERLOG_PAGEADMIN","Is Page admin?(y/n)");
-define("_AM_USERLOG_PAGEADMIN_DSC","True if page is in admin side.");
-define("_AM_USERLOG_GROUPS","Groups");
-define("_AM_USERLOG_GROUPS_DSC","All Groups");
-define("_AM_USERLOG_UNAME","Username");
-define("_AM_USERLOG_UNAME_DSC","Username in database");
-define("_AM_USERLOG_LAST_LOGIN","User Last Visit");
-define("_AM_USERLOG_LAST_LOGIN_DSC","User Last Visit in the website");
-define("_AM_USERLOG_USER_IP","User IP");
-define("_AM_USERLOG_USER_AGENT","User agent");
-define("_AM_USERLOG_URL","URL (Request URI)");
-define("_AM_USERLOG_SCRIPT","Script name");
-define("_AM_USERLOG_SCRIPT_DSC","Script name e.g.:(in your homepage it is index.php)");
-define("_AM_USERLOG_REFERER","Referer URI");
-define("_AM_USERLOG_PAGETITLE","Page title");
-define("_AM_USERLOG_MODULE","Module dirname");
-define("_AM_USERLOG_MODULE_NAME","Module name");
-define("_AM_USERLOG_ITEM_NAME","Item name");
-define("_AM_USERLOG_ITEM_ID","Item ID");
-define("_AM_USERLOG_REQUEST_METHOD","Request method (GET, POST, ...)");
-define("_AM_USERLOG_GET","\$_GET");
-define("_AM_USERLOG_POST","\$_POST");
-define("_AM_USERLOG_REQUEST","\$_REQUEST");
-define("_AM_USERLOG_FILES","\$_FILES");
-define("_AM_USERLOG_ENV","\$_ENV");
-define("_AM_USERLOG_SESSION","\$_SESSION");
-define("_AM_USERLOG_COOKIE","\$_COOKIE");
-define("_AM_USERLOG_HEADER","Headers list");
-define("_AM_USERLOG_LOGGER","Logger");
-define("_AM_USERLOG_SET_ACTIVE","Setting is active?");
-define("_AM_USERLOG_INSIDE","Log visitors come from inside your site?");
-define("_AM_USERLOG_OUTSIDE","Log visitors come from outside your site?");
-define("_AM_USERLOG_UNSET_PASS","Do not log passwords?");
-define("_AM_USERLOG_STORE_FILE","Store logs in file?");
-define("_AM_USERLOG_STORE_DB","Store logs in database?");
-define("_AM_USERLOG_VIEWS","Log user views?");
-
+define('_AM_USERLOG_LOG_ID', "Log ID");
+define('_AM_USERLOG_LOG_ID_DSC', "Log ID in the database");
+define('_AM_USERLOG_LOG_TIME', "Log time");
+define('_AM_USERLOG_LOG_TIME_DSC', "Time of log record");
+define('_AM_USERLOG_UID', "User ID");
+define('_AM_USERLOG_UID_DSC', "User ID number");
+define('_AM_USERLOG_ADMIN', "Is Admin?(y/n)");
+define('_AM_USERLOG_ADMIN_DSC', "True if user is Admin in all or any section of your website that have been logged, e.g.: webmasters, moderator in forums.");
+define('_AM_USERLOG_PAGEADMIN', "Is Page admin?(y/n)");
+define('_AM_USERLOG_PAGEADMIN_DSC', "True if page is in admin side.");
+define('_AM_USERLOG_GROUPS', "Groups");
+define('_AM_USERLOG_GROUPS_DSC', "All Groups");
+define('_AM_USERLOG_UNAME', "Username");
+define('_AM_USERLOG_UNAME_DSC', "Username in database");
+define('_AM_USERLOG_LAST_LOGIN', "User Last Visit");
+define('_AM_USERLOG_LAST_LOGIN_DSC', "User Last Visit in the website");
+define('_AM_USERLOG_USER_IP', "User IP");
+define('_AM_USERLOG_USER_AGENT', "User agent");
+define('_AM_USERLOG_URL', "URL (Request URI)");
+define('_AM_USERLOG_SCRIPT', "Script name");
+define('_AM_USERLOG_SCRIPT_DSC', "Script name, e.g.: in your homepage it is index.php.");
+define('_AM_USERLOG_REFERER', "Referer URI");
+define('_AM_USERLOG_PAGETITLE', "Page title");
+define('_AM_USERLOG_MODULE', "Module dirname");
+define('_AM_USERLOG_MODULE_NAME', "Module name");
+define('_AM_USERLOG_ITEM_NAME', "Item name");
+define('_AM_USERLOG_ITEM_ID', "Item ID");
+define('_AM_USERLOG_REQUEST_METHOD', "Request method (GET, POST, ...)");
+define('_AM_USERLOG_GET', "\$_GET");
+define('_AM_USERLOG_POST', "\$_POST");
+define('_AM_USERLOG_REQUEST', "\$_REQUEST");
+define('_AM_USERLOG_FILES', "\$_FILES");
+define('_AM_USERLOG_ENV', "\$_ENV");
+define('_AM_USERLOG_SESSION', "\$_SESSION");
+define('_AM_USERLOG_COOKIE', "\$_COOKIE");
+define('_AM_USERLOG_HEADER', "Headers list");
+define('_AM_USERLOG_LOGGER', "Logger");
+define('_AM_USERLOG_STORE_FILE', "Store logs in file?");
+define('_AM_USERLOG_STORE_DB', "Store logs in database?");
+define('_AM_USERLOG_VIEWS', "Log user views?");
// setting.php logset object
-define("_AM_USERLOG_SET_ADD","Add a setting");
-define("_AM_USERLOG_SET_ID","ID");
-define("_AM_USERLOG_SET_NAME","Setting name");
-define("_AM_USERLOG_SET_NAME_DSC","Type a name for this setting in your own language");
-define("_AM_USERLOG_SET_LOGBY","Log by");
-define("_AM_USERLOG_SET_LOGBY_DSC","Log user activities by fetching this value from users table in database? priority: IF exist uid log it ELSEIF exist gid log it ELSEIf exist ip log it ELSE if Unique id = 0 log all users ELSE don't log");
-define("_AM_USERLOG_SET_UNIQUE_ID","Unique ID");
-define("_AM_USERLOG_SET_UNIQUE_ID_DSC","Unique id (eg: uid=1, gid=3 (anonymous), ip=66.249.66.1) 0=all users");
-define("_AM_USERLOG_SET_GID","Group ID");
-define("_AM_USERLOG_SET_IP","Visitor IP");
-define("_AM_USERLOG_SET_OPTIONS","Options");
-define("_AM_USERLOG_SET_OPTIONS_DSC","Log which user/page data?<br />
- <b>Notice:</b><br />
- - Selecting no option means all options.<br />
- - Uncheck 'Setting is active?' means make this setting idle.<br />
- - Selecting 'Log visitors come from inside/outside your site?' means log visitor whos referral is inside/outside your website domain.<br />
- - Selecting 'Do not log passwords?' means inputted passwords in login/register will not be stored.<br />
- - Selecting no store option (File and/or Database) means Database.<br />
- - Selecting views means store uid, groups, script name, pagetitle,pageadmin, module dirname, module name, item name, item id in Database
- ");
-define("_AM_USERLOG_SET_SCOPE","Log scope");
-define("_AM_USERLOG_SET_SCOPE_DSC","Log users activities in which modules? Selecting nothing means whole website");
-
+define('_AM_USERLOG_SET_ADD', "Add a setting");
+define('_AM_USERLOG_SET_ID', "ID");
+define('_AM_USERLOG_SET_NAME', "Setting name");
+define('_AM_USERLOG_SET_NAME_DSC', "Type a name for this setting in your own language");
+define('_AM_USERLOG_SET_LOGBY', "Log by");
+define('_AM_USERLOG_SET_LOGBY_DSC', "Log user activities by fetching this value from users table in database? priority: IF exist uid log it ELSEIF exist gid log it ELSEIf exist ip log it ELSE if Unique id = 0 log all users ELSE don't log");
+define('_AM_USERLOG_SET_UNIQUE_ID', "Unique ID");
+define('_AM_USERLOG_SET_UNIQUE_ID_DSC', "Unique id, e.g.: uid=1, gid=3 (anonymous), ip=66.249.66.1, 0=all users");
+define('_AM_USERLOG_SET_GID', "Group ID");
+define('_AM_USERLOG_SET_IP', "Visitor IP");
+define('_AM_USERLOG_SET_OPTIONS', "Options");
+define('_AM_USERLOG_SET_OPTIONS_DSC', "Log which user/page data? Notice: selecting no option means all options. Selecting no store option (File and/or Database) means Database. Selecting views means store uid, groups, script name, pagetitle, pageadmin, module dirname, module name, item name, item id in Database");
+define('_AM_USERLOG_SET_SCOPE', "Log scope");
+define('_AM_USERLOG_SET_SCOPE_DSC', "Log users activities in which modules? Selecting nothing means whole website");
// setting.php add/edit
-define("_AM_USERLOG_SET_ERROR","Error. You've entered wrong data!");
-define("_AM_USERLOG_SET_CREATE","Setting %1\$s created successfully.");
-define("_AM_USERLOG_SET_EDIT","Setting %1\$s edited successfully.");
-define("_AM_USERLOG_SET_UPDATE","Caution! your new submitted setting is not created because setting %1\$s has been in database with the same Log by and Unique ID. But it updated with your new options successfully.");
-define("_AM_USERLOG_SET_CANCEL","Cancel");
-
+define('_AM_USERLOG_SET_ERROR', "Error. You've entered wrong data!");
+define('_AM_USERLOG_SET_CREATE', "Setting %1\$s created successfully.");
+define('_AM_USERLOG_SET_EDIT', "Setting %1\$s edited successfully.");
+define('_AM_USERLOG_SET_UPDATE', "Caution! Your new submitted setting is not created because setting %1\$s has been in database with the same Log by and Unique ID. But it updated with your new options successfully.");
+define('_AM_USERLOG_SET_CANCEL', "Cancel");
// setting.php delete
-define("_AM_USERLOG_SET_DELETE_CONFIRM","Are you sure to delete setting %1\$s?");
-define("_AM_USERLOG_SET_DELETE_ERROR","Cannot delete setting %1\$s");
-define("_AM_USERLOG_SET_DELETE_SUCCESS","Setting %1\$s deleted successfully.");
-
+define('_AM_USERLOG_SET_DELETE_CONFIRM', "Are you sure to delete setting %1\$s?");
+define('_AM_USERLOG_SET_DELETE_ERROR', "Cannot delete setting %1\$s");
+define('_AM_USERLOG_SET_DELETE_SUCCESS', "Setting %1\$s deleted successfully.");
// setting.php create/clean cache
-define("_AM_USERLOG_SET_CACHE","Appropriate cached setting file created/edited successfully.");
-define("_AM_USERLOG_SET_CLEANCACHE","Appropriate cached setting file deleted successfully.");
-define("_AM_USERLOG_SET_CLEANCACHE_ALL","Delete all cached setting files?");
-define("_AM_USERLOG_SET_CLEANCACHE_SUCCESS","%1\$d cached setting files deleted successfully.");
-define("_AM_USERLOG_SET_CLEANCACHE_NOFILE","No cached setting file is exist to delete.");
-
+define('_AM_USERLOG_SET_CACHE', "Appropriate cached setting file created/edited successfully.");
+define('_AM_USERLOG_SET_CLEANCACHE', "Appropriate cached setting file deleted successfully.");
+define('_AM_USERLOG_SET_CLEANCACHE_ALL', "Delete all cached setting files?");
+define('_AM_USERLOG_SET_CLEANCACHE_SUCCESS', "%1\$d cached setting files deleted successfully.");
+define('_AM_USERLOG_SET_CLEANCACHE_NOFILE', "No cached setting file is exist to delete.");
// logs.php form
-define("_AM_USERLOG_LOGFORM","Enter data and push enter or click on submit button to show logs");
-
-define("_AM_USERLOG_LOGS_PERPAGE","Number of logs per page");
-define("_AM_USERLOG_LOGS_PERPAGE_DSC","The default value is %1\$s defined in Preferences");
-define("_AM_USERLOG_SORT","Sort by");
-define("_AM_USERLOG_SORT_DSC","Select one field to sort logs based on that field");
-define("_AM_USERLOG_ORDER","Order by");
-define("_AM_USERLOG_ORDER_DSC","Ascending or Descending order");
-
+define('_AM_USERLOG_LOGFORM', "Enter data and push enter or click on submit button to show logs");
+define('_AM_USERLOG_LOGS_PERPAGE', "Number of logs per page");
+define('_AM_USERLOG_LOGS_PERPAGE_DSC', "The default value is %1\$s defined in Preferences");
+define('_AM_USERLOG_SORT', "Sort by");
+define('_AM_USERLOG_SORT_DSC', "Select one field to sort logs based on that field");
+define('_AM_USERLOG_ORDER', "Order by");
+define('_AM_USERLOG_ORDER_DSC', "Ascending or Descending order");
// for all INT logs use these definition
-define("_AM_USERLOG_INTGT","%1\$s greater than");
-define("_AM_USERLOG_INTLT","%1\$s lower than");
-define("_AM_USERLOG_TIMEGT","%1\$s since");
-define("_AM_USERLOG_TIMELT","%1\$s until");
-define("_AM_USERLOG_INT_FORM","Enter one '%1\$s' or several '%2\$s's separated with comma to show logs based on that. eg: 23,32,12");
-define("_AM_USERLOG_INTGT_FORM","Enter one '%1\$s' to show all '%2\$s's greater than it.");
-define("_AM_USERLOG_INTLT_FORM","Enter one '%1\$s' to show all '%2\$s's lower than it.");
-define("_AM_USERLOG_TIMEGT_FORM","Enter Time of '%1\$s' to show all logs since that time. Positive for days and negative for hours. eg: 1 means since one day ago.");
-define("_AM_USERLOG_TIMELT_FORM","Enter Time of '%1\$s' to show all logs until that time. Positive for days and negative for hours. eg: 1 means until one day ago.");
+define('_AM_USERLOG_INTGT', "%1\$s greater than");
+define('_AM_USERLOG_INTLT', "%1\$s lower than");
+define('_AM_USERLOG_TIMEGT', "%1\$s since");
+define('_AM_USERLOG_TIMELT', "%1\$s until");
+define('_AM_USERLOG_INT_FORM', "Enter one '%1\$s' or several '%2\$s's separated with comma to show logs based on that, e.g.: 23,32,12.");
+define('_AM_USERLOG_INTGT_FORM', "Enter one '%1\$s' to show all '%2\$s's greater than it.");
+define('_AM_USERLOG_INTLT_FORM', "Enter one '%1\$s' to show all '%2\$s's lower than it.");
+define('_AM_USERLOG_TIMEGT_FORM', "Enter Time of '%1\$s' to show all logs since that time. Positive for days and negative for hours, e.g.: 1 means since one day ago.");
+define('_AM_USERLOG_TIMELT_FORM', "Enter Time of '%1\$s' to show all logs until that time. Positive for days and negative for hours, e.g.: 1 means until one day ago.");
// Translators: do not touch below for now
// START DO NOT TOUCH
-define("_AM_USERLOG_LOG_ID_FORM",_AM_USERLOG_INT_FORM);
-define("_AM_USERLOG_LOG_IDGT",sprintf(_AM_USERLOG_INTGT,_AM_USERLOG_LOG_ID));
-define("_AM_USERLOG_LOG_IDGT_FORM",_AM_USERLOG_INTGT_FORM);
-define("_AM_USERLOG_LOG_IDLT",sprintf(_AM_USERLOG_INTLT,_AM_USERLOG_LOG_ID));
-define("_AM_USERLOG_LOG_IDLT_FORM",_AM_USERLOG_INTLT_FORM);
-
-define("_AM_USERLOG_LOG_TIMEGT",sprintf(_AM_USERLOG_TIMEGT,_AM_USERLOG_LOG_TIME));
-define("_AM_USERLOG_LOG_TIMEGT_FORM",sprintf(_AM_USERLOG_TIMEGT_FORM,_AM_USERLOG_LOG_TIME));
-define("_AM_USERLOG_LOG_TIMELT",sprintf(_AM_USERLOG_TIMELT,_AM_USERLOG_LOG_TIME));
-define("_AM_USERLOG_LOG_TIMELT_FORM",sprintf(_AM_USERLOG_TIMELT_FORM,_AM_USERLOG_LOG_TIME));
-
-define("_AM_USERLOG_UID_FORM",_AM_USERLOG_INT_FORM);
-define("_AM_USERLOG_UIDGT",sprintf(_AM_USERLOG_INTGT,_AM_USERLOG_UID));
-define("_AM_USERLOG_UIDGT_FORM",_AM_USERLOG_INTGT_FORM);
-define("_AM_USERLOG_UIDLT",sprintf(_AM_USERLOG_INTLT,_AM_USERLOG_UID));
-define("_AM_USERLOG_UIDLT_FORM",_AM_USERLOG_INTLT_FORM);
-
-define("_AM_USERLOG_LAST_LOGINGT",sprintf(_AM_USERLOG_TIMEGT,_AM_USERLOG_LAST_LOGIN));
-define("_AM_USERLOG_LAST_LOGINGT_FORM",sprintf(_AM_USERLOG_TIMEGT_FORM,_AM_USERLOG_LAST_LOGIN));
-define("_AM_USERLOG_LAST_LOGINLT",sprintf(_AM_USERLOG_TIMELT,_AM_USERLOG_LAST_LOGIN));
-define("_AM_USERLOG_LAST_LOGINLT_FORM",sprintf(_AM_USERLOG_TIMELT_FORM,_AM_USERLOG_LAST_LOGIN));
-
-define("_AM_USERLOG_ITEM_ID_FORM",_AM_USERLOG_INT_FORM);
-define("_AM_USERLOG_ITEM_IDGT",sprintf(_AM_USERLOG_INTGT,_AM_USERLOG_ITEM_ID));
-define("_AM_USERLOG_ITEM_IDGT_FORM",_AM_USERLOG_INTGT_FORM);
-define("_AM_USERLOG_ITEM_IDLT",sprintf(_AM_USERLOG_INTLT,_AM_USERLOG_ITEM_ID));
-define("_AM_USERLOG_ITEM_IDLT_FORM",_AM_USERLOG_INTLT_FORM);
+define('_AM_USERLOG_LOG_ID_FORM', _AM_USERLOG_INT_FORM);
+define('_AM_USERLOG_LOG_IDGT', sprintf(_AM_USERLOG_INTGT,_AM_USERLOG_LOG_ID));
+define('_AM_USERLOG_LOG_IDGT_FORM', _AM_USERLOG_INTGT_FORM);
+define('_AM_USERLOG_LOG_IDLT', sprintf(_AM_USERLOG_INTLT,_AM_USERLOG_LOG_ID));
+define('_AM_USERLOG_LOG_IDLT_FORM', _AM_USERLOG_INTLT_FORM);
+define('_AM_USERLOG_LOG_TIMEGT', sprintf(_AM_USERLOG_TIMEGT,_AM_USERLOG_LOG_TIME));
+define('_AM_USERLOG_LOG_TIMEGT_FORM', sprintf(_AM_USERLOG_TIMEGT_FORM,_AM_USERLOG_LOG_TIME));
+define('_AM_USERLOG_LOG_TIMELT', sprintf(_AM_USERLOG_TIMELT,_AM_USERLOG_LOG_TIME));
+define('_AM_USERLOG_LOG_TIMELT_FORM', sprintf(_AM_USERLOG_TIMELT_FORM,_AM_USERLOG_LOG_TIME));
+define('_AM_USERLOG_UID_FORM', _AM_USERLOG_INT_FORM);
+define('_AM_USERLOG_UIDGT', sprintf(_AM_USERLOG_INTGT,_AM_USERLOG_UID));
+define('_AM_USERLOG_UIDGT_FORM', _AM_USERLOG_INTGT_FORM);
+define('_AM_USERLOG_UIDLT', sprintf(_AM_USERLOG_INTLT,_AM_USERLOG_UID));
+define('_AM_USERLOG_UIDLT_FORM', _AM_USERLOG_INTLT_FORM);
+define('_AM_USERLOG_LAST_LOGINGT', sprintf(_AM_USERLOG_TIMEGT,_AM_USERLOG_LAST_LOGIN));
+define('_AM_USERLOG_LAST_LOGINGT_FORM', sprintf(_AM_USERLOG_TIMEGT_FORM,_AM_USERLOG_LAST_LOGIN));
+define('_AM_USERLOG_LAST_LOGINLT', sprintf(_AM_USERLOG_TIMELT,_AM_USERLOG_LAST_LOGIN));
+define('_AM_USERLOG_LAST_LOGINLT_FORM', sprintf(_AM_USERLOG_TIMELT_FORM,_AM_USERLOG_LAST_LOGIN));
+define('_AM_USERLOG_ITEM_ID_FORM', _AM_USERLOG_INT_FORM);
+define('_AM_USERLOG_ITEM_IDGT', sprintf(_AM_USERLOG_INTGT,_AM_USERLOG_ITEM_ID));
+define('_AM_USERLOG_ITEM_IDGT_FORM', _AM_USERLOG_INTGT_FORM);
+define('_AM_USERLOG_ITEM_IDLT', sprintf(_AM_USERLOG_INTLT,_AM_USERLOG_ITEM_ID));
+define('_AM_USERLOG_ITEM_IDLT_FORM', _AM_USERLOG_INTLT_FORM);
// END DO NOT TOUCH
-
-define("_AM_USERLOG_ADMIN_FORM","Select Yes to show all logs from Admins");
-define("_AM_USERLOG_PAGEADMIN_FORM","Select Yes to show all pages in admin side of modules");
-define("_AM_USERLOG_GROUPS_FORM","Enter one group with 'g' prefix (or several groups separated with comma) to show logs for all users belonging to those groups. Enter '!g' prefix to show logs for users not in those groups. eg: g1,g2,!g4 means all users belonging to group 1 OR group 2 AND not belong to group 4");
-
+define('_AM_USERLOG_ADMIN_FORM', "Select Yes to show all logs from Admins");
+define('_AM_USERLOG_PAGEADMIN_FORM', "Select Yes to show all pages in admin side of modules");
+define('_AM_USERLOG_GROUPS_FORM', "Enter one group with 'g' prefix (or several groups separated with comma) to show logs for all users belonging to those groups. Enter '!g' prefix to show logs for users not in those groups, e.g.: g1, g2, !g4 means all users belonging to group 1 OR group 2 AND not belong to group 4.");
// for all other text logs use just one definition
-define("_AM_USERLOG_TEXT_FORM","Enter one exact '%1\$s' or part of '%2\$s' to show all logs for users have that (with prefix '!' have not that). you can enter several separated with comma. eg: TERM1, !TERM2, TERM3 means all logs have TERM1 and TERM3 but have not TERM2");
+define('_AM_USERLOG_TEXT_FORM', "Enter one exact '%1\$s' or part of '%2\$s' to show all logs for users have that (with prefix '!' have not that). You can enter several separated with comma, e.g.: TERM1, !TERM2, TERM3 means all logs have TERM1 and TERM3, but have not TERM2.");
// Translators: do not touch below for now
// START DO NOT TOUCH
-define("_AM_USERLOG_UNAME_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_USER_IP_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_USER_AGENT_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_URL_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_SCRIPT_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_REFERER_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_PAGETITLE_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_MODULE_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_MODULE_NAME_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_ITEM_NAME_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_REQUEST_METHOD_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_GET_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_POST_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_REQUEST_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_FILES_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_ENV_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_SESSION_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_COOKIE_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_HEADER_FORM",_AM_USERLOG_TEXT_FORM);
-define("_AM_USERLOG_LOGGER_FORM",_AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_UNAME_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_USER_IP_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_USER_AGENT_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_URL_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_SCRIPT_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_REFERER_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_PAGETITLE_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_MODULE_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_MODULE_NAME_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_ITEM_NAME_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_REQUEST_METHOD_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_GET_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_POST_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_REQUEST_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_FILES_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_ENV_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_SESSION_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_COOKIE_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_HEADER_FORM', _AM_USERLOG_TEXT_FORM);
+define('_AM_USERLOG_LOGGER_FORM', _AM_USERLOG_TEXT_FORM);
// END DO NOT TOUCH
// logs.php engine/file
-define("_AM_USERLOG_ENGINE","Engine");
-define("_AM_USERLOG_ENGINE_DSC","Select the engine you want to get logs from.");
-define("_AM_USERLOG_ENGINE_FILE","FILE");
-define("_AM_USERLOG_ENGINE_DB","Database");
-define("_AM_USERLOG_FILE","Files");
-define("_AM_USERLOG_FILE_DSC","Select files you want to get logs from.");
-define("_AM_USERLOG_FILE_WORKING","Working file");
-
+define('_AM_USERLOG_ENGINE', "Engine");
+define('_AM_USERLOG_ENGINE_DSC', "Select the engine you want to get logs from.");
+define('_AM_USERLOG_ENGINE_FILE', "FILE");
+define('_AM_USERLOG_ENGINE_DB', "Database");
+define('_AM_USERLOG_FILE', "Files");
+define('_AM_USERLOG_FILE_DSC', "Select files you want to get logs from.");
+define('_AM_USERLOG_FILE_WORKING', "Working file");
// logs.php error
-define("_AM_USERLOG_LOG_ERROR","No Log is found with this criteria.");
-define("_AM_USERLOG_LOG_STATUS","%1\$s logs are found.");
-define("_AM_USERLOG_LOG_PAGE","Pages");
-
+define('_AM_USERLOG_LOG_ERROR', "No Log is found with this criteria.");
+define('_AM_USERLOG_LOG_STATUS', "%1\$s logs are found.");
+define('_AM_USERLOG_LOG_PAGE', "Pages");
// logs.php delete
-define("_AM_USERLOG_LOG_DELETE_SELECT","Delete selected logs in the current page.");
-define("_AM_USERLOG_LOG_PURGE_ALL","Purge all rendered logs in all pages?");
-define("_AM_USERLOG_LOG_DELETE_CONFIRM","Are you sure you want to delete logs? logs will permanently be deleted from database.");
-define("_AM_USERLOG_LOG_DELETE_SUCCESS","%1\$d logs deleted successfully.");
-define("_AM_USERLOG_LOG_DELETE_SUCCESS_QUERY","%1\$d logs deleted successfully with '%2\$s' query.");
-define("_AM_USERLOG_LOG_DELETE_ERROR","Error. you input an invalid criteria for delete.");
-define("_AM_USERLOG_LOG_DELETE_ERRORSELECT","You select nothing to delete.");
-
+define('_AM_USERLOG_LOG_DELETE_SELECT', "Delete selected logs in the current page.");
+define('_AM_USERLOG_LOG_PURGE_ALL', "Purge all rendered logs in all pages?");
+define('_AM_USERLOG_LOG_DELETE_CONFIRM', "Are you sure you want to delete logs? Logs will permanently be deleted from database.");
+define('_AM_USERLOG_LOG_DELETE_SUCCESS', "%1\$d logs deleted successfully.");
+define('_AM_USERLOG_LOG_DELETE_SUCCESS_QUERY', "%1\$d logs deleted successfully with '%2\$s' query.");
+define('_AM_USERLOG_LOG_DELETE_ERROR', "Error. You input an invalid criteria for delete.");
+define('_AM_USERLOG_LOG_DELETE_ERRORSELECT', "You select nothing to delete.");
// logs.php select
-define("_AM_USERLOG_LOG_SELECT","Select action to operate in the current page.");
-define("_AM_USERLOG_LOG_SELECT_BULK","Select action to operate in all pages.");
-define("_AM_USERLOG_LOG_ERRORSELECT","You select nothing.");
-
+define('_AM_USERLOG_LOG_SELECT', "Select action to operate in the current page.");
+define('_AM_USERLOG_LOG_SELECT_BULK', "Select action to operate in all pages.");
+define('_AM_USERLOG_LOG_ERRORSELECT', "You select nothing.");
// logs.php export
-define("_AM_USERLOG_LOG_EXPORT_CSV_SELECT","Export selected logs in the current page to csv.");
-define("_AM_USERLOG_LOG_EXPORT_CSV_ALL","Export all rendered logs in all pages to csv?");
-define("_AM_USERLOG_LOG_EXPORT_SUCCESS","%1\$d logs exported successfully to csv file. Csv file: %2\$s");
-define("_AM_USERLOG_LOG_EXPORT_ERROR","Error. you input an invalid criteria for export.");
-
+define('_AM_USERLOG_LOG_EXPORT_CSV_SELECT', "Export selected logs in the current page to csv.");
+define('_AM_USERLOG_LOG_EXPORT_CSV_ALL', "Export all rendered logs in all pages to csv?");
+define('_AM_USERLOG_LOG_EXPORT_SUCCESS', "%1\$d logs exported successfully to csv file. Csv file: %2\$s");
+define('_AM_USERLOG_LOG_EXPORT_ERROR', "Error. You input an invalid criteria for export.");
// logs.php template
-define("_AM_USERLOG_SHOW_FORM","Show head form");
-define("_AM_USERLOG_HIDE_FORM","Hide head form");
-define("_AM_USERLOG_UP","Go up");
-define("_AM_USERLOG_DOWN","Go down");
-
+define('_AM_USERLOG_SHOW_FORM', "Show head form");
+define('_AM_USERLOG_HIDE_FORM', "Hide head form");
+define('_AM_USERLOG_UP', "Go up");
+define('_AM_USERLOG_DOWN', "Go down");
// views block
-define("_AM_USERLOG_VIEW_ALL","All views");
-define("_AM_USERLOG_VIEW_MODULE","Module views");
-define("_AM_USERLOG_VIEW_USER","User views");
-define("_AM_USERLOG_VIEW_GROUP","Group views");
-define("_AM_USERLOG_VIEW","Views");
-
+define('_AM_USERLOG_VIEW_ALL', "All views");
+define('_AM_USERLOG_VIEW_MODULE', "Module views");
+define('_AM_USERLOG_VIEW_USER', "User views");
+define('_AM_USERLOG_VIEW_GROUP', "Group views");
+define('_AM_USERLOG_VIEW', "Views");
// index.php stats.php
-define("_AM_USERLOG_STATS_ABSTRACT","Statistics Overview");
-define("_AM_USERLOG_STATS_TYPE_PERIOD","There are %1\$s %2\$s exist in %3\$s");
+define('_AM_USERLOG_STATS_ABSTRACT', "Statistics Overview");
+define('_AM_USERLOG_STATS_TYPE_PERIOD', "There are %1\$s %2\$s exist in %3\$s");
// %2\$s for above
-define("_AM_USERLOG_STATS_LOG","Logs");
-define("_AM_USERLOG_STATS_LOGDEL","Deleted logs");
-define("_AM_USERLOG_STATS_SET","Sets");
-define("_AM_USERLOG_STATS_FILE","Files");
-define("_AM_USERLOG_STATS_FILEALL","Files in all paths");
-define("_AM_USERLOG_STATS_VIEWS","Views");
-define("_AM_USERLOG_STATS_REFERRAL","Referrals");
-define("_AM_USERLOG_STATS_BROWSER","Browser");
-define("_AM_USERLOG_STATS_OS","Operating System");
-define("_AM_USERLOG_STATS_TIME_UPDATE","Last update time:");
-define("_AM_USERLOG_STATS_TYPE","Types to get stats");
-define("_AM_USERLOG_STATS_TYPE_DSC",_AM_USERLOG_STATS_REFERRAL . " | " . _AM_USERLOG_STATS_BROWSER . " | " . _AM_USERLOG_STATS_OS);
-
+define('_AM_USERLOG_STATS_LOG', "Logs");
+define('_AM_USERLOG_STATS_LOGDEL', "Deleted logs");
+define('_AM_USERLOG_STATS_SET', "Sets");
+define('_AM_USERLOG_STATS_FILE', "Files");
+define('_AM_USERLOG_STATS_FILEALL', "Files in all paths");
+define('_AM_USERLOG_STATS_VIEWS', "Views");
// %3\$s for above
-define("_AM_USERLOG_ALL","All Times");
-define("_AM_USERLOG_TODAY","Today");
-define("_AM_USERLOG_WEEK","This week");
-define("_AM_USERLOG_MONTH","This Month");
-
+define('_AM_USERLOG_ALL', "All Times");
+define('_AM_USERLOG_TODAY', "Today");
+define('_AM_USERLOG_WEEK', "This week");
+define('_AM_USERLOG_MONTH', "This Month");
// index.php summary
-define("_AM_USERLOG_SUMMARY","Some examples of criteria you can use to get logs");
-define("_AM_USERLOG_SUMMARY_DELETED","Deleted items from your database");
-define("_AM_USERLOG_SUMMARY_ADMIN","Admin user activities");
-define("_AM_USERLOG_SUMMARY_GOOGLE","Users who come to your site from Google.");
-
+define('_AM_USERLOG_SUMMARY', "Some examples of criteria you can use to get logs");
+define('_AM_USERLOG_SUMMARY_DELETED', "Deleted items from your database");
+define('_AM_USERLOG_SUMMARY_ADMIN', "Admin user activities");
+define('_AM_USERLOG_SUMMARY_GOOGLE', "Users who come to your site from Google.");
// file.php
-define("_AM_USERLOG_FILE_ACTION","Select one action");
-define("_AM_USERLOG_FILE_SELECT_ONE","You must select one file.");
-define("_AM_USERLOG_FILE_RENAME","Rename");
-define("_AM_USERLOG_FILE_COPY","Copy");
-define("_AM_USERLOG_FILE_ZIP","Compress(Zip)");
-define("_AM_USERLOG_FILE_MERGE","Merge");
-define("_AM_USERLOG_FILE_EXPORT_CSV","Export to CSV");
-define("_AM_USERLOG_FILE_FILENAME","Enter the result file name. e.g.: myfile");
-define("_AM_USERLOG_FILE_FILENAME_DSC","Advise: Leave it empty to auto generate by using the current criteria and date. If you enter an already existed file name for zip file, new files will be added/overwritten in old archive file.");
-define("_AM_USERLOG_FILE_MERGE_SUCCESS","%1\$d files merged successfully into %2\$s");
-define("_AM_USERLOG_FILE_DELETE_SUCCESS","%1\$d files deleted successfully.");
-define("_AM_USERLOG_FILE_RENAME_SUCCESS","file %1\$s renamed successfully into %2\$s");
-define("_AM_USERLOG_FILE_COPY_SUCCESS","file %1\$s copied successfully into %2\$s");
-define("_AM_USERLOG_FILE_ZIP_SUCCESS","%1\$d files zipped successfully into %2\$s");
-define("_AM_USERLOG_FILE_EXOPORT_SUCCESS","%1\$d files exported successfully into %2\$s");
-define("_AM_USERLOG_FILE_CONFIRM","Are you sure you want to do this action?");
-
+define('_AM_USERLOG_FILE_ACTION', "Select one action");
+define('_AM_USERLOG_FILE_SELECT_ONE', "You must select one file.");
+define('_AM_USERLOG_FILE_RENAME', "Rename");
+define('_AM_USERLOG_FILE_COPY', "Copy");
+define('_AM_USERLOG_FILE_ZIP', "Compress (Zip)");
+define('_AM_USERLOG_FILE_MERGE', "Merge");
+define('_AM_USERLOG_FILE_EXPORT_CSV', "Export to CSV");
+define('_AM_USERLOG_FILE_FILENAME', "Enter the result file name, e.g.: myfile");
+define('_AM_USERLOG_FILE_FILENAME_DSC', "Advise: Leave it empty to auto generate by using the current criteria and date. If you enter an already existed file name for zip file, new files will be added/overwritten in old archive file.");
+define('_AM_USERLOG_FILE_MERGE_SUCCESS', "%1\$d files merged successfully into %2\$s");
+define('_AM_USERLOG_FILE_DELETE_SUCCESS', "%1\$d files deleted successfully.");
+define('_AM_USERLOG_FILE_RENAME_SUCCESS', "file %1\$s renamed successfully into %2\$s");
+define('_AM_USERLOG_FILE_COPY_SUCCESS', "file %1\$s copied successfully into %2\$s");
+define('_AM_USERLOG_FILE_ZIP_SUCCESS', "%1\$d files zipped successfully into %2\$s");
+define('_AM_USERLOG_FILE_EXOPORT_SUCCESS', "%1\$d files exported successfully into %2\$s");
+define('_AM_USERLOG_FILE_CONFIRM', "Are you sure you want to do this action?");
// stats.php, views block
-define("_AM_USERLOG_MODULES","Select modules");
-define("_AM_USERLOG_ITEMS","Select items");
-define("_AM_USERLOG_ITEMS_DSC","These are typical links of your active modules.");
-define("_AM_USERLOG_ITEMS_NUM","Number of items to display.");
-define("_AM_USERLOG_CONFIG_CHMOD_ERROR","Could not create any folder inside '%1\$s' because its chmod is under %2\$d.");
-define("_AM_USERLOG_CONFIG_CREATE_FOLDER","If you need to store logs in file, you should create folder '%1\$s' and set chmod = %2\$d manually using Cpanel.");
-define("_AM_USERLOG_LOGIN_REG_HISTORY","Login/Register History");
-
-// stats.php, login_reg_history block
-define("_AM_USERLOG_FAIL","failed");
-define("_AM_USERLOG_SUCCESS","successful");
+define('_AM_USERLOG_MODULES', "Select modules");
+define('_AM_USERLOG_ITEMS', "Select items");
+define('_AM_USERLOG_ITEMS_DSC', "These are typical links of your active modules.");
+define('_AM_USERLOG_ITEMS_NUM', "Number of items to display.");
+define('_AM_USERLOG_CONFIG_CHMOD_ERROR', "Could not create any folder inside '%1\$s' because its chmod is under %2\$d.");
+define('_AM_USERLOG_CONFIG_CREATE_FOLDER', "If you need to store logs in file, you should create folder '%1\$s' and set chmod = %2\$d manually using Cpanel.");
\ No newline at end of file
Modified: XoopsModules/userlog/trunk/userlog/language/english/modinfo.php
===================================================================
--- XoopsModules/userlog/trunk/userlog/language/english/modinfo.php 2013-10-04 17:31:25 UTC (rev 12129)
+++ XoopsModules/userlog/trunk/userlog/language/english/modinfo.php 2013-10-04 20:41:45 UTC (rev 12130)
@@ -19,71 +19,60 @@
* @author The XOOPS Project <www.xoops.org> <www.xoops.ir>
* @version $Id: modinfo.php 1 2013-02-26 16:25:04Z irmtfan $
*/
-
// The name of this module
-define("_MI_USERLOG_NAME","Userlog");
+define('_MI_USERLOG_NAME', "Userlog");
// A brief description of this module
-define("_MI_USERLOG_DSC","Log user/visitor activities and navigations");
-
+define('_MI_USERLOG_DSC', "Log user/visitor activities and navigations");
// configs
// config status
-define("_MI_USERLOG_STATUS","Log status:");
-define("_MI_USERLOG_STATUS_DSC","Active: Module will do its job. Idle:The module will not log anything");
-define("_MI_USERLOG_ACTIVE","Active");
-define("_MI_USERLOG_IDLE","Idle");
-define("_MI_USERLOG_POSTLOG","Log any POST method?");
-define("_MI_USERLOG_POSTLOG_DSC","In some weird situations (eg: send a pm, custom forms, hacks, ported modules like mediawiki, ...), there is no redirect message after submit. If you want to log any POST method regardless of redirect message set it to yes.");
-
+define('_MI_USERLOG_STATUS', "Log status:");
+define('_MI_USERLOG_STATUS_DSC', "Active: Module will do its job. Idle: The module will not log anything");
+define('_MI_USERLOG_ACTIVE', "Active");
+define('_MI_USERLOG_IDLE', "Idle");
// config categories
-define("_MI_USERLOG_CONFCAT_LOGFILE","Log file settings");
-define("_MI_USERLOG_CONFCAT_LOGFILE_DSC","Log file (Set it if you need to store logs in a file, otherwise ignore it)");
-define("_MI_USERLOG_CONFCAT_FORMAT","Format");
-define("_MI_USERLOG_CONFCAT_FORMAT_DSC","Format settings");
-define("_MI_USERLOG_CONFCAT_PAGENAV","Page navigation");
-define("_MI_USERLOG_CONFCAT_PAGENAV_DSC","Page navigation settings");
-define("_MI_USERLOG_CONFCAT_LOGDB","Log database settings");
-define("_MI_USERLOG_CONFCAT_LOGDB_DSC","Log database (Set it if you need to store logs in database, otherwise ignore it)");
-define("_MI_USERLOG_CONFCAT_PROB","Probability settings");
-define("_MI_USERLOG_CONFCAT_PROB_DSC","Probability to work on database.(These default numbers are recommended for a high traffic website. e.g.: more than 30,000 hits per day)");
-
+define('_MI_USERLOG_CONFCAT_LOGFILE', "Log file (Set it if you need to store logs in a file, otherwise ignore it)");
+define('_MI_USERLOG_CONFCAT_LOGFILE_DSC', "Preferences for Log file");
+define('_MI_USERLOG_CONFCAT_FORMAT', "Format");
+define('_MI_USERLOG_CONFCAT_FORMAT_DSC', "Preferences for format");
+define('_MI_USERLOG_CONFCAT_PAGENAV', "Page navigation");
+define('_MI_USERLOG_CONFCAT_PAGENAV_DSC', "Preferences for page navigation");
+define('_MI_USERLOG_CONFCAT_LOGDB', "Log database (Set it if you need to store logs in database, otherwise ignore it)");
+define('_MI_USERLOG_CONFCAT_LOGDB_DSC', "Preferences for Log database");
+define('_MI_USERLOG_CONFCAT_PROB', "Probability to work on database (These default numbers are recommended for a high traffic website, e.g.: more than 30,000 hits per day).");
+define('_MI_USERLOG_CONFCAT_PROB_DSC', "Preferences for Probability");
// config logfile
-define("_MI_USERLOG_MAXLOGFILESIZE","Maximum file size for current working Log file (in bytes)");
-define("_MI_USERLOG_MAXLOGFILESIZE_DSC","Advise: Set it below 1MB because some servers set limitations for viewing large files in CPanel.");
-define("_MI_USERLOG_LOGFILEPATH","Log file full path");
-define("_MI_USERLOG_LOGFILEPATH_DSC","Advise: a path outside wwwroot is safe from browsing by everybody");
-define("_MI_USERLOG_LOGFILENAME","Current working Log file name");
-define("_MI_USERLOG_LOGFILENAME_DSC","Older Log files will be stored with this prefix: Log_file_name_date('Y-m-d_H-i-s').log");
+define('_MI_USERLOG_MAXLOGFILESIZE', "Maximum file size for current working Log file (in bytes)");
+define('_MI_USERLOG_MAXLOGFILESIZE_DSC', "Advise: Set it below 1MB because some servers set limitations for viewing large files in CPanel.");
+define('_MI_USERLOG_LOGFILEPATH', "Log file full path");
+define('_MI_USERLOG_LOGFILEPATH_DSC', "Advise: a path outside wwwroot is safe from browsing by everybody");
+define('_MI_USERLOG_LOGFILENAME', "Current working Log file name");
+define('_MI_USERLOG_LOGFILENAME_DSC', "Older Log files will be stored with this prefix: Log_file_name_date('Y-m-d_H-i-s').log");
// config format
-define("_MI_USERLOG_DATEFORMAT","Date format");
-define("_MI_USERLOG_DATEFORMAT_DSC","If you leave it empty, this module will use Core default");
-define("_MI_USERLOG_DATEFORMAT_HISTORY","Date format for historical times. eg: 1 day ago");
-
+define('_MI_USERLOG_DATEFORMAT', "Date format");
+define('_MI_USERLOG_DATEFORMAT_DSC', "If you leave it empty, this module will use Core default");
// config pagenav
-define("_MI_USERLOG_SETS_PERPAGE","Number of settings per page");
-define("_MI_USERLOG_SETS_PERPAGE_DSC","The default value for viewing settings");
-define("_MI_USERLOG_LOGS_PERPAGE","Number of logs per page");
-define("_MI_USERLOG_LOGS_PERPAGE_DSC","The default value for viewing logs");
-define("_MI_USERLOG_ENGINE","Select the default engine for browsing logs");
-define("_MI_USERLOG_ENGINE_DSC","This will be the default engine in logs browsing.");
-define("_MI_USERLOG_FILE","Select the default files for browsing logs");
-define("_MI_USERLOG_FILE_DSC","This will be the default files in logs browsing.");
-
+define('_MI_USERLOG_SETS_PERPAGE', "Number of settings per page");
+define('_MI_USERLOG_SETS_PERPAGE_DSC', "The default value for viewing settings");
+define('_MI_USERLOG_LOGS_PERPAGE', "Number of logs per page");
+define('_MI_USERLOG_LOGS_PERPAGE_DSC', "The default value for viewing logs");
+define('_MI_USERLOG_ENGINE', "Select the default engine for browsing logs");
+define('_MI_USERLOG_ENGINE_DSC', "This will be the default engine in logs browsing.");
+define('_MI_USERLOG_FILE', "Select the default files for browsing logs");
+define('_MI_USERLOG_FILE_DSC', "This will be the default files in logs browsing.");
// config logdb
-define("_MI_USERLOG_MAXLOGS","Maximum logs stored in database");
-define("_MI_USERLOG_MAXLOGS_DSC","Logs will be deleted from database after reaching this number");
-define("_MI_USERLOG_MAXLOGSPERIOD","Maximum time that logs are stored in the database. 0 = store forever");
-define("_MI_USERLOG_MAXLOGSPERIOD_DSC","Logs older than this period will be deleted from database. Positive for days and negative for hours. Advise: use a large number");
+define('_MI_USERLOG_MAXLOGS', "Maximum logs stored in database");
+define('_MI_USERLOG_MAXLOGS_DSC', "Logs will be deleted from database after reaching this number");
+define('_MI_USERLOG_MAXLOGSPERIOD', "Maximum time that logs are stored in the database. 0 = store forever");
+define('_MI_USERLOG_MAXLOGSPERIOD_DSC', "Logs older than this period will be deleted from database. Positive for days and negative for hours. Advise: use a large number");
// config probability
-define("_MI_USERLOG_PROBSET","Probability to check database for a match setting");
-define("_MI_USERLOG_PROBSET_DSC","Probability percentage to check database ONLY if it didnt find any setting in cache files for the current visitor/user. 20 means in one of each 5 hits it will check.");
-define("_MI_USERLOG_PROBSTATS","Probability to update statistics in database when the visitor is logged.");
-define("_MI_USERLOG_PROBSTATS_DSC","Probability percentage to update database logs. 10 means in 1 of each 10 visits of a visitor who have a match setting, it will update statistics. 0 means no update so you should manually update by visiting userlog > admin > home.");
-define("_MI_USERLOG_PROBSTATSALLHIT","Probability to update statistics in database in each hit.");
-define("_MI_USERLOG_PROBSTATSALLHIT_DSC","Probability percentage to update database logs. 1 means in 1 of each 100 hits it will update statistics.0 means no update so you should manually update by visiting userlog > admin > home. Advise: set a low percentage based on your website traffic.");
-
+define('_MI_USERLOG_PROBSET', "Probability to check database for a match setting");
+define('_MI_USERLOG_PROBSET_DSC', "Probability percentage to check database ONLY if it didnt find any setting in cache files for the current visitor/user. 20 means in one of each 5 hits it will check.");
+define('_MI_USERLOG_PROBSTATS', "Probability to update statistics in database when the visitor is logged.");
+define('_MI_USERLOG_PROBSTATS_DSC', "Probability percentage to update database logs. 10 means in 1 of each 10 visits of a visitor who have a match setting, it will update statistics. 0 means no update so you should manually update by visiting userlog > admin > home.");
+define('_MI_USERLOG_PROBSTATSALLHIT', "Probability to update statistics in database in each hit.");
+define('_MI_USERLOG_PROBSTATSALLHIT_DSC', "Probability percentage to update database logs. 1 means in 1 of each 100 hits it will update statistics.0 means no update so you should manually update by visiting userlog > admin > home. Advise: set a low percentage based on your website traffic.");
// blocks
-define("_MI_USERLOG_BLOCK_VIEWS","All views in site");
-define("_MI_USERLOG_BLOCK_VIEWS_DSC","Show views in the whole site");
-
+define('_MI_USERLOG_BLOCK_VIEWS', "All views in site");
+define('_MI_USERLOG_BLOCK_VIEWS_DSC', "Show views in the whole site");
// webmaster permission
-define("_MI_USERLOG_WEBMASTER_NOPERM","You are one of the webmasters but dont have permission to access this area. please contact to webmasters with %1\$s uids or webmasters belong to %2\$s admin groups for more information.");
\ No newline at end of file
+define('_MI_USERLOG_WEBMASTER_NOPERM', "You are one of the webmasters but don't have permission to access this area. Please contact webmasters with %1\$s UID or webmasters belong to %2\$s admin groups for more information.");
\ No newline at end of file
|
|
From: <luc...@us...> - 2013-10-04 17:31:28
|
Revision: 12129
http://sourceforge.net/p/xoops/svn/12129
Author: luciorota
Date: 2013-10-04 17:31:25 +0000 (Fri, 04 Oct 2013)
Log Message:
-----------
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/index.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/index.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2013-10-04 16:59:25 UTC (rev 12128)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2013-10-04 17:31:25 UTC (rev 12129)
@@ -18,7 +18,7 @@
* @author Xoops Development Team
* @version svn:$id$
*/
-$currentFile = basename(__FILE__);
+$currentFile = pathinfo(__FILE__, PATHINFO_BASENAME);
include 'header.php';
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
|
|
From: <luc...@us...> - 2013-10-04 16:59:28
|
Revision: 12128
http://sourceforge.net/p/xoops/svn/12128
Author: luciorota
Date: 2013-10-04 16:59:25 +0000 (Fri, 04 Oct 2013)
Log Message:
-----------
fixed bugs but still in progress... import procedure doesn't copy files on filesystem... import procedure doesn't import permissions too ... lot of improvements to do... :-(
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php 2013-10-04 16:53:05 UTC (rev 12127)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/import.php 2013-10-04 16:59:25 UTC (rev 12128)
@@ -21,6 +21,23 @@
$currentFile = basename(__FILE__);
include_once dirname(__FILE__) . '/admin_header.php';
+if (!is_dir($wfdownloads->getConfig('uploaddir'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_UPLOADDIRNOTEXISTS);
+ exit();
+}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('mainimagedir'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_MAINIMAGEDIRNOTEXISTS);
+ exit();
+}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('screenshots'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_SCREENSHOTSDIRNOTEXISTS);
+ exit();
+}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('catimage'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_CATIMAGEDIRNOTEXISTS);
+ exit();
+}
+
include_once(WFDOWNLOADS_ROOT_PATH . "/include/module.php");
$op = WfdownloadsRequest::getString('op', 'import.menu');
@@ -28,10 +45,6 @@
case "import.MyDownloads" :
$ok = WfdownloadsRequest::getBool('ok', false, 'POST');
if ($ok == true) {
- // Make sure that nohtml is properly changed to dohtml
- invert_nohtm_dohtml_values();
- // Ensure that the proper tables are present
- update_tables_to_300();
// Import data from MyDownloads
import_mydownloads_to_wfdownloads();
// Downloads imported
@@ -47,10 +60,6 @@
case "import.PD-Downloads" :
$ok = WfdownloadsRequest::getBool('ok', false, 'POST');
if ($ok == true) {
- // Make sure that nohtml is properly changed to dohtml
- invert_nohtm_dohtml_values();
- // Ensure that the proper tables are present
- update_tables_to_300();
// Import data from PD-Downloads
import_pddownloads_to_wfdownloads();
// Downloads imported
@@ -66,10 +75,6 @@
case "import.wmpownloads" :
$ok = WfdownloadsRequest::getBool('ok', false, 'POST');
if ($ok == true) {
- // Make sure that nohtml is properly changed to dohtml
- invert_nohtm_dohtml_values();
- // Ensure that the proper tables are present
- update_tables_to_300();
// Import data from wmpownloads
import_wmpdownloads_to_wfdownloads();
// Downloads imported
@@ -85,18 +90,16 @@
case "import.wfd322" :
$ok = WfdownloadsRequest::getBool('ok', false, 'POST');
if ($ok == true) {
- // Make sure that nohtml is properly changed to dohtml
- invert_nohtm_dohtml_values();
- // Ensure that the proper tables are present
- update_tables_to_300();
- // Import data from wmpownloads
+ // Import data from wfd322
+ wfdownloads_xoops_cp_header();
import_wfd_to_wfdownloads();
+ xoops_cp_footer();
// Downloads imported
- redirect_header($currentFile, 1, _AM_WFDOWNLOADS_IMPORT_IMPORT_OK);
+ //redirect_header($currentFile, 1, _AM_WFDOWNLOADS_IMPORT_IMPORT_OK);
exit();
} else {
wfdownloads_xoops_cp_header();
- xoops_confirm(array('op' => 'import.wfdownloads', 'ok' => true), $currentFile, _AM_WFDOWNLOADS_IMPORT_RUSURE);
+ xoops_confirm(array('op' => 'import.wfd322', 'ok' => true), $currentFile, _AM_WFDOWNLOADS_IMPORT_RUSURE);
xoops_cp_footer();
}
break;
@@ -111,56 +114,61 @@
include XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
$form = new XoopsThemeForm(_AM_WFDOWNLOADS_IMPORT_BUTTON_IMPORT, "form", $_SERVER['REQUEST_URI']);
-
// Avoid module to import form itself
- //Is wfdownloads installed?
+ // Is wf-downloads installed?
if ($wfdownloads->getModule()->dirname() != "wf"."downloads") {
$got_options = false;
if (wfdownloads_checkModule('wf'.'downloads')) {
$moduleVersion = round(wfdownloads_checkModule('wf'.'downloads') / 100, 2);
- $wfdButton = new XoopsFormButton(_AM_WFDOWNLOADS_IMPORT_WFD . '<br />' . $moduleVersion, "wmp_button", _AM_WFDOWNLOADS_IMPORT_BUTTON_IMPORT, "submit");
- $wfdButton->setExtra("onclick='document.forms.form.op.value=\"import.wfd322\"'");
- $form->addElement($wfdButton);
+ $button = new XoopsFormButton(_AM_WFDOWNLOADS_IMPORT_WFD . '<br />' . $moduleVersion, "wmp_button", _AM_WFDOWNLOADS_IMPORT_BUTTON_IMPORT, "submit");
+ $button->setExtra("onclick='document.forms.form.op.value=\"import.wfd322\"'");
+ $form->addElement($button);
+ unset($button);
} else {
- $wfdLabel = new XoopsFormLabel(_AM_WFDOWNLOADS_IMPORT_WFD, _AM_WFDOWNLOADS_IMPORT_WFD_NOTFOUND);
- $form->addElement($wfdLabel);
+ $label = new XoopsFormLabel(_AM_WFDOWNLOADS_IMPORT_WFD, _AM_WFDOWNLOADS_IMPORT_WFD_NOTFOUND);
+ $form->addElement($label);
+ unset($label);
}
}
-
//Is MyDownloads installed?
$got_options = false;
if (wfdownloads_checkModule('mydownloads')) {
$moduleVersion = round(wfdownloads_checkModule('mydownloads') / 100, 2);
- $sourceButton = new XoopsFormButton(_AM_WFDOWNLOADS_IMPORT_MYDOWNLOADS . '<br />' . $moduleVersion, "myd_button", _AM_WFDOWNLOADS_IMPORT_BUTTON_IMPORT, "submit");
- $sourceButton->setExtra("onclick='document.forms.form.op.value=\"import.MyDownloads\"'");
- $form->addElement($sourceButton);
+ $button = new XoopsFormButton(_AM_WFDOWNLOADS_IMPORT_MYDOWNLOADS . '<br />' . $moduleVersion, "myd_button", _AM_WFDOWNLOADS_IMPORT_BUTTON_IMPORT, "submit");
+ $button->setExtra("onclick='document.forms.form.op.value=\"import.MyDownloads\"'");
+ $form->addElement($button);
+ unset($button);
} else {
- $sourceLabel = new XoopsFormLabel(_AM_WFDOWNLOADS_IMPORT_MYDOWNLOADS, _AM_WFDOWNLOADS_IMPORT_MYDOWNLOADS_NOTFOUND);
- $form->addElement($sourceLabel);
+ $label = new XoopsFormLabel(_AM_WFDOWNLOADS_IMPORT_MYDOWNLOADS, _AM_WFDOWNLOADS_IMPORT_MYDOWNLOADS_NOTFOUND);
+ $form->addElement($label);
+ unset($label);
}
//Is PD-Downloads installed?
$got_options = false;
if (wfdownloads_checkModule('PDdownloads')) {
$moduleVersion = round(wfdownloads_checkModule('PDdownloads') / 100, 2);
- $sourceButton = new XoopsFormButton(_AM_WFDOWNLOADS_IMPORT_PDDOWNLOADS . '<br />' . $moduleVersion, "pd_button", _AM_WFDOWNLOADS_IMPORT_BUTTON_IMPORT, "submit");
- $sourceButton->setExtra("onclick='document.forms.form.op.value=\"import.PD-Downloads\"'");
- $form->addElement($sourceButton);
+ $button = new XoopsFormButton(_AM_WFDOWNLOADS_IMPORT_PDDOWNLOADS . '<br />' . $moduleVersion, "pd_button", _AM_WFDOWNLOADS_IMPORT_BUTTON_IMPORT, "submit");
+ $button->setExtra("onclick='document.forms.form.op.value=\"import.PD-Downloads\"'");
+ $form->addElement($button);
+ unset($button);
} else {
- $sourceLabel = new XoopsFormLabel(_AM_WFDOWNLOADS_IMPORT_PDDOWNLOADS, _AM_WFDOWNLOADS_IMPORT_PDDOWNLOADS_NOTFOUND);
- $form->addElement($sourceLabel);
+ $label = new XoopsFormLabel(_AM_WFDOWNLOADS_IMPORT_PDDOWNLOADS, _AM_WFDOWNLOADS_IMPORT_PDDOWNLOADS_NOTFOUND);
+ $form->addElement($label);
+ unset($label);
}
-
//Is wmpownloads installed?
$got_options = false;
if (wfdownloads_checkModule('wmpdownloads')) {
$moduleVersion = round(wfdownloads_checkModule('wmpdownloads') / 100, 2);
- $sourceButton = new XoopsFormButton(_AM_WFDOWNLOADS_IMPORT_WMPOWNLOADS . '<br />' . $moduleVersion, "wmp_button", _AM_WFDOWNLOADS_IMPORT_BUTTON_IMPORT, "submit");
- $sourceButton->setExtra("onclick='document.forms.form.op.value=\"import.wmpownloads\"'");
- $form->addElement($sourceButton);
+ $button = new XoopsFormButton(_AM_WFDOWNLOADS_IMPORT_WMPOWNLOADS . '<br />' . $moduleVersion, "wmp_button", _AM_WFDOWNLOADS_IMPORT_BUTTON_IMPORT, "submit");
+ $button->setExtra("onclick='document.forms.form.op.value=\"import.wmpownloads\"'");
+ $form->addElement($button);
+ unset($button);
} else {
- $sourceLabel = new XoopsFormLabel(_AM_WFDOWNLOADS_IMPORT_WMPOWNLOADS, _AM_WFDOWNLOADS_IMPORT_WMPOWNLOADS_NOTFOUND);
- $form->addElement($sourceLabel);
+ $label = new XoopsFormLabel(_AM_WFDOWNLOADS_IMPORT_WMPOWNLOADS, _AM_WFDOWNLOADS_IMPORT_WMPOWNLOADS_NOTFOUND);
+ $form->addElement($label);
+ unset($label);
}
$form->addElement(new XoopsFormHidden('op', 0));
@@ -191,16 +199,6 @@
// function import_wmpdownloads_to_wfdownloads
// This one is needed to import data from wmpdownloads
//
-// function update_tables_to_300
-// This function will convert any WF-Downloads 2.x format to 3.00 format
-//
-// function invert_nohtm_dohtml_values
-// In WF-Downloads 3.00 some fieldnames have been changed and the namechange
-// comes along with a change of logic (0=yes;1=no --> 0=no;1=yes)
-// So the values need to be changed accordingly which is what this
-// function is doing. It needs to be run before "convert_tables_2x_to_300"
-// since it is based on the old fieldnamessince
-
// =========================================================================================
// This function imports data from WF-Downloads
// =========================================================================================
@@ -210,83 +208,103 @@
echo "<br /><b>Importing Data</b><br />";
$destination = array(
- "cat" => $xoopsDB -> prefix("wfdownloads_cat"),
- "downloads" => $xoopsDB -> prefix("wfdownloads_downloads"),
- "broken" => $xoopsDB -> prefix("wfdownloads_broken"),
- "mod" => $xoopsDB -> prefix("wfdownloads_mod"),
- "votes" => $xoopsDB -> prefix("wfdownloads_votedata"));
+ "cat" => $xoopsDB->prefix("wfdownloads_cat"),
+ "downloads" => $xoopsDB->prefix("wfdownloads_downloads"),
+ "broken" => $xoopsDB->prefix("wfdownloads_broken"),
+ "mod" => $xoopsDB->prefix("wfdownloads_mod"),
+ "votes" => $xoopsDB->prefix("wfdownloads_votedata"));
$source = array(
- "cat" => $xoopsDB -> prefix("wmpdownloads_cat"),
- "downloads" => $xoopsDB -> prefix("wmpdownloads_downloads"),
- "broken" => $xoopsDB -> prefix("wmpdownloads_broken"),
- "mod" => $xoopsDB -> prefix("wmpdownloads_mod"),
- "votes" => $xoopsDB -> prefix("wmpdownloads_votedata"),
- "text" => $xoopsDB -> prefix("wmpdownloads_text"));
+ "cat" => $xoopsDB ->prefix("wf"."downloads_cat"),
+ "downloads" => $xoopsDB->prefix("wf"."downloads_downloads"),
+ "broken" => $xoopsDB->prefix("wf"."downloads_broken"),
+ "mod" => $xoopsDB->prefix("wf"."downloads_mod"),
+ "votes" => $xoopsDB->prefix("wf"."downloads_votedata"));
//Add temporary field to category table
- $xoopsDB->query("ALTER TABLE ".$destination['cat']." ADD `old_cid` int NOT NULL default 0");
- $xoopsDB->query("ALTER TABLE ".$destination['cat']." ADD `old_pid` int NOT NULL default 0");
+ $xoopsDB->query("ALTER TABLE " . $destination['cat'] . " ADD `old_cid` int NOT NULL default 0");
+ $xoopsDB->query("ALTER TABLE " . $destination['cat'] . " ADD `old_pid` int NOT NULL default 0");
//Add temporary fields to downloads table
- $xoopsDB->query("ALTER TABLE ".$destination['downloads']." ADD `old_lid` int NOT NULL default 0,
- ADD `old_cid` int NOT NULL default 0");
+ $xoopsDB->query("ALTER TABLE " . $destination['downloads'] . " ADD `old_lid` int NOT NULL default 0");
+ $xoopsDB->query("ALTER TABLE " . $destination['downloads'] . " ADD `old_cid` int NOT NULL default 0");
//Get latest mod request ID to determine which records will need an updated lid value afterwards
- $result = $xoopsDB->query("SELECT MAX(requestid) FROM ".$destination['mod']);
+ $result = $xoopsDB->query("SELECT MAX(requestid) FROM " . $destination['mod']);
list($max_requestid) = $xoopsDB->fetchRow($result);
//Get latest report ID to determine, which records will need an updated lid value afterwards
- $result = $xoopsDB->query("SELECT MAX(reportid) FROM ".$destination['broken']);
+ $result = $xoopsDB->query("SELECT MAX(reportid) FROM " . $destination['broken']);
list($max_reportid) = $xoopsDB->fetchRow($result);
//Get latest vote ID to determine which records will need an updated lid value afterwards
- $result = $xoopsDB->query("SELECT MAX(ratingid) FROM ".$destination['votes']);
+ $result = $xoopsDB->query("SELECT MAX(ratingid) FROM " . $destination['votes']);
list($max_ratingid) = $xoopsDB->fetchRow($result);
//Import data into category table
- $xoopsDB->query("INSERT INTO ".$destination['cat']." (`old_cid`, `old_pid`, `title`, `imgurl`, `summary`) SELECT `cid`, `pid`, `title`, `imgurl`, '' FROM ".$source['cat']);
- echo "Imported ".$xoopsDB->getAffectedRows()." categories into ".$destination['cat']."<br />";
+ $sql = "INSERT INTO " . $destination['cat'] . " (";
+ $sql.= "`old_cid`, `old_pid`, `title`, `imgurl`, `summary`";
+ $sql.= ") SELECT ";
+ $sql.= "`cid`, `pid`, `title`, `imgurl`, `summary`";
+ $sql.= "FROM " . $source['cat'];
+ $xoopsDB->query($sql);
+ echo "Imported " . $xoopsDB->getAffectedRows() . " categories into " . $destination['cat'] . "<br />";
//Import data into downloads table
- $xoopsDB->query("INSERT INTO ".$destination['downloads']." (`cid`, `old_lid`, `old_cid`, `title`, `url`, `homepage`, `version`, `size`, `platform`, `screenshot`, `submitter`, `status`, `published`, `hits`, `rating`, `votes`, `comments`, `features`, `requirements`, `dhistory`, `summary`, `description`)
- SELECT 0,`lid`, `cid`, `title`, `url`, `homepage`, `version`, `size`, `platform`, `logourl`, `submitter`, `status`, `date`, `hits`, `rating`, `votes`, `comments`, '', '','','', '' FROM ".$source['downloads']);
- echo "Imported ".$xoopsDB->getAffectedRows()." downloads into ".$destination['downloads']."<br />";
+ $xoopsDB->query("
+ INSERT INTO " . $destination['downloads'] . " (
+ `cid`, `old_lid`, `old_cid`, `title`, `url`, `homepage`, `version`, `size`, `platform`, `screenshot`, `screenshot2`, `screenshot3`, `screenshot4`, `submitter`, `status`, `published`, `hits`, `rating`, `votes`, `comments`, `features`, `requirements`, `dhistory`, `summary`, `description`)
+ SELECT
+ 0, `lid`, `cid`, `title`, `url`, `homepage`, `version`, `size`, `platform`, `screenshot`, `screenshot2`, `screenshot3`, `screenshot4`, `submitter`, `status`, `published`, `hits`, `rating`, `votes`, `comments`, `features`, `requirements`, `dhistory`, `summary`, `description`
+ FROM " . $source['downloads']);
+ echo "Imported " . $xoopsDB->getAffectedRows() . " downloads into " . $destination['downloads'] . "<br />";
//Import data into brokens table
- $xoopsDB->query("INSERT INTO ".$destination['broken']." (`lid`, `sender`, `ip`)
- SELECT `lid`, `sender`, `ip` FROM ".$source['broken']);
- echo "Imported ".$xoopsDB->getAffectedRows()." broken reports into ".$destination['broken']."<br />";
+ $xoopsDB->query("
+ INSERT INTO " . $destination['broken'] . " (
+ `lid`, `sender`, `ip`)
+ SELECT
+ `lid`, `sender`, `ip`
+ FROM " . $source['broken']);
+ echo "Imported " . $xoopsDB->getAffectedRows()." broken reports into " . $destination['broken'] . "<br />";
//Import data into votedata table
- $xoopsDB->query("INSERT INTO ".$destination['votes']." (`lid`, `ratinguser`, `rating`, `ratinghostname`, `ratingtimestamp`)
- SELECT `lid`, `ratinguser`, `rating`, `ratinghostname`, `ratingtimestamp` FROM ".$source['votes']);
- echo "Imported ".$xoopsDB->getAffectedRows()." votes into ".$destination['votes']."<br />";
+ $xoopsDB->query("
+ INSERT INTO " . $destination['votes'] . " (
+ `lid`, `ratinguser`, `rating`, `ratinghostname`, `ratingtimestamp`)
+ SELECT
+ `lid`, `ratinguser`, `rating`, `ratinghostname`, `ratingtimestamp`
+ FROM " . $source['votes']);
+ echo "Imported " . $xoopsDB->getAffectedRows()." votes into " . $destination['votes'] . "<br />";
//Import data into mod request table
- $xoopsDB->query("INSERT INTO ".$destination['mod']." (`lid`, `cid`, `title`, `url`, `homepage`, `version`, `size`, `platform`, `screenshot`, `description`, `modifysubmitter`,`features`, `requirements`, `publisher`, `dhistory`, `summary`)
- SELECT `lid`, `cid`, `title`, `url`, `homepage`, `version`, `size`, `platform`, `logourl`, `description`, `modifysubmitter`,'','','','','' FROM ".$source['mod']);
- echo "Imported ".$xoopsDB->getAffectedRows()." modification requests into ".$destination['mod']."<br />";
+ $xoopsDB->query("
+ INSERT INTO " . $destination['mod'] . " (
+ `lid`, `cid`, `title`, `url`, `homepage`, `version`, `size`, `platform`, `screenshot`, `description`, `modifysubmitter`, `features`, `requirements`, `publisher`, `dhistory`, `summary`)
+ SELECT
+ `lid`, `cid`, `title`, `url`, `homepage`, `version`, `size`, `platform`, `screenshot`, `description`, `modifysubmitter`, `features`, `requirements`, `publisher`, `dhistory`, `summary`
+ FROM " . $source['mod']);
+ echo "Imported " . $xoopsDB->getAffectedRows() . " modification requests into " . $destination['mod'] . "<br />";
//Update category ID to new value
- $xoopsDB->query("UPDATE ".$destination['downloads']." d, ".$destination['cat']." c SET d.cid=c.cid WHERE d.old_cid=c.old_cid AND d.old_cid != 0");
- $xoopsDB->query("UPDATE ".$destination['cat']." c1, ".$destination['cat']." c2 SET c1.pid=c2.cid WHERE c1.old_pid=c2.old_cid AND c1.old_pid != 0");
+ $xoopsDB->query("UPDATE " . $destination['downloads'] . " d, " . $destination['cat'] . " c SET d.cid=c.cid WHERE d.old_cid=c.old_cid AND d.old_cid != 0");
+ $xoopsDB->query("UPDATE " . $destination['cat'] . " c1, " . $destination['cat'] . " c2 SET c1.pid=c2.cid WHERE c1.old_pid=c2.old_cid AND c1.old_pid != 0");
if ($max_requestid) {
- $xoopsDB->query("UPDATE ".$destination['mod']." m, ".$destination['cat']." c SET m.cid=c.cid WHERE m.requestid > ".$max_requestid." AND c.old_cid=m.cid");
+ $xoopsDB->query("UPDATE " . $destination['mod'] . " m, " . $destination['cat'] . " c SET m.cid=c.cid WHERE m.requestid > " . $max_requestid . " AND c.old_cid=m.cid");
//Update lid values in mod table
- $xoopsDB->query("UPDATE ".$destination['mod']." m, ".$destination['downloads']." d SET m.lid=d.lid WHERE m.requestid > ".$max_requestid." AND m.lid=d.old_lid");
+ $xoopsDB->query("UPDATE " . $destination['mod'] . " m, " . $destination['downloads'] . " d SET m.lid=d.lid WHERE m.requestid > " . $max_requestid . " AND m.lid=d.old_lid");
}
if ($max_ratingid) {
//Update lid values in votedata table
- $xoopsDB->query("UPDATE ".$destination['votes']." v, ".$destination['downloads']." d SET v.lid=d.lid WHERE v.ratingid > ".$max_ratingid." AND v.lid=d.old_lid");
+ $xoopsDB->query("UPDATE " . $destination['votes'] . " v, " . $destination['downloads'] . " d SET v.lid=d.lid WHERE v.ratingid > " . $max_ratingid . " AND v.lid=d.old_lid");
}
if ($max_reportid) {
//Update lid values in brokens table
- $xoopsDB->query("UPDATE ".$destination['broken']." b, ".$destination['downloads']." d SET b.lid=d.lid WHERE b.reportid > ".$max_reportid." AND b.lid=d.old_lid");
+ $xoopsDB->query("UPDATE " . $destination['broken'] . " b, " . $destination['downloads'] . " d SET b.lid=d.lid WHERE b.reportid > " . $max_reportid . " AND b.lid=d.old_lid");
}
//Update description
- $xoopsDB->query("UPDATE ".$destination['downloads']." d, ".$source['text']." t SET d.description=t.description WHERE t.lid=d.old_lid");
+ //$xoopsDB->query("UPDATE " . $destination['downloads'] . " d, " . $source['text'] . " t SET d.description=t.description WHERE t.lid=d.old_lid");
//Remove temporary fields
- $xoopsDB->query("ALTER TABLE .".$destination['cat']." DROP `old_cid`");
- $xoopsDB->query("ALTER TABLE .".$destination['cat']." DROP `old_pid`");
- $xoopsDB->query("ALTER TABLE .".$destination['downloads']." DROP `old_cid`");
- $xoopsDB->query("ALTER TABLE .".$destination['downloads']." DROP `old_lid`");
+ $xoopsDB->query("ALTER TABLE ." . $destination['cat'] . " DROP `old_cid`");
+ $xoopsDB->query("ALTER TABLE ." . $destination['cat'] . " DROP `old_pid`");
+ $xoopsDB->query("ALTER TABLE ." . $destination['downloads'] . " DROP `old_cid`");
+ $xoopsDB->query("ALTER TABLE ." . $destination['downloads'] . " DROP `old_lid`");
}
|
|
From: <luc...@us...> - 2013-10-04 16:53:08
|
Revision: 12127
http://sourceforge.net/p/xoops/svn/12127
Author: luciorota
Date: 2013-10-04 16:53:05 +0000 (Fri, 04 Oct 2013)
Log Message:
-----------
fixed url
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-10-04 16:51:59 UTC (rev 12126)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-10-04 16:53:05 UTC (rev 12127)
@@ -307,7 +307,7 @@
if(isset($countsByLetters[$letter])) {
$letter_array['letter'] = $letter;
$letter_array['count'] = $countsByLetters[$letter];
- $letter_array['url'] = "" . XOOPS_URL . "/modules/wfdownloads/viewcat.php?list={$letter}";
+ $letter_array['url'] = "" . XOOPS_URL . "/modules/" . $wfdownloads->getModule()->dirname() . "/viewcat.php?list={$letter}";
} else {
$letter_array['letter'] = $letter;
$letter_array['count'] = 0;
|
|
From: <luc...@us...> - 2013-10-04 16:52:02
|
Revision: 12126
http://sourceforge.net/p/xoops/svn/12126
Author: luciorota
Date: 2013-10-04 16:51:59 +0000 (Fri, 04 Oct 2013)
Log Message:
-----------
bug fix
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php 2013-10-04 16:48:46 UTC (rev 12125)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php 2013-10-04 16:51:59 UTC (rev 12126)
@@ -52,7 +52,7 @@
$message = "";
if (is_dir(XOOPS_ROOT_PATH . '/modules/' . strtolower($cloneDirname))) {
- $message .= sprintf(_AM_WFDOWNLOADS_CLONE_CONGRAT, "<a href='" . XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin'>" . ucfirst(strtolower($cloneDirname)) . "</a>") . "<br />\n";
+ $message .= sprintf(_AM_WFDOWNLOADS_CLONE_CONGRAT, "<a href='" . XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=installlist'>" . ucfirst(strtolower($cloneDirname)) . "</a>") . "<br />\n";
if (!$logocreated) {
$message .= _AM_WFDOWNLOADS_CLONE_IMAGEFAIL;
}
@@ -131,6 +131,8 @@
function wfdownloads_createLogo($dirname)
{
+ $wfdownloads = WfdownloadsWfdownloads::getInstance();
+ // Check extension/functions
if (!extension_loaded("gd")) {
return false;
} else {
@@ -148,26 +150,27 @@
}
}
}
-
- if (!file_exists($imageBase = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/images/module_logo.png") || !file_exists($font = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/images/VeraBd.ttf")) {
+ // Check original image/font
+ if (!file_exists($imageBase = XOOPS_ROOT_PATH . "/modules/" . $dirname . "/images/module_logo.png")) {
return false;
}
-
+ if (!file_exists($font = XOOPS_ROOT_PATH . "/modules/" . $wfdownloads->getModule()->dirname() . "/images/VeraBd.ttf")) {
+ return false;
+ }
+ // Create image
$imageModule = imagecreatefrompng($imageBase);
-
- //Erase old text
- $grey_color = imagecolorallocate($imageModule, 237, 237, 237);
- imagefilledrectangle($imageModule, 5, 35, 85, 46, $grey_color);
-
+ // Erase old text
+ $greyColor = imagecolorallocate($imageModule, 237, 237, 237);
+ imagefilledrectangle($imageModule, 5, 35, 85, 46, $greyColor);
// Write text
- $text_color = imagecolorallocate($imageModule, 0, 0, 0);
+ $textColor = imagecolorallocate($imageModule, 0, 0, 0);
$space_to_border = (80 - strlen($dirname) * 6.5) / 2;
- imagefttext($imageModule, 8.5, 0, $space_to_border, 45, $text_color, $font, ucfirst($dirname), array());
-
+ imagefttext($imageModule, 8.5, 0, $space_to_border, 45, $textColor, $font, ucfirst($dirname), array());
// Set transparency color
- $white = imagecolorallocatealpha($imageModule, 255, 255, 255, 127);
- imagefill($imageModule, 0, 0, $white);
- imagecolortransparent($imageModule, $white);
+ $whiteColor = imagecolorallocatealpha($imageModule, 255, 255, 255, 127);
+ imagefill($imageModule, 0, 0, $whiteColor);
+ imagecolortransparent($imageModule, $whiteColor);
+ // Save new image
imagepng($imageModule, XOOPS_ROOT_PATH . "/modules/" . $dirname . "/images/module_logo.png");
imagedestroy($imageModule);
return true;
|
|
From: <luc...@us...> - 2013-10-04 16:48:51
|
Revision: 12125
http://sourceforge.net/p/xoops/svn/12125
Author: luciorota
Date: 2013-10-04 16:48:46 +0000 (Fri, 04 Oct 2013)
Log Message:
-----------
removed index.html from main directory
Removed Paths:
-------------
XoopsModules/wfdownloads/trunk/wfdownloads/index.html
Deleted: XoopsModules/wfdownloads/trunk/wfdownloads/index.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/index.html 2013-10-04 11:17:13 UTC (rev 12124)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/index.html 2013-10-04 16:48:46 UTC (rev 12125)
@@ -1 +0,0 @@
-<script>history.go(-1);</script>
\ No newline at end of file
|
|
From: <be...@us...> - 2013-10-04 11:17:21
|
Revision: 12124
http://sourceforge.net/p/xoops/svn/12124
Author: beckmi
Date: 2013-10-04 11:17:13 +0000 (Fri, 04 Oct 2013)
Log Message:
-----------
Code reformatting toward PSR-2
Modified Paths:
--------------
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_header.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admission.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/batch.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/export.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/groupperm_global.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/import.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/index.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/main.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/mygroupperm.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/mygrouppermform.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/photomanager.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/redothumbs.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/blocks/myalbum_rphoto.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/blocks/myalbum_tophits.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/blocks/myalbum_topnews.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/cat.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/comments.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/myalbum.textsanitizer.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/myuploader.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/photos.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/text.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/votedata.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/comment_new.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/docs/changelog.txt
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/docs/index.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/editphoto.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/header.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/imagemanager.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/assign_globals.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/blocksadmin.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/draw_functions.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/functions.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/get_perms.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/gtickets.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/myalbum.forms.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/notification.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/oninstall.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/onupdate.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/photo_orders.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/preferences.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/read_configs.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/search.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/sitemap.plugin.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/updateblock.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/waiting.plugin.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/index.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/language/english/help/index.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/photo.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/rss.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/submit.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum0_block_rphoto.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum0_block_tophits.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum0_block_tophits_p.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum0_block_topnews.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum0_block_topnews_p.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum1_block_rphoto.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum1_block_tophits.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum1_block_tophits_p.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum1_block_topnews.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum1_block_topnews_p.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum2_block_rphoto.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum2_block_tophits.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum2_block_tophits_p.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum2_block_topnews.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum2_block_topnews_p.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum_block_rphoto.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum_block_tophits.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum_block_tophits_p.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum_block_topnews.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum_block_topnews_p.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_categories.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_cpanel_admission.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_imagemanager.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_index.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_photo.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_photo_in_list.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_rss.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_viewcat_list.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum0_viewcat_table.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_categories.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_cpanel_admission.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_imagemanager.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_index.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_photo.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_photo_in_list.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_rss.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_viewcat_list.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum1_viewcat_table.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_categories.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_cpanel_admission.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_imagemanager.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_index.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_photo.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_photo_in_list.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_rss.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_viewcat_list.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum2_viewcat_table.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_categories.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_cpanel_admission.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_imagemanager.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_index.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_photo.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_photo_in_list.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_rss.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_viewcat_list.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/myalbum_viewcat_table.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/topten.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/viewcat.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/xoops_version.php
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.php 2013-10-04 11:06:51 UTC (rev 12123)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.php 2013-10-04 11:17:13 UTC (rev 12124)
@@ -14,17 +14,13 @@
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
* @package
* @since
- * @author XOOPS Development Team
- * @version $Id $
+ * @author XOOPS Development Team
+ * @version $Id $
*/
global $pathIcon32;
-echo "<div class='adminfooter'>\n"
- ." <div style='text-align: center;'>\n"
- ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
- ." </div>\n"
- ." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
- ."</div>";
+echo "<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" . " <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
+ . " </div>\n" . " " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . "</div>";
xoops_cp_footer();
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_header.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_header.php 2013-10-04 11:06:51 UTC (rev 12123)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_header.php 2013-10-04 11:17:13 UTC (rev 12124)
@@ -1,83 +1,85 @@
<?php
-require_once (dirname(dirname(dirname(dirname(__FILE__)))).'/mainfile.php');
-require_once (dirname(dirname(dirname(dirname(__FILE__)))).'/include/cp_header.php');
- require_once (dirname(dirname(__FILE__))).'/include/functions.php';
- require_once (dirname(dirname(__FILE__))).'/include/read_configs.php';
+require_once (dirname(dirname(dirname(dirname(__FILE__))))) . '/mainfile.php';
+require_once (dirname(dirname(dirname(dirname(__FILE__))))) . '/include/cp_header.php';
+require_once (dirname(dirname(__FILE__))) . '/include/functions.php';
+require_once (dirname(dirname(__FILE__))) . '/include/read_configs.php';
- if (!defined('_CHARSET'))
- define ("_CHARSET","UTF-8");
- if (!defined('_CHARSET_ISO'))
- define ("_CHARSET_ISO","ISO-8859-1");
+if (!defined('_CHARSET')) {
+ define ("_CHARSET", "UTF-8");
+}
+if (!defined('_CHARSET_ISO')) {
+ define ("_CHARSET_ISO", "ISO-8859-1");
+}
- $GLOBALS['myts'] = MyTextSanitizer::getInstance();
+$GLOBALS['myts'] = MyTextSanitizer::getInstance();
- $module_handler = xoops_gethandler('module');
- $config_handler = xoops_gethandler('config');
- $GLOBALS['myalbumModule'] = $module_handler->getByDirname($GLOBALS['mydirname']);
- $GLOBALS['myalbumModuleConfig'] = $config_handler->getConfigList($GLOBALS['myalbumModule']->getVar('mid'));
- $GLOBALS['myalbum_mid'] = $GLOBALS['myalbumModule']->getVar('mid');
- $GLOBALS['photos_dir'] = XOOPS_ROOT_PATH.$GLOBALS['myalbumModuleConfig']['myalbum_photospath'];
- $GLOBALS['thumbs_dir'] = XOOPS_ROOT_PATH.$GLOBALS['myalbumModuleConfig']['myalbum_thumbspath'];
- $GLOBALS['photos_url'] = XOOPS_URL.$GLOBALS['myalbumModuleConfig']['myalbum_photospath'];
- $GLOBALS['thumbs_url'] = XOOPS_URL.$GLOBALS['myalbumModuleConfig']['myalbum_thumbspath'];
+$module_handler = xoops_gethandler('module');
+$config_handler = xoops_gethandler('config');
+$GLOBALS['myalbumModule'] = $module_handler->getByDirname($GLOBALS['mydirname']);
+$GLOBALS['myalbumModuleConfig'] = $config_handler->getConfigList($GLOBALS['myalbumModule']->getVar('mid'));
+$GLOBALS['myalbum_mid'] = $GLOBALS['myalbumModule']->getVar('mid');
+$GLOBALS['photos_dir'] = XOOPS_ROOT_PATH . $GLOBALS['myalbumModuleConfig']['myalbum_photospath'];
+$GLOBALS['thumbs_dir'] = XOOPS_ROOT_PATH . $GLOBALS['myalbumModuleConfig']['myalbum_thumbspath'];
+$GLOBALS['photos_url'] = XOOPS_URL . $GLOBALS['myalbumModuleConfig']['myalbum_photospath'];
+$GLOBALS['thumbs_url'] = XOOPS_URL . $GLOBALS['myalbumModuleConfig']['myalbum_thumbspath'];
- xoops_load('pagenav');
- xoops_load('xoopslists');
- xoops_load('xoopsformloader');
+xoops_load('pagenav');
+xoops_load('xoopslists');
+xoops_load('xoopsformloader');
- include_once $GLOBALS['xoops']->path('class'.DS.'xoopsmailer.php');
- include_once $GLOBALS['xoops']->path('class'.DS.'tree.php');
+include_once $GLOBALS['xoops']->path('class' . DS . 'xoopsmailer.php');
+include_once $GLOBALS['xoops']->path('class' . DS . 'tree.php');
- $cat_handler = xoops_getmodulehandler('cat');
- $cats = $cat_handler->getObjects(NULL, true);
- $GLOBALS['cattree'] = new XoopsObjectTree( $cats , 'cid' , 'pid', 0 ) ;
+$cat_handler = xoops_getmodulehandler('cat');
+$cats = $cat_handler->getObjects(null, true);
+$GLOBALS['cattree'] = new XoopsObjectTree($cats, 'cid', 'pid', 0);
- if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))) {
- include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php');
- } else {
- echo xoops_error("Error: You don't use the Frameworks \"admin module\". Please install this Frameworks");
- }
+if (file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))) {
+ include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php');
+} else {
+ echo xoops_error("Error: You don't use the Frameworks \"admin module\". Please install this Frameworks");
+}
- $GLOBALS['myalbumImageIcon'] = XOOPS_URL .'/'. $GLOBALS['myalbumModule']->getInfo('icons16');
- $GLOBALS['myalbumImageAdmin'] = XOOPS_URL .'/'. $GLOBALS['myalbumModule']->getInfo('icons32');
+$GLOBALS['myalbumImageIcon'] = XOOPS_URL . '/' . $GLOBALS['myalbumModule']->getInfo('icons16');
+$GLOBALS['myalbumImageAdmin'] = XOOPS_URL . '/' . $GLOBALS['myalbumModule']->getInfo('icons32');
- if ($GLOBALS['xoopsUser']) {
- $moduleperm_handler =& xoops_gethandler('groupperm');
- if (!$moduleperm_handler->checkRight('module_admin', $GLOBALS['myalbumModule']->getVar( 'mid' ), $GLOBALS['xoopsUser']->getGroups())) {
- redirect_header(XOOPS_URL, 1, _NOPERM);
- exit();
- }
- } else {
- redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM);
+if ($GLOBALS['xoopsUser']) {
+ $moduleperm_handler =& xoops_gethandler('groupperm');
+ if (!$moduleperm_handler->checkRight('module_admin', $GLOBALS['myalbumModule']->getVar('mid'), $GLOBALS['xoopsUser']->getGroups())) {
+ redirect_header(XOOPS_URL, 1, _NOPERM);
exit();
}
+} else {
+ redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM);
+ exit();
+}
- xoops_loadLanguage('user');
- xoops_loadLanguage('admin', $mydirname);
- xoops_loadLanguage('main', $mydirname);
+xoops_loadLanguage('user');
+xoops_loadLanguage('admin', $mydirname);
+xoops_loadLanguage('main', $mydirname);
-$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
-$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
+$pathIcon16 = '../' . $xoopsModule->getInfo('icons16');
+$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
- if (!isset($GLOBALS['xoopsTpl']) || !is_object($GLOBALS['xoopsTpl'])) {
- include_once(XOOPS_ROOT_PATH."/class/template.php");
- $GLOBALS['xoopsTpl'] = new XoopsTpl();
- }
+if (!isset($GLOBALS['xoopsTpl']) || !is_object($GLOBALS['xoopsTpl'])) {
+ include_once(XOOPS_ROOT_PATH . "/class/template.php");
+ $GLOBALS['xoopsTpl'] = new XoopsTpl();
+}
- $GLOBALS['xoopsTpl']->assign('pathImageIcon', $GLOBALS['myalbumImageIcon']);
- $GLOBALS['xoopsTpl']->assign('pathImageAdmin', $GLOBALS['myalbumImageAdmin']);
+$GLOBALS['xoopsTpl']->assign('pathImageIcon', $GLOBALS['myalbumImageIcon']);
+$GLOBALS['xoopsTpl']->assign('pathImageAdmin', $GLOBALS['myalbumImageAdmin']);
- if ( isset( $_GET['lid'] ) ) {
- $lid = intval( $_GET['lid' ] ) ;
- $result = $GLOBALS['xoopsDB']->query("SELECT submitter FROM $table_photos where lid=$lid",0);
- list( $submitter ) = $GLOBALS['xoopsDB']->fetchRow( $result ) ;
- } else {
- $submitter = $GLOBALS['xoopsUser']->getVar('uid') ;
- }
+if (isset($_GET['lid'])) {
+ $lid = intval($_GET['lid']);
+ $result = $GLOBALS['xoopsDB']->query("SELECT submitter FROM $table_photos where lid=$lid", 0);
+ list($submitter) = $GLOBALS['xoopsDB']->fetchRow($result);
+} else {
+ $submitter = $GLOBALS['xoopsUser']->getVar('uid');
+}
- if ($GLOBALS['myalbumModuleConfig']['tag']) {
- include_once $GLOBALS['xoops']->path('modules'.DS.'tag'.DS.'include'.DS.'formtag.php');
- }
+if ($GLOBALS['myalbumModuleConfig']['tag']) {
+ include_once $GLOBALS['xoops']->path('modules' . DS . 'tag' . DS . 'include' . DS . 'formtag.php');
+}
- extract($GLOBALS['myalbumModuleConfig']);
+extract($GLOBALS['myalbumModuleConfig']);
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admission.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admission.php 2013-10-04 11:06:51 UTC (rev 12123)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admission.php 2013-10-04 11:17:13 UTC (rev 12124)
@@ -4,32 +4,34 @@
// <http://www.peak.ne.jp/> //
// ------------------------------------------------------------------------- //
-include 'admin_header.php' ;
+include 'admin_header.php';
// GET vars
-$pos = empty( $_GET[ 'pos' ] ) ? 0 : intval( $_GET[ 'pos' ] ) ;
-$num = empty( $_GET[ 'num' ] ) ? 10 : intval( $_GET[ 'num' ] ) ;
-$txt = empty( $_GET[ 'txt' ] ) ? '' : $GLOBALS['myts']->stripSlashesGPC( trim( $_GET[ 'txt' ] ) ) ;
+$pos = empty($_GET['pos']) ? 0 : intval($_GET['pos']);
+$num = empty($_GET['num']) ? 10 : intval($_GET['num']);
+$txt = empty($_GET['txt']) ? '' : $GLOBALS['myts']->stripSlashesGPC(trim($_GET['txt']));
-if ( ! empty( $_POST['action'] ) && $_POST['action'] == 'admit' && isset( $_POST['ids'] ) && is_array( $_POST['ids'] ) ) {
+if (!empty($_POST['action']) && $_POST['action'] == 'admit' && isset($_POST['ids']) && is_array($_POST['ids'])) {
$photosHandler = xoops_getmodulehandler('photos');
- @$photosHandler->setStatus($_POST[ 'ids' ], 1);
- redirect_header( 'admission.php' , 2 , _ALBM_AM_ADMITTING ) ;
- exit ;
+ @$photosHandler->setStatus($_POST['ids'], 1);
+ redirect_header('admission.php', 2, _ALBM_AM_ADMITTING);
+ exit;
-} elseif ( ! empty( $_POST['action'] ) && $_POST['action'] == 'delete' && isset( $_POST['ids'] ) && is_array( $_POST['ids'] ) ) {
+} elseif (!empty($_POST['action']) && $_POST['action'] == 'delete' && isset($_POST['ids']) && is_array($_POST['ids'])) {
// remove records
// Double check for anti-CSRF
- if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
+ if (!xoops_refcheck()) {
+ die("XOOPS_URL is not included in your REFERER");
+ }
$photosHandler = xoops_getmodulehandler('photos');
- @$photosHandler->deletePhotos($_POST[ 'ids' ]);
+ @$photosHandler->deletePhotos($_POST['ids']);
- redirect_header( "admission.php" , 2 , _ALBM_DELETINGPHOTO ) ;
- exit ;
+ redirect_header("admission.php", 2, _ALBM_DELETINGPHOTO);
+ exit;
}
$photosHandler = xoops_getmodulehandler('photos');
@@ -37,16 +39,16 @@
// extracting by free word
$criteria = new CriteriaCompo(new Criteria('`status`', '0', '<='));
if ($txt != "") {
- $keywords = explode( " " , $txt ) ;
+ $keywords = explode(" ", $txt);
foreach ($keywords as $keyword) {
- $criteria->add(new Criteria('CONCAT( l.title , l.ext )', '%'.$keyword.'%', 'LIKE'), "AND");
+ $criteria->add(new Criteria('CONCAT( l.title , l.ext )', '%' . $keyword . '%', 'LIKE'), "AND");
}
}
xoops_cp_header();
$indexAdmin = new ModuleAdmin();
echo $indexAdmin->addNavigation('admission.php');
//myalbum_adminMenu(basename(__FILE__), 3);
-$GLOBALS['xoopsTpl']->assign('admin_title', sprintf(_AM_H3_FMT_ADMISSION,$xoopsModule->name()));
+$GLOBALS['xoopsTpl']->assign('admin_title', sprintf(_AM_H3_FMT_ADMISSION, $xoopsModule->name()));
$GLOBALS['xoopsTpl']->assign('mydirname', $GLOBALS['mydirname']);
$GLOBALS['xoopsTpl']->assign('photos_url', $GLOBALS['photos_url']);
$GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
@@ -58,19 +60,19 @@
$numrows = $photosHandler->getCount($criteria);
// Page Navigation
-$nav = new XoopsPageNav( $numrows , $num , $pos , 'pos' , "num=$num&txt=" . urlencode($txt) ) ;
-$nav_html = $nav->renderNav( 10 ) ;
+$nav = new XoopsPageNav($numrows, $num, $pos, 'pos', "num=$num&txt=" . urlencode($txt));
+$nav_html = $nav->renderNav(10);
$GLOBALS['xoopsTpl']->assign('nav_html', $nav_html);
$criteria = new Criteria('`status`', '0', '<=');
$criteria->setStart($pos);
$criteria->setLimit($num);
-foreach ( $photosHandler->getObjects($criteria, true) as $lid => $photo) {
+foreach ($photosHandler->getObjects($criteria, true) as $lid => $photo) {
$GLOBALS['xoopsTpl']->append('photos', $photo->toArray());
}
-$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_admission.html');
+$GLOBALS['xoopsTpl']->display('db:' . $GLOBALS['mydirname'] . '_cpanel_admission.html');
// check $xoopsModule
// myalbum_footer_adminMenu();
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/batch.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/batch.php 2013-10-04 11:06:51 UTC (rev 12123)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/batch.php 2013-10-04 11:17:13 UTC (rev 12124)
@@ -4,84 +4,98 @@
// <http://www.peak.ne.jp/> //
// ------------------------------------------------------------------------- //
-include 'admin_header.php' ;
+include 'admin_header.php';
// GPCS vars
-$GLOBALS['submitter'] = empty( $_POST['submitter'] ) ? $my_uid : intval( $_POST['submitter'] ) ;
-if( isset( $_POST['cid'] ) ) $cid = intval( $_POST['cid'] ) ;
-else if( isset( $_GET['cid'] ) ) $cid = intval( $_GET['cid'] ) ;
-else $cid = 0 ;
-$GLOBALS['dir4edit'] = isset( $_POST['dir'] ) ? $GLOBALS['myts']->htmlSpecialChars( $_POST['dir'] ) : '' ;
-$GLOBALS['title4edit'] = isset( $_POST['title'] ) ? $GLOBALS['myts']->htmlSpecialChars( $_POST['title'] ) : '' ;
-$GLOBALS['desc4edit'] = isset( $_POST['desc'] ) ? $GLOBALS['myts']->htmlSpecialChars( $_POST['desc'] ) : '' ;
+$GLOBALS['submitter'] = empty($_POST['submitter']) ? $my_uid : intval($_POST['submitter']);
+if (isset($_POST['cid'])) {
+ $cid = intval($_POST['cid']);
+} else {
+ if (isset($_GET['cid'])) {
+ $cid = intval($_GET['cid']);
+ } else {
+ $cid = 0;
+ }
+}
+$GLOBALS['dir4edit'] = isset($_POST['dir']) ? $GLOBALS['myts']->htmlSpecialChars($_POST['dir']) : '';
+$GLOBALS['title4edit'] = isset($_POST['title']) ? $GLOBALS['myts']->htmlSpecialChars($_POST['title']) : '';
+$GLOBALS['desc4edit'] = isset($_POST['desc']) ? $GLOBALS['myts']->htmlSpecialChars($_POST['desc']) : '';
// reject Not Admin
-if (! $isadmin) {
- redirect_header( $mod_url , 2 , _ALBM_MUSTREGFIRST ) ;
- exit ;
+if (!$isadmin) {
+ redirect_header($mod_url, 2, _ALBM_MUSTREGFIRST);
+ exit;
}
$catHandler = xoops_getmodulehandler('cat');
// check Categories exist
$count = $catHandler->getCount();
if ($count < 1) {
- redirect_header(XOOPS_URL."/modules/$mydirname/",2,_ALBM_MUSTADDCATFIRST);
+ redirect_header(XOOPS_URL . "/modules/$mydirname/", 2, _ALBM_MUSTADDCATFIRST);
exit();
}
$photosHandler = xoops_getmodulehandler('photos');
-$textHandler = xoops_getmodulehandler('text');
+$textHandler = xoops_getmodulehandler('text');
-if ( isset( $_POST['submit'] ) && $_POST['submit'] != "" ) {
- ob_start() ;
+if (isset($_POST['submit']) && $_POST['submit'] != "") {
+ ob_start();
// Check Directory
- $dir = $GLOBALS['myts']->stripSlashesGPC( $_POST['dir'] ) ;
- if ( empty( $dir ) || ! is_dir( $dir ) ) {
- if( ord( $dir ) != 0x2f ) $dir = "/$dir" ;
- $prefix = XOOPS_ROOT_PATH ;
- while ( strlen( $prefix ) > 0 ) {
- if ( is_dir( "$prefix$dir" ) ) {
- $dir = "$prefix$dir" ;
- break ;
+ $dir = $GLOBALS['myts']->stripSlashesGPC($_POST['dir']);
+ if (empty($dir) || !is_dir($dir)) {
+ if (ord($dir) != 0x2f) {
+ $dir = "/$dir";
+ }
+ $prefix = XOOPS_ROOT_PATH;
+ while (strlen($prefix) > 0) {
+ if (is_dir("$prefix$dir")) {
+ $dir = "$prefix$dir";
+ break;
}
- $prefix = substr( $prefix , 0 , strrpos( $prefix , '/' ) ) ;
+ $prefix = substr($prefix, 0, strrpos($prefix, '/'));
}
- if ( ! is_dir( $dir ) ) {
- redirect_header( 'batch.php' , 3 , _ALBM_MES_INVALIDDIRECTORY . "<br />$dir4edit" ) ;
- exit ;
+ if (!is_dir($dir)) {
+ redirect_header('batch.php', 3, _ALBM_MES_INVALIDDIRECTORY . "<br />$dir4edit");
+ exit;
}
}
- if( substr( $dir , -1 ) == '/' ) $dir = substr( $dir , 0 , -1 ) ;
+ if (substr($dir, -1) == '/') {
+ $dir = substr($dir, 0, -1);
+ }
- $title4save = $GLOBALS['myts']->htmlSpecialChars( $_POST['title'] ) ;
- $desc4save = $GLOBALS['myts']->makeTareaData4Save( $_POST['desc'] ) ;
+ $title4save = $GLOBALS['myts']->htmlSpecialChars($_POST['title']);
+ $desc4save = $GLOBALS['myts']->makeTareaData4Save($_POST['desc']);
- $date = strtotime( $_POST['post_date'] ) ;
- if( $date == -1 ) $date = time() ;
+ $date = strtotime($_POST['post_date']);
+ if ($date == -1) {
+ $date = time();
+ }
- $dir_h = opendir( $dir ) ;
+ $dir_h = opendir($dir);
if ($dir_h === false) {
- redirect_header( 'batch.php' , 3 , _ALBM_MES_INVALIDDIRECTORY . "<br />$dir4edit" ) ;
- exit ;
+ redirect_header('batch.php', 3, _ALBM_MES_INVALIDDIRECTORY . "<br />$dir4edit");
+ exit;
}
- $filecount = 1 ;
- while ( $file_name = readdir( $dir_h ) ) {
+ $filecount = 1;
+ while ($file_name = readdir($dir_h)) {
// Skip '.' , '..' and hidden file
- if( substr( $file_name , 0 , 1 ) == '.' ) continue ;
+ if (substr($file_name, 0, 1) == '.') {
+ continue;
+ }
- $ext = substr( strrchr( $file_name , '.' ) , 1 ) ;
- $node = substr( $file_name , 0 , - strlen( $ext ) - 1 ) ;
- $file_path = "$dir/$node.$ext" ;
+ $ext = substr(strrchr($file_name, '.'), 1);
+ $node = substr($file_name, 0, -strlen($ext) - 1);
+ $file_path = "$dir/$node.$ext";
- $title = empty( $_POST['title'] ) ? addslashes( $node ) : "$title4save $filecount" ;
+ $title = empty($_POST['title']) ? addslashes($node) : "$title4save $filecount";
- if ( is_readable( $file_path ) && in_array( strtolower( $ext ) , $array_allowed_exts ) ) {
- if ( ! in_array( strtolower( $ext ) , $myalbum_normal_exts ) ) {
- list( $w , $h ) = getimagesize( $file_path ) ;
+ if (is_readable($file_path) && in_array(strtolower($ext), $array_allowed_exts)) {
+ if (!in_array(strtolower($ext), $myalbum_normal_exts)) {
+ list($w, $h) = getimagesize($file_path);
} else {
- list( $w , $h ) = array( 0 , 0 ) ;
+ list($w, $h) = array(0, 0);
}
$photo = $photosHandler->create();
$photo->setVar('cid', $cid);
@@ -92,45 +106,46 @@
$photo->setVar('submitter', $submitter);
$photo->setVar('date', $date);
$photo->setVar('status', 1);
- if ( $lid = $photosHandler->insert($photo) ) {
- print " <a href='../photo.php?lid=$lid' target='_blank'>$file_path</a>\n" ;
- copy( $file_path , $GLOBALS['photos_dir'].DS."$lid.$ext" ) ;
- myalbum_create_thumb( $GLOBALS['photos_dir'].DS."$lid.$ext" , $lid , $ext ) ;
+ if ($lid = $photosHandler->insert($photo)) {
+ print " <a href='../photo.php?lid=$lid' target='_blank'>$file_path</a>\n";
+ copy($file_path, $GLOBALS['photos_dir'] . DS . "$lid.$ext");
+ myalbum_create_thumb($GLOBALS['photos_dir'] . DS . "$lid.$ext", $lid, $ext);
$text = $textHandler->create();
$text->setVar('lid', $lid);
$text->setVar('description', $desc4save);
$textHandler->insert($text);
- echo _AM_MB_FINISHED."<br />\n" ;
+ echo _AM_MB_FINISHED . "<br />\n";
}
- $filecount ++ ;
+ $filecount++;
}
}
- closedir( $dir_h ) ;
+ closedir($dir_h);
if ($filecount <= 1) {
- echo "<p>$dir4edit : "._ALBM_MES_BATCHNONE."</p>" ;
+ echo "<p>$dir4edit : " . _ALBM_MES_BATCHNONE . "</p>";
} else {
- printf( "<p>"._ALBM_MES_BATCHDONE."</p>" , $filecount - 1 ) ;
+ printf("<p>" . _ALBM_MES_BATCHDONE . "</p>", $filecount - 1);
}
- $result_str = ob_get_contents() ;
- ob_end_clean() ;
+ $result_str = ob_get_contents();
+ ob_end_clean();
}
xoops_cp_header();
$indexAdmin = new ModuleAdmin();
echo $indexAdmin->addNavigation('batch.php');
//myalbum_adminMenu(basename(__FILE__), 4);
-$GLOBALS['xoopsTpl']->assign('admin_title', sprintf(_AM_H3_FMT_BATCHREGISTER,$GLOBALS['myalbumModule']->name()));
+$GLOBALS['xoopsTpl']->assign('admin_title', sprintf(_AM_H3_FMT_BATCHREGISTER, $GLOBALS['myalbumModule']->name()));
$GLOBALS['xoopsTpl']->assign('mydirname', $GLOBALS['mydirname']);
$GLOBALS['xoopsTpl']->assign('photos_url', $GLOBALS['photos_url']);
$GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
$GLOBALS['xoopsTpl']->assign('form', myalbum_admin_form_admission());
-if (isset($result_str))
+if (isset($result_str)) {
$GLOBALS['xoopsTpl']->assign('result_str', $result_str);
+}
-$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_batch.html');
+$GLOBALS['xoopsTpl']->display('db:' . $GLOBALS['mydirname'] . '_cpanel_batch.html');
// check $GLOBALS['myalbumModule']
// myalbum_footer_adminMenu();
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/export.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/export.php 2013-10-04 11:06:51 UTC (rev 12123)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/export.php 2013-10-04 11:17:13 UTC (rev 12124)
@@ -1,94 +1,105 @@
<?php
- // ------------------------------------------------------------------------- //
- // myAlbum-P - XOOPS photo album //
- // <http://www.peak.ne.jp/> //
- // ------------------------------------------------------------------------- //
- include 'admin_header.php' ;
- include_once( XOOPS_ROOT_PATH . '/modules/system/constants.php' ) ;
+// ------------------------------------------------------------------------- //
+// myAlbum-P - XOOPS photo album //
+// <http://www.peak.ne.jp/> //
+// ------------------------------------------------------------------------- //
+include 'admin_header.php';
+include_once(XOOPS_ROOT_PATH . '/modules/system/constants.php');
- // To imagemanager
- if ( ! empty( $_POST['imagemanager_export'] ) && ! empty( $_POST['imgcat_id'] ) && ! empty( $_POST['cid'] ) ) {
+// To imagemanager
+if (!empty($_POST['imagemanager_export']) && !empty($_POST['imgcat_id']) && !empty($_POST['cid'])) {
- // authority check
- $sysperm_handler =& xoops_gethandler('groupperm');
- if( ! $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $xoopsUser->getGroups() ) ) exit ;
+ // authority check
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $xoopsUser->getGroups())) {
+ exit;
+ }
- // anti-CSRF
- if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
+ // anti-CSRF
+ if (!xoops_refcheck()) {
+ die("XOOPS_URL is not included in your REFERER");
+ }
- // get dst information
- $dst_cid = intval( $_POST['imgcat_id'] ) ;
- $dst_table_photos = $xoopsDB->prefix( "image" ) ;
- $dst_table_cat = $xoopsDB->prefix( "imagecategory" ) ;
+ // get dst information
+ $dst_cid = intval($_POST['imgcat_id']);
+ $dst_table_photos = $xoopsDB->prefix("image");
+ $dst_table_cat = $xoopsDB->prefix("imagecategory");
- // get src information
- $src_cid = intval( $_POST['cid'] ) ;
- $src_table_photos = $xoopsDB->prefix($table_photos) ;
- $src_table_cat = $xoopsDB->prefix($table_cat);
+ // get src information
+ $src_cid = intval($_POST['cid']);
+ $src_table_photos = $xoopsDB->prefix($table_photos);
+ $src_table_cat = $xoopsDB->prefix($table_cat);
- // get storetype of the imgcat
- $crs = $xoopsDB->query( "SELECT imgcat_storetype,imgcat_maxsize FROM $dst_table_cat WHERE imgcat_id='$dst_cid'" ) or die( 'Invalid imgcat_id.' ) ;
- list( $imgcat_storetype,$imgcat_maxsize ) = $xoopsDB->fetchRow( $crs ) ;
+ // get storetype of the imgcat
+ $crs = $xoopsDB->query("SELECT imgcat_storetype,imgcat_maxsize FROM $dst_table_cat WHERE imgcat_id='$dst_cid'") or die('Invalid imgcat_id.');
+ list($imgcat_storetype, $imgcat_maxsize) = $xoopsDB->fetchRow($crs);
- // mime type look up
- $mime_types = array( 'gif' => 'image/gif' , 'png' => 'image/png' , 'jpg' => 'image/jpeg' , 'jpeg' => 'image/jpeg' ) ;
+ // mime type look up
+ $mime_types = array('gif' => 'image/gif', 'png' => 'image/png', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg');
- // INSERT loop
- $srs = $xoopsDB->query( "SELECT lid,ext,title,date,status FROM $src_table_photos WHERE cid='$src_cid'" ) ;
- $export_count = 0 ;
- while ( list( $lid,$ext,$title,$date,$status ) = $xoopsDB->fetchRow( $srs ) ) {
+ // INSERT loop
+ $srs = $xoopsDB->query("SELECT lid,ext,title,date,status FROM $src_table_photos WHERE cid='$src_cid'");
+ $export_count = 0;
+ while (list($lid, $ext, $title, $date, $status) = $xoopsDB->fetchRow($srs)) {
- $dst_node = uniqid( 'img' ) ;
- $dst_file = XOOPS_UPLOAD_PATH . "/{$dst_node}.{$ext}" ;
- $src_file = empty( $_POST['use_thumb'] ) ? "$photos_dir/{$lid}.{$ext}" : "$thumbs_dir/{$lid}.{$ext}" ;
+ $dst_node = uniqid('img');
+ $dst_file = XOOPS_UPLOAD_PATH . "/{$dst_node}.{$ext}";
+ $src_file = empty($_POST['use_thumb']) ? "$photos_dir/{$lid}.{$ext}" : "$thumbs_dir/{$lid}.{$ext}";
- if ($imgcat_storetype == 'db') {
- $fp = fopen( $src_file , "rb" ) ;
- if( $fp == false ) continue ;
- $body = addslashes( fread( $fp , filesize( $src_file ) ) ) ;
- fclose( $fp ) ;
- } else {
- if( ! copy( $src_file , $dst_file ) ) continue ;
- $body = '' ;
+ if ($imgcat_storetype == 'db') {
+ $fp = fopen($src_file, "rb");
+ if ($fp == false) {
+ continue;
}
-
- // insert into image table
- $image_display = $status ? 1 : 0 ;
- $xoopsDB->query( "INSERT INTO $dst_table_photos SET image_name='{$dst_node}.{$ext}',image_nicename='".addslashes($title)."',image_created='$date',image_mimetype='{$mime_types[$ext]}',image_display='$image_display',imgcat_id='$dst_cid'" ) or die( "DB error: INSERT image table" ) ;
- if ($body) {
- $image_id = $xoopsDB->getInsertId() ;
- $xoopsDB->query( "INSERT INTO ".$xoopsDB->prefix("imagebody")." SET image_id='$image_id',image_body='$body'" ) ;
+ $body = addslashes(fread($fp, filesize($src_file)));
+ fclose($fp);
+ } else {
+ if (!copy($src_file, $dst_file)) {
+ continue;
}
+ $body = '';
+ }
- $export_count ++ ;
+ // insert into image table
+ $image_display = $status ? 1 : 0;
+ $xoopsDB->query(
+ "INSERT INTO $dst_table_photos SET image_name='{$dst_node}.{$ext}',image_nicename='" . addslashes($title)
+ . "',image_created='$date',image_mimetype='{$mime_types[$ext]}',image_display='$image_display',imgcat_id='$dst_cid'"
+ ) or die("DB error: INSERT image table");
+ if ($body) {
+ $image_id = $xoopsDB->getInsertId();
+ $xoopsDB->query("INSERT INTO " . $xoopsDB->prefix("imagebody") . " SET image_id='$image_id',image_body='$body'");
}
- redirect_header( 'export.php' , 2 , sprintf( _AM_FMT_EXPORTSUCCESS , $export_count ) ) ;
- exit ;
+ $export_count++;
}
- //
- // Form Part
- //
+ redirect_header('export.php', 2, sprintf(_AM_FMT_EXPORTSUCCESS, $export_count));
+ exit;
+}
- $sysperm_handler =& xoops_gethandler('groupperm');
- if ( $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $xoopsUser->getGroups() ) ) {
+//
+// Form Part
+//
+
+$sysperm_handler =& xoops_gethandler('groupperm');
+if ($sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $xoopsUser->getGroups())) {
xoops_cp_header();
- $indexAdmin = new ModuleAdmin();
- echo $indexAdmin->addNavigation('export.php');
+ $indexAdmin = new ModuleAdmin();
+ echo $indexAdmin->addNavigation('export.php');
// myalbum_adminMenu(basename(__FILE__), 7);
- $GLOBALS['xoopsTpl']->assign('admin_title', sprintf(_AM_H3_FMT_EXPORTTO,$GLOBALS['myalbumModule']->name()));
+ $GLOBALS['xoopsTpl']->assign('admin_title', sprintf(_AM_H3_FMT_EXPORTTO, $GLOBALS['myalbumModule']->name()));
$GLOBALS['xoopsTpl']->assign('mydirname', $GLOBALS['mydirname']);
$GLOBALS['xoopsTpl']->assign('photos_url', $GLOBALS['photos_url']);
$GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
$GLOBALS['xoopsTpl']->assign('form', myalbum_admin_form_export());
- $GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_export.html');
+ $GLOBALS['xoopsTpl']->display('db:' . $GLOBALS['mydirname'] . '_cpanel_export.html');
// check $GLOBALS['myalbumModule']
// myalbum_footer_adminMenu();
-include_once 'admin_footer.php';
+ include_once 'admin_footer.php';
- } else {
- redirect_header('dashboard.php', 5, _NOPERM);
- }
+} else {
+ redirect_header('dashboard.php', 5, _NOPERM);
+}
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/groupperm_global.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/groupperm_global.php 2013-10-04 11:06:51 UTC (rev 12123)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/groupperm_global.php 2013-10-04 11:17:13 UTC (rev 12124)
@@ -1,12 +1,12 @@
<?php
-include_once 'admin_header.php' ;
-include_once 'mygrouppermform.php' ;
+include_once 'admin_header.php';
+include_once 'mygrouppermform.php';
xoops_loadLanguage('admin', 'system');
-if ( ! empty( $_POST['submit'] ) ) {
- include 'mygroupperm.php' ;
- redirect_header( XOOPS_URL."/modules/".$xoopsModule->dirname()."/admin/groupperm_global.php" , 1 , _AM_ALBM_GPERMUPDATED );
+if (!empty($_POST['submit'])) {
+ include 'mygroupperm.php';
+ redirect_header(XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/admin/groupperm_global.php", 1, _AM_ALBM_GPERMUPDATED);
}
xoops_cp_header();
@@ -18,10 +18,11 @@
$GLOBALS['xoopsTpl']->assign('photos_url', $GLOBALS['photos_url']);
$GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
$GLOBALS['xoopsTpl']->assign('form', myalbum_admin_form_groups());
-if (isset($result_str))
+if (isset($result_str)) {
$GLOBALS['xoopsTpl']->assign('result_str', $result_str);
+}
-$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_permissions.html');
+$GLOBALS['xoopsTpl']->display('db:' . $GLOBALS['mydirname'] . '_cpanel_permissions.html');
// myalbum_footer_adminMenu();
include_once 'admin_footer.php';
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/import.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/import.php 2013-10-04 11:06:51 UTC (rev 12123)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/import.php 2013-10-04 11:17:13 UTC (rev 12124)
@@ -4,151 +4,208 @@
// <http://www.peak.ne.jp/> //
// ------------------------------------------------------------------------- //
-include 'admin_header.php' ;
+include 'admin_header.php';
// From myalbum*
-if ( ! empty( $_POST['myalbum_import'] ) && ! empty( $_POST['cid'] ) ) {
+if (!empty($_POST['myalbum_import']) && !empty($_POST['cid'])) {
// anti-CSRF
- if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
+ if (!xoops_refcheck()) {
+ die("XOOPS_URL is not included in your REFERER");
+ }
// get src module
- $src_cid = intval( $_POST['cid'] ) ;
- $src_dirname = empty( $_POST['src_dirname'] ) ? '' : $_POST['src_dirname'] ;
- if( $mydirname == $src_dirname ) die( "source dirname is same as dest dirname: " . htmlspecialchars( $src_dirname ) ) ;
- if( ! preg_match( '/^myalbum(\d*)$/' , $src_dirname , $regs ) ) die( "invalid dirname of myalbum: " . htmlspecialchars( $src_dirname ) ) ;
- $module =& $module_handler->getByDirname( $src_dirname ) ;
- if( ! is_object( $module ) ) die( "invalid module dirname:" . htmlspecialchars( $src_dirname ) ) ;
- $src_mid = $module->getvar( 'mid' ) ;
+ $src_cid = intval($_POST['cid']);
+ $src_dirname = empty($_POST['src_dirname']) ? '' : $_POST['src_dirname'];
+ if ($mydirname == $src_dirname) {
+ die("source dirname is same as dest dirname: " . htmlspecialchars($src_dirname));
+ }
+ if (!preg_match('/^myalbum(\d*)$/', $src_dirname, $regs)) {
+ die("invalid dirname of myalbum: " . htmlspecialchars($src_dirname));
+ }
+ $module =& $module_handler->getByDirname($src_dirname);
+ if (!is_object($module)) {
+ die("invalid module dirname:" . htmlspecialchars($src_dirname));
+ }
+ $src_mid = $module->getvar('mid');
// authority check
- if( ! $GLOBALS['xoopsUser']->isAdmin( $src_mid ) ) exit ;
+ if (!$GLOBALS['xoopsUser']->isAdmin($src_mid)) {
+ exit;
+ }
// read configs from xoops_config directly
- $rs = $GLOBALS['xoopsDB']->query( "SELECT conf_name,conf_value FROM ".$GLOBALS['xoopsDB']->prefix('config')." WHERE conf_modid='$src_mid'" ) ;
- while ( list( $key , $val ) = $GLOBALS['xoopsDB']->fetchRow( $rs ) ) {
- $src_configs[ $key ] = $val ;
+ $rs = $GLOBALS['xoopsDB']->query("SELECT conf_name,conf_value FROM " . $GLOBALS['xoopsDB']->prefix('config') . " WHERE conf_modid='$src_mid'");
+ while (list($key, $val) = $GLOBALS['xoopsDB']->fetchRow($rs)) {
+ $src_configs[$key] = $val;
}
- $src_photos_dir = XOOPS_ROOT_PATH . $src_configs['myalbum_photospath'] ;
- $src_thumbs_dir = XOOPS_ROOT_PATH . $src_configs['myalbum_thumbspath'] ;
+ $src_photos_dir = XOOPS_ROOT_PATH . $src_configs['myalbum_photospath'];
+ $src_thumbs_dir = XOOPS_ROOT_PATH . $src_configs['myalbum_thumbspath'];
// src table names
- $src_table_photos = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_photos" ) ;
- $src_table_cat = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_cat" ) ;
- $src_table_text = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_text" ) ;
- $src_table_votedata = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_votedata" ) ;
+ $src_table_photos = $GLOBALS['xoopsDB']->prefix("{$src_dirname}_photos");
+ $src_table_cat = $GLOBALS['xoopsDB']->prefix("{$src_dirname}_cat");
+ $src_table_text = $GLOBALS['xoopsDB']->prefix("{$src_dirname}_text");
+ $src_table_votedata = $GLOBALS['xoopsDB']->prefix("{$src_dirname}_votedata");
- if( isset( $_POST['copyormove'] ) && $_POST['copyormove'] == 'move' ) $move_mode = true ;
- else $move_mode = false ;
+ if (isset($_POST['copyormove']) && $_POST['copyormove'] == 'move') {
+ $move_mode = true;
+ } else {
+ $move_mode = false;
+ }
// create category
- $GLOBALS['xoopsDB']->query( "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_cat )."(pid, title, imgurl) SELECT '0',title,imgurl FROM $src_table_cat WHERE cid='$src_cid'") or die( "DB error: INSERT cat table" ) ;
- $cid = $GLOBALS['xoopsDB']->getInsertId() ;
+ $GLOBALS['xoopsDB']->query(
+ "INSERT INTO " . $GLOBALS['xoopsDB']->prefix($table_cat) . "(pid, title, imgurl) SELECT '0',title,imgurl FROM $src_table_cat WHERE cid='$src_cid'"
+ ) or die("DB error: INSERT cat table");
+ $cid = $GLOBALS['xoopsDB']->getInsertId();
// INSERT loop
- $rs = $GLOBALS['xoopsDB']->query( "SELECT lid,ext FROM $src_table_photos WHERE cid='$src_cid'" ) ;
- $import_count = 0 ;
- while ( list( $src_lid , $ext ) = $GLOBALS['xoopsDB']->fetchRow( $rs ) ) {
+ $rs = $GLOBALS['xoopsDB']->query("SELECT lid,ext FROM $src_table_photos WHERE cid='$src_cid'");
+ $import_count = 0;
+ while (list($src_lid, $ext) = $GLOBALS['xoopsDB']->fetchRow($rs)) {
// photos table
- $set_comments = $move_mode ? 'comments' : "'0'" ;
- $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_photos )."(cid,title,ext,res_x,res_y,submitter,status,date,hits,rating,votes,comments) SELECT '$cid',title,ext,res_x,res_y,submitter,status,date,hits,rating,votes,$set_comments FROM $src_table_photos WHERE lid='$src_lid'" ;
- $GLOBALS['xoopsDB']->query( $sql ) or die( "DB error: INSERT photo table" ) ;
- $lid = $GLOBALS['xoopsDB']->getInsertId() ;
+ $set_comments = $move_mode ? 'comments' : "'0'";
+ $sql = "INSERT INTO " . $GLOBALS['xoopsDB']->prefix($table_photos)
+ . "(cid,title,ext,res_x,res_y,submitter,status,date,hits,rating,votes,comments) SELECT '$cid',title,ext,res_x,res_y,submitter,status,date,hits,rating,votes,$set_comments FROM $src_table_photos WHERE lid='$src_lid'";
+ $GLOBALS['xoopsDB']->query($sql) or die("DB error: INSERT photo table");
+ $lid = $GLOBALS['xoopsDB']->getInsertId();
// text table
- $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_text )." (lid,description) SELECT '$lid',description FROM $src_table_text WHERE lid='$src_lid'" ;
- $GLOBALS['xoopsDB']->query( $sql ) ;
+ $sql = "INSERT INTO " . $GLOBALS['xoopsDB']->prefix($table_text)
+ . " (lid,description) SELECT '$lid',description FROM $src_table_text WHERE lid='$src_lid'";
+ $GLOBALS['xoopsDB']->query($sql);
// votedata table
- $sql = "INSERT INTO " . $GLOBALS['xoopsDB']->prefix( $table_votedata ) . " (lid,ratinguser,rating,ratinghostname,ratingtimestamp) SELECT '$lid',ratinguser,rating,ratinghostname,ratingtimestamp FROM $src_table_votedata WHERE lid='$src_lid'" ;
- $GLOBALS['xoopsDB']->query( $sql ) ;
+ $sql = "INSERT INTO " . $GLOBALS['xoopsDB']->prefix($table_votedata)
+ . " (lid,ratinguser,rating,ratinghostname,ratingtimestamp) SELECT '$lid',ratinguser,rating,ratinghostname,ratingtimestamp FROM $src_table_votedata WHERE lid='$src_lid'";
+ $GLOBALS['xoopsDB']->query($sql);
- @copy( "$src_photos_dir/{$src_lid}.{$ext}" , "$photos_dir/{$lid}.{$ext}" ) ;
- if ( in_array( strtolower( $ext ) , $myalbum_normal_exts ) ) {
- @copy( "$src_thumbs_dir/{$src_lid}.{$ext}" , "$thumbs_dir/{$lid}.{$ext}" ) ;
+ @copy("$src_photos_dir/{$src_lid}.{$ext}", "$photos_dir/{$lid}.{$ext}");
+ if (in_array(strtolower($ext), $myalbum_normal_exts)) {
+ @copy("$src_thumbs_dir/{$src_lid}.{$ext}", "$thumbs_dir/{$lid}.{$ext}");
} else {
- @copy( "$src_photos_dir/{$src_lid}.gif" , "$photos_dir/{$lid}.gif" ) ;
- @copy( "$src_thumbs_dir/{$src_lid}.gif" , "$thumbs_dir/{$lid}.gif" ) ; }
+ @copy("$src_photos_dir/{$src_lid}.gif", "$photos_dir/{$lid}.gif");
+ @copy("$src_thumbs_dir/{$src_lid}.gif", "$thumbs_dir/{$lid}.gif");
+ }
// exec only moving mode
if ($move_mode) {
// moving comments
- $sql = "UPDATE ".$GLOBALS['xoopsDB']->prefix('xoopscomments')." SET com_modid='$myalbum_mid',com_itemid='$lid' WHERE com_modid='$src_mid' AND com_itemid='$src_lid'" ;
- $GLOBALS['xoopsDB']->query( $sql ) ;
+ $sql = "UPDATE " . $GLOBALS['xoopsDB']->prefix('xoopscomments')
+ . " SET com_modid='$myalbum_mid',com_itemid='$lid' WHERE com_modid='$src_mid' AND com_itemid='$src_lid'";
+ $GLOBALS['xoopsDB']->query($sql);
// delete source photos
- list( $photos_dir , $thumbs_dir , $myalbum_mid , $table_photos , $table_text , $table_votedata , $saved_photos_dir , $saved_thumbs_dir , $saved_myalbum_mid , $saved_table_photos , $saved_table_text , $saved_table_votedata ) = array( $src_photos_dir , $src_thumbs_dir , $src_mid , $src_table_photos , $src_table_text , $src_table_votedata , $photos_dir , $thumbs_dir , $myalbum_mid , $GLOBALS['xoopsDB']->prefix( $table_photos ), $GLOBALS['xoopsDB']->prefix( $table_text ) , $GLOBALS['xoopsDB']->prefix( $table_votedata ) ) ;
- myalbum_delete_photos( "lid='$src_lid'" ) ;
- list( $photos_dir , $thumbs_dir , $myalbum_mid , $table_photos , $table_text ,$table_votedata ) = array( $saved_photos_dir , $saved_thumbs_dir , $saved_myalbum_mid , $saved_table_photos , $saved_table_text , $saved_table_votedata ) ; }
+ list($photos_dir, $thumbs_dir, $myalbum_mid, $table_photos, $table_text, $table_votedata, $saved_photos_dir, $saved_thumbs_dir,
+ $saved_myalbum_mid, $saved_table_photos, $saved_table_text, $saved_table_votedata)
+ = array(
+ $src_photos_dir,
+ $src_thumbs_dir,
+ $src_mid,
+ $src_table_photos,
+ $src_table_text,
+ $src_table_votedata,
+ $photos_dir,
+ $thumbs_dir,
+ $myalbum_mid,
+ $GLOBALS['xoopsDB']->prefix($table_photos),
+ $GLOBALS['xoopsDB']->prefix($table_text),
+ $GLOBALS['xoopsDB']->prefix($table_votedata)
+ );
+ myalbum_delete_photos("lid='$src_lid'");
+ list($photos_dir, $thumbs_dir, $myalbum_mid, $table_photos, $table_text, $table_votedata) = array(
+ $saved_photos_dir,
+ $saved_thumbs_dir,
+ $saved_myalbum_mid,
+ $saved_table_photos,
+ $saved_table_text,
+ $saved_table_votedata
+ );
+ }
- $import_count ++ ;
+ $import_count++;
}
- redirect_header( 'import.php' , 2 , sprintf( _AM_FMT_IMPORTSUCCESS , $import_count ) ) ;
- exit ;
-}
+ redirect_header('import.php', 2, sprintf(_AM_FMT_IMPORTSUCCESS, $import_count));
+ exit;
+} // From imagemanager
+else {
+ if (!empty($_POST['imagemanager_import']) && !empty($_POST['imgcat_id'])) {
-// From imagemanager
-else if ( ! empty( $_POST['imagemanager_import'] ) && ! empty( $_POST['imgcat_id'] ) ) {
+ // authority check
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $GLOBALS['xoopsUser']->getGroups())) {
+ exit;
+ }
- // authority check
- $sysperm_handler =& xoops_gethandler('groupperm');
- if( ! $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $GLOBALS['xoopsUser']->getGroups() ) ) exit ;
+ // anti-CSRF
+ if (!xoops_refcheck()) {
+ die("XOOPS_URL is not included in your REFERER");
+ }
- // anti-CSRF
- if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
+ // get src information
+ $src_cid = intval($_POST['imgcat_id']);
+ $src_table_photos = $GLOBALS['xoopsDB']->prefix("image");
+ $src_table_cat = $GLOBALS['xoopsDB']->prefix("imagecategory");
- // get src information
- $src_cid = intval( $_POST['imgcat_id'] ) ;
- $src_table_photos = $GLOBALS['xoopsDB']->prefix( "image" ) ;
- $src_table_cat = $GLOBALS['xoopsDB']->prefix( "imagecategory" ) ;
+ // create category
+ $crs = $GLOBALS['xoopsDB']->query("SELECT imgcat_name,imgcat_storetype FROM $src_table_cat WHERE imgcat_id='$src_cid'");
+ list($imgcat_name, $imgcat_storetype) = $GLOBALS['xoopsDB']->fetchRow($crs);
- // create category
- $crs = $GLOBALS['xoopsDB']->query( "SELECT imgcat_name,imgcat_storetype FROM $src_table_cat WHERE imgcat_id='$src_cid'" ) ;
- list( $imgcat_name , $imgcat_storetype ) = $GLOBALS['xoopsDB']->fetchRow( $crs ) ;
+ $GLOBALS['xoopsDB']->query("INSERT INTO " . $GLOBALS['xoopsDB']->prefix($table_cat) . "SET pid=0,title='" . addslashes($imgcat_name) . "'")
+ or die("DB error: INSERT cat table");
+ $cid = $GLOBALS['xoopsDB']->getInsertId();
- $GLOBALS['xoopsDB']->query( "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_cat )."SET pid=0,title='".addslashes($imgcat_name)."'" ) or die( "DB error: INSERT cat table" ) ;
- $cid = $GLOBALS['xoopsDB']->getInsertId() ;
+ // INSERT loop
+ $rs = $GLOBALS['xoopsDB']->query(
+ "SELECT image_id,image_name,image_nicename,image_created,image_display FROM $src_table_photos WHERE imgcat_id='$src_cid'"
+ );
+ $import_count = 0;
+ while (list($image_id, $image_name, $image_nicename, $image_created, $image_display) = $GLOBALS['xoopsDB']->fetchRow($rs)) {
- // INSERT loop
- $rs = $GLOBALS['xoopsDB']->query( "SELECT image_id,image_name,image_nicename,image_created,image_display FROM $src_table_photos WHERE imgcat_id='$src_cid'" ) ;
- $import_count = 0 ;
- while ( list( $image_id,$image_name,$image_nicename,$image_created,$image_display ) = $GLOBALS['xoopsDB']->fetchRow( $rs ) ) {
+ $src_file = XOOPS_UPLOAD_PATH . "/$image_name";
+ $ext = substr(strrchr($image_name, '.'), 1);
- $src_file = XOOPS_UPLOAD_PATH . "/$image_name" ;
- $ext = substr( strrchr( $image_name , '.' ) , 1 ) ;
+ // photos table
+ $sql = "INSERT INTO " . $GLOBALS['xoopsDB']->prefix($table_photos) . "SET cid='$cid',title='" . addslashes($image_nicename)
+ . "',ext='$ext',submitter='$my_uid',status='$image_display',date='$image_created'";
+ $GLOBALS['xoopsDB']->query($sql) or die("DB error: INSERT photo table");
+ $lid = $GLOBALS['xoopsDB']->getInsertId();
- // photos table
- $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_photos )."SET cid='$cid',title='".addslashes($image_nicename)."',ext='$ext',submitter='$my_uid',status='$image_display',date='$image_created'" ;
- $GLOBALS['xoopsDB']->query( $sql ) or die( "DB error: INSERT photo table" ) ;
- $lid = $GLOBALS['xoopsDB']->getInsertId() ;
+ // text table
+ $sql = "INSERT INTO " . $GLOBALS['xoopsDB']->prefix($table_text) . " SET lid='$lid',description=''";
+ $GLOBALS['xoopsDB']->query($sql);
- // text table
- $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_text )." SET lid='$lid',description=''" ;
- $GLOBALS['xoopsDB']->query( $sql ) ;
+ $dst_file = "$photos_dir/{$lid}.{$ext}";
+ if ($imgcat_storetype == 'db') {
+ $fp = fopen($dst_file, "wb");
+ if ($fp == false) {
+ continue;
+ }
+ $brs = $GLOBALS['xoopsDB']->query(
+ "SELECT image_body FROM " . $GLOBALS['xoopsDB']->prefix("imagebody") . " WHERE image_id='$image_id'"
+ );
+ list($body) = $GLOBALS['xoopsDB']->fetchRow($brs);
+ fwrite($fp, $body);
+ fclose($fp);
+ myalbum_create_thumb($dst_file, $lid, $ext);
+ } else {
+ @copy($src_file, $dst_file);
+ myalbum_create_thumb($src_file, $lid, $ext);
+ }
- $dst_file = "$photos_dir/{$lid}.{$ext}" ;
- if ($imgcat_storetype == 'db') {
- $fp = fopen( $dst_file , "wb" ) ;
- if( $fp == false ) continue ;
- $brs = $GLOBALS['xoopsDB']->query( "SELECT image_body FROM ".$GLOBALS['xoopsDB']->prefix("imagebody")." WHERE image_id='$image_id'" ) ;
- list( $body ) = $GLOBALS['xoopsDB']->fetchRow( $brs ) ;
- fwrite( $fp , $body ) ;
- fclose( $fp ) ;
- myalbum_create_thumb( $dst_file , $lid , $ext ) ;
- } else {
- @copy( $src_file , $dst_file ) ;
- myalbum_create_thumb( $src_file , $lid , $ext ) ;
+ list($width, $height, $type) = getimagesize($dst_file);
+ $GLOBALS['xoopsDB']->query(
+ "UPDATE " . $GLOBALS['xoopsDB']->prefix($table_photos) . "SET res_x='$width',res_y='$height' WHERE lid='$lid'"
+ );
+
+ $import_count++;
}
- list( $width , $height , $type ) = getimagesize( $dst_file ) ;
- $GLOBALS['xoopsDB']->query( "UPDATE ".$GLOBALS['xoopsDB']->prefix( $table_photos )."SET res_x='$width',res_y='$height' WHERE lid='$lid'" ) ;
-
- $import_count ++ ;
+ redirect_header('import.php', 2, sprintf(_AM_FMT_IMPORTSUCCESS, $import_count));
+ exit;
}
-
- redirect_header( 'import.php' , 2 , sprintf( _AM_FMT_IMPORTSUCCESS , $import_count ) ) ;
- exit ;
}
include_once '../include/myalbum.forms.php';
@@ -156,14 +213,14 @@
$indexAdmin = new ModuleAdmin();
echo $indexAdmin->addNavigation('import.php');
//myalbum_adminMenu(basename(__FILE__), 6);
-$GLOBALS['xoopsTpl']->assign('admin_title', sprintf(_AM_H3_FMT_IMPORTTO,$xoopsModule->name()));
+$GLOBALS['xoopsTpl']->assign('admin_title', sprintf(_AM_H3_FMT_IMPORTTO, $xoopsModule->name()));
$GLOBALS['xoopsTpl']->assign('mydirname', $GLOBALS['mydirname']);
$GLOBALS['xoopsTpl']->assign('photos_url', $GLOBALS['photos...
[truncated message content] |
|
From: <be...@us...> - 2013-10-04 11:06:57
|
Revision: 12123
http://sourceforge.net/p/xoops/svn/12123
Author: beckmi
Date: 2013-10-04 11:06:51 +0000 (Fri, 04 Oct 2013)
Log Message:
-----------
fix: sorting in the category view (walkero/mamba)
Modified Paths:
--------------
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/about.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_header.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admission.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/batch.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/export.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/groupperm_global.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/import.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/index.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/main.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/mygroupperm.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/mygrouppermform.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/photomanager.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/redothumbs.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/blocks/myalbum0_block_tag.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/blocks/myalbum1_block_tag.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/blocks/myalbum2_block_tag.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/blocks/myalbum_rphoto.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/blocks/myalbum_tophits.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/blocks/myalbum_topnews.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/cat.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/comments.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/myalbum.textsanitizer.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/myuploader.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/photos.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/text.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/class/votedata.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/close.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/comment_delete.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/comment_edit.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/comment_new.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/comment_post.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/comment_reply.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/docs/changelog.txt
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/docs/readme.txt
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/editphoto.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/header.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/imagemanager.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/assign_globals.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/blocksadmin.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/comment_functions.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/draw_functions.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/functions.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/get_perms.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/gtickets.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/myalbum.forms.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/notification.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/oninstall.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/onupdate.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/photo_orders.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/preferences.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/read_configs.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/search.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/sitemap.plugin.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/updateblock.inc.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/include/waiting.plugin.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/index.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/language/english/admin.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/language/english/blocks.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/language/english/help/help.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/language/english/main.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/language/english/modinfo.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/language/english/myalbum_constants.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/list.tag.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/notification_update.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/photo.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/ratephoto.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/rss.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/submit.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum0_block_rphoto.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum0_block_tophits_p.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum0_block_topnews_p.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/templates/blocks/myalbum1_block_rphoto.html
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/test.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/topten.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/view.tag.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/viewcat.php
XoopsModules/myalbum/trunk/htdocs/modules/myalbum/xoops_version.php
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/about.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/about.php 2013-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/about.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -27,4 +27,4 @@
echo $aboutAdmin->addNavigation('about.php');
echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
-include_once 'admin_footer.php';
\ No newline at end of file
+include_once 'admin_footer.php';
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.php 2013-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_footer.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -27,4 +27,4 @@
." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
."</div>";
-xoops_cp_footer();
\ No newline at end of file
+xoops_cp_footer();
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_header.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_header.php 2013-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admin_header.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -1,86 +1,83 @@
<?php
require_once (dirname(dirname(dirname(dirname(__FILE__)))).'/mainfile.php');
require_once (dirname(dirname(dirname(dirname(__FILE__)))).'/include/cp_header.php');
- require_once (dirname(dirname(__FILE__))).'/include/functions.php';
- require_once (dirname(dirname(__FILE__))).'/include/read_configs.php';
-
-
- if (!defined('_CHARSET'))
- define ("_CHARSET","UTF-8");
- if (!defined('_CHARSET_ISO'))
- define ("_CHARSET_ISO","ISO-8859-1");
-
- $GLOBALS['myts'] = MyTextSanitizer::getInstance();
-
- $module_handler = xoops_gethandler('module');
- $config_handler = xoops_gethandler('config');
- $GLOBALS['myalbumModule'] = $module_handler->getByDirname($GLOBALS['mydirname']);
- $GLOBALS['myalbumModuleConfig'] = $config_handler->getConfigList($GLOBALS['myalbumModule']->getVar('mid'));
- $GLOBALS['myalbum_mid'] = $GLOBALS['myalbumModule']->getVar('mid');
- $GLOBALS['photos_dir'] = XOOPS_ROOT_PATH.$GLOBALS['myalbumModuleConfig']['myalbum_photospath'];
- $GLOBALS['thumbs_dir'] = XOOPS_ROOT_PATH.$GLOBALS['myalbumModuleConfig']['myalbum_thumbspath'];
- $GLOBALS['photos_url'] = XOOPS_URL.$GLOBALS['myalbumModuleConfig']['myalbum_photospath'];
- $GLOBALS['thumbs_url'] = XOOPS_URL.$GLOBALS['myalbumModuleConfig']['myalbum_thumbspath'];
-
- xoops_load('pagenav');
- xoops_load('xoopslists');
- xoops_load('xoopsformloader');
-
- include_once $GLOBALS['xoops']->path('class'.DS.'xoopsmailer.php');
- include_once $GLOBALS['xoops']->path('class'.DS.'tree.php');
+ require_once (dirname(dirname(__FILE__))).'/include/functions.php';
+ require_once (dirname(dirname(__FILE__))).'/include/read_configs.php';
- $cat_handler = xoops_getmodulehandler('cat');
- $cats = $cat_handler->getObjects(NULL, true);
- $GLOBALS['cattree'] = new XoopsObjectTree( $cats , 'cid' , 'pid', 0 ) ;
-
- if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))){
+ if (!defined('_CHARSET'))
+ define ("_CHARSET","UTF-8");
+ if (!defined('_CHARSET_ISO'))
+ define ("_CHARSET_ISO","ISO-8859-1");
+
+ $GLOBALS['myts'] = MyTextSanitizer::getInstance();
+
+ $module_handler = xoops_gethandler('module');
+ $config_handler = xoops_gethandler('config');
+ $GLOBALS['myalbumModule'] = $module_handler->getByDirname($GLOBALS['mydirname']);
+ $GLOBALS['myalbumModuleConfig'] = $config_handler->getConfigList($GLOBALS['myalbumModule']->getVar('mid'));
+ $GLOBALS['myalbum_mid'] = $GLOBALS['myalbumModule']->getVar('mid');
+ $GLOBALS['photos_dir'] = XOOPS_ROOT_PATH.$GLOBALS['myalbumModuleConfig']['myalbum_photospath'];
+ $GLOBALS['thumbs_dir'] = XOOPS_ROOT_PATH.$GLOBALS['myalbumModuleConfig']['myalbum_thumbspath'];
+ $GLOBALS['photos_url'] = XOOPS_URL.$GLOBALS['myalbumModuleConfig']['myalbum_photospath'];
+ $GLOBALS['thumbs_url'] = XOOPS_URL.$GLOBALS['myalbumModuleConfig']['myalbum_thumbspath'];
+
+ xoops_load('pagenav');
+ xoops_load('xoopslists');
+ xoops_load('xoopsformloader');
+
+ include_once $GLOBALS['xoops']->path('class'.DS.'xoopsmailer.php');
+ include_once $GLOBALS['xoops']->path('class'.DS.'tree.php');
+
+ $cat_handler = xoops_getmodulehandler('cat');
+ $cats = $cat_handler->getObjects(NULL, true);
+ $GLOBALS['cattree'] = new XoopsObjectTree( $cats , 'cid' , 'pid', 0 ) ;
+
+ if ( file_exists($GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php'))) {
include_once $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin/moduleadmin.php');
- }else{
+ } else {
echo xoops_error("Error: You don't use the Frameworks \"admin module\". Please install this Frameworks");
}
-
- $GLOBALS['myalbumImageIcon'] = XOOPS_URL .'/'. $GLOBALS['myalbumModule']->getInfo('icons16');
- $GLOBALS['myalbumImageAdmin'] = XOOPS_URL .'/'. $GLOBALS['myalbumModule']->getInfo('icons32');
-
- if ($GLOBALS['xoopsUser']) {
- $moduleperm_handler =& xoops_gethandler('groupperm');
- if (!$moduleperm_handler->checkRight('module_admin', $GLOBALS['myalbumModule']->getVar( 'mid' ), $GLOBALS['xoopsUser']->getGroups())) {
- redirect_header(XOOPS_URL, 1, _NOPERM);
- exit();
- }
- } else {
- redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM);
- exit();
- }
- xoops_loadLanguage('user');
- xoops_loadLanguage('admin', $mydirname);
- xoops_loadLanguage('main', $mydirname);
+ $GLOBALS['myalbumImageIcon'] = XOOPS_URL .'/'. $GLOBALS['myalbumModule']->getInfo('icons16');
+ $GLOBALS['myalbumImageAdmin'] = XOOPS_URL .'/'. $GLOBALS['myalbumModule']->getInfo('icons32');
+ if ($GLOBALS['xoopsUser']) {
+ $moduleperm_handler =& xoops_gethandler('groupperm');
+ if (!$moduleperm_handler->checkRight('module_admin', $GLOBALS['myalbumModule']->getVar( 'mid' ), $GLOBALS['xoopsUser']->getGroups())) {
+ redirect_header(XOOPS_URL, 1, _NOPERM);
+ exit();
+ }
+ } else {
+ redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM);
+ exit();
+ }
+
+ xoops_loadLanguage('user');
+ xoops_loadLanguage('admin', $mydirname);
+ xoops_loadLanguage('main', $mydirname);
+
$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
-
- if (!isset($GLOBALS['xoopsTpl']) || !is_object($GLOBALS['xoopsTpl'])) {
- include_once(XOOPS_ROOT_PATH."/class/template.php");
- $GLOBALS['xoopsTpl'] = new XoopsTpl();
- }
-
- $GLOBALS['xoopsTpl']->assign('pathImageIcon', $GLOBALS['myalbumImageIcon']);
- $GLOBALS['xoopsTpl']->assign('pathImageAdmin', $GLOBALS['myalbumImageAdmin']);
- if( isset( $_GET['lid'] ) ) {
- $lid = intval( $_GET['lid' ] ) ;
- $result = $GLOBALS['xoopsDB']->query("SELECT submitter FROM $table_photos where lid=$lid",0);
- list( $submitter ) = $GLOBALS['xoopsDB']->fetchRow( $result ) ;
- } else {
- $submitter = $GLOBALS['xoopsUser']->getVar('uid') ;
- }
+ if (!isset($GLOBALS['xoopsTpl']) || !is_object($GLOBALS['xoopsTpl'])) {
+ include_once(XOOPS_ROOT_PATH."/class/template.php");
+ $GLOBALS['xoopsTpl'] = new XoopsTpl();
+ }
- if ($GLOBALS['myalbumModuleConfig']['tag']) {
- include_once $GLOBALS['xoops']->path('modules'.DS.'tag'.DS.'include'.DS.'formtag.php');
- }
-
- extract($GLOBALS['myalbumModuleConfig']);
-
-?>
\ No newline at end of file
+ $GLOBALS['xoopsTpl']->assign('pathImageIcon', $GLOBALS['myalbumImageIcon']);
+ $GLOBALS['xoopsTpl']->assign('pathImageAdmin', $GLOBALS['myalbumImageAdmin']);
+
+ if ( isset( $_GET['lid'] ) ) {
+ $lid = intval( $_GET['lid' ] ) ;
+ $result = $GLOBALS['xoopsDB']->query("SELECT submitter FROM $table_photos where lid=$lid",0);
+ list( $submitter ) = $GLOBALS['xoopsDB']->fetchRow( $result ) ;
+ } else {
+ $submitter = $GLOBALS['xoopsUser']->getVar('uid') ;
+ }
+
+ if ($GLOBALS['myalbumModuleConfig']['tag']) {
+ include_once $GLOBALS['xoops']->path('modules'.DS.'tag'.DS.'include'.DS.'formtag.php');
+ }
+
+ extract($GLOBALS['myalbumModuleConfig']);
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admission.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admission.php 2013-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/admission.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -1,78 +1,77 @@
-<?php
-// ------------------------------------------------------------------------- //
-// myAlbum-P - XOOPS photo album //
-// <http://www.peak.ne.jp/> //
-// ------------------------------------------------------------------------- //
-
-include( "admin_header.php" ) ;
-
-// GET vars
-$pos = empty( $_GET[ 'pos' ] ) ? 0 : intval( $_GET[ 'pos' ] ) ;
-$num = empty( $_GET[ 'num' ] ) ? 10 : intval( $_GET[ 'num' ] ) ;
-$txt = empty( $_GET[ 'txt' ] ) ? '' : $GLOBALS['myts']->stripSlashesGPC( trim( $_GET[ 'txt' ] ) ) ;
-
-
-if( ! empty( $_POST['action'] ) && $_POST['action'] == 'admit' && isset( $_POST['ids'] ) && is_array( $_POST['ids'] ) ) {
-
- $photosHandler = xoops_getmodulehandler('photos');
- @$photosHandler->setStatus($_POST[ 'ids' ], 1);
- redirect_header( 'admission.php' , 2 , _ALBM_AM_ADMITTING ) ;
- exit ;
-
-} else if( ! empty( $_POST['action'] ) && $_POST['action'] == 'delete' && isset( $_POST['ids'] ) && is_array( $_POST['ids'] ) ) {
-
- // remove records
-
- // Double check for anti-CSRF
- if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
-
- $photosHandler = xoops_getmodulehandler('photos');
- @$photosHandler->deletePhotos($_POST[ 'ids' ]);
-
- redirect_header( "admission.php" , 2 , _ALBM_DELETINGPHOTO ) ;
- exit ;
-}
-
-$photosHandler = xoops_getmodulehandler('photos');
-
-// extracting by free word
-$criteria = new CriteriaCompo(new Criteria('`status`', '0', '<='));
-if( $txt != "" ) {
- $keywords = explode( " " , $txt ) ;
- foreach( $keywords as $keyword ) {
- $criteria->add(new Criteria('CONCAT( l.title , l.ext )', '%'.$keyword.'%', 'LIKE'), "AND");
- }
-}
-xoops_cp_header();
-$indexAdmin = new ModuleAdmin();
-echo $indexAdmin->addNavigation('admission.php');
-//myalbum_adminMenu(basename(__FILE__), 3);
-$GLOBALS['xoopsTpl']->assign('admin_title', sprintf(_AM_H3_FMT_ADMISSION,$xoopsModule->name()));
-$GLOBALS['xoopsTpl']->assign('mydirname', $GLOBALS['mydirname']);
-$GLOBALS['xoopsTpl']->assign('photos_url', $GLOBALS['photos_url']);
-$GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
-$GLOBALS['xoopsTpl']->assign('txt', $txt);
-$GLOBALS['xoopsTpl']->assign('num', $num);
-$GLOBALS['xoopsTpl']->assign('pos', $pos);
-
-// query for listing count
-$numrows = $photosHandler->getCount($criteria);
-
-// Page Navigation
-$nav = new XoopsPageNav( $numrows , $num , $pos , 'pos' , "num=$num&txt=" . urlencode($txt) ) ;
-$nav_html = $nav->renderNav( 10 ) ;
-$GLOBALS['xoopsTpl']->assign('nav_html', $nav_html);
-
-$criteria = new Criteria('`status`', '0', '<=');
-$criteria->setStart($pos);
-$criteria->setLimit($num);
-
-foreach( $photosHandler->getObjects($criteria, true) as $lid => $photo) {
- $GLOBALS['xoopsTpl']->append('photos', $photo->toArray());
-}
-
-$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_admission.html');
-
-// check $xoopsModule
-// myalbum_footer_adminMenu();
-include_once 'admin_footer.php';
+<?php
+// ------------------------------------------------------------------------- //
+// myAlbum-P - XOOPS photo album //
+// <http://www.peak.ne.jp/> //
+// ------------------------------------------------------------------------- //
+
+include 'admin_header.php' ;
+
+// GET vars
+$pos = empty( $_GET[ 'pos' ] ) ? 0 : intval( $_GET[ 'pos' ] ) ;
+$num = empty( $_GET[ 'num' ] ) ? 10 : intval( $_GET[ 'num' ] ) ;
+$txt = empty( $_GET[ 'txt' ] ) ? '' : $GLOBALS['myts']->stripSlashesGPC( trim( $_GET[ 'txt' ] ) ) ;
+
+if ( ! empty( $_POST['action'] ) && $_POST['action'] == 'admit' && isset( $_POST['ids'] ) && is_array( $_POST['ids'] ) ) {
+
+ $photosHandler = xoops_getmodulehandler('photos');
+ @$photosHandler->setStatus($_POST[ 'ids' ], 1);
+ redirect_header( 'admission.php' , 2 , _ALBM_AM_ADMITTING ) ;
+ exit ;
+
+} elseif ( ! empty( $_POST['action'] ) && $_POST['action'] == 'delete' && isset( $_POST['ids'] ) && is_array( $_POST['ids'] ) ) {
+
+ // remove records
+
+ // Double check for anti-CSRF
+ if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
+
+ $photosHandler = xoops_getmodulehandler('photos');
+ @$photosHandler->deletePhotos($_POST[ 'ids' ]);
+
+ redirect_header( "admission.php" , 2 , _ALBM_DELETINGPHOTO ) ;
+ exit ;
+}
+
+$photosHandler = xoops_getmodulehandler('photos');
+
+// extracting by free word
+$criteria = new CriteriaCompo(new Criteria('`status`', '0', '<='));
+if ($txt != "") {
+ $keywords = explode( " " , $txt ) ;
+ foreach ($keywords as $keyword) {
+ $criteria->add(new Criteria('CONCAT( l.title , l.ext )', '%'.$keyword.'%', 'LIKE'), "AND");
+ }
+}
+xoops_cp_header();
+$indexAdmin = new ModuleAdmin();
+echo $indexAdmin->addNavigation('admission.php');
+//myalbum_adminMenu(basename(__FILE__), 3);
+$GLOBALS['xoopsTpl']->assign('admin_title', sprintf(_AM_H3_FMT_ADMISSION,$xoopsModule->name()));
+$GLOBALS['xoopsTpl']->assign('mydirname', $GLOBALS['mydirname']);
+$GLOBALS['xoopsTpl']->assign('photos_url', $GLOBALS['photos_url']);
+$GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
+$GLOBALS['xoopsTpl']->assign('txt', $txt);
+$GLOBALS['xoopsTpl']->assign('num', $num);
+$GLOBALS['xoopsTpl']->assign('pos', $pos);
+
+// query for listing count
+$numrows = $photosHandler->getCount($criteria);
+
+// Page Navigation
+$nav = new XoopsPageNav( $numrows , $num , $pos , 'pos' , "num=$num&txt=" . urlencode($txt) ) ;
+$nav_html = $nav->renderNav( 10 ) ;
+$GLOBALS['xoopsTpl']->assign('nav_html', $nav_html);
+
+$criteria = new Criteria('`status`', '0', '<=');
+$criteria->setStart($pos);
+$criteria->setLimit($num);
+
+foreach ( $photosHandler->getObjects($criteria, true) as $lid => $photo) {
+ $GLOBALS['xoopsTpl']->append('photos', $photo->toArray());
+}
+
+$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_admission.html');
+
+// check $xoopsModule
+// myalbum_footer_adminMenu();
+include_once 'admin_footer.php';
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/batch.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/batch.php 2013-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/batch.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -4,7 +4,7 @@
// <http://www.peak.ne.jp/> //
// ------------------------------------------------------------------------- //
-include( "admin_header.php" ) ;
+include 'admin_header.php' ;
// GPCS vars
$GLOBALS['submitter'] = empty( $_POST['submitter'] ) ? $my_uid : intval( $_POST['submitter'] ) ;
@@ -15,109 +15,107 @@
$GLOBALS['title4edit'] = isset( $_POST['title'] ) ? $GLOBALS['myts']->htmlSpecialChars( $_POST['title'] ) : '' ;
$GLOBALS['desc4edit'] = isset( $_POST['desc'] ) ? $GLOBALS['myts']->htmlSpecialChars( $_POST['desc'] ) : '' ;
-
// reject Not Admin
-if( ! $isadmin ) {
- redirect_header( $mod_url , 2 , _ALBM_MUSTREGFIRST ) ;
- exit ;
+if (! $isadmin) {
+ redirect_header( $mod_url , 2 , _ALBM_MUSTREGFIRST ) ;
+ exit ;
}
-
$catHandler = xoops_getmodulehandler('cat');
// check Categories exist
$count = $catHandler->getCount();
-if( $count < 1 ) {
- redirect_header(XOOPS_URL."/modules/$mydirname/",2,_ALBM_MUSTADDCATFIRST);
- exit();
+if ($count < 1) {
+ redirect_header(XOOPS_URL."/modules/$mydirname/",2,_ALBM_MUSTADDCATFIRST);
+ exit();
}
$photosHandler = xoops_getmodulehandler('photos');
$textHandler = xoops_getmodulehandler('text');
-if( isset( $_POST['submit'] ) && $_POST['submit'] != "" ) {
- ob_start() ;
+if ( isset( $_POST['submit'] ) && $_POST['submit'] != "" ) {
+ ob_start() ;
- // Check Directory
- $dir = $GLOBALS['myts']->stripSlashesGPC( $_POST['dir'] ) ;
- if( empty( $dir ) || ! is_dir( $dir ) ) {
- if( ord( $dir ) != 0x2f ) $dir = "/$dir" ;
- $prefix = XOOPS_ROOT_PATH ;
- while( strlen( $prefix ) > 0 ) {
- if( is_dir( "$prefix$dir" ) ) {
- $dir = "$prefix$dir" ;
- break ;
- }
- $prefix = substr( $prefix , 0 , strrpos( $prefix , '/' ) ) ;
- }
- if( ! is_dir( $dir ) ) {
- redirect_header( 'batch.php' , 3 , _ALBM_MES_INVALIDDIRECTORY . "<br />$dir4edit" ) ;
- exit ;
- }
- }
- if( substr( $dir , -1 ) == '/' ) $dir = substr( $dir , 0 , -1 ) ;
+ // Check Directory
+ $dir = $GLOBALS['myts']->stripSlashesGPC( $_POST['dir'] ) ;
+ if ( empty( $dir ) || ! is_dir( $dir ) ) {
+ if( ord( $dir ) != 0x2f ) $dir = "/$dir" ;
+ $prefix = XOOPS_ROOT_PATH ;
+ while ( strlen( $prefix ) > 0 ) {
+ if ( is_dir( "$prefix$dir" ) ) {
+ $dir = "$prefix$dir" ;
+ break ;
+ }
+ $prefix = substr( $prefix , 0 , strrpos( $prefix , '/' ) ) ;
+ }
+ if ( ! is_dir( $dir ) ) {
+ redirect_header( 'batch.php' , 3 , _ALBM_MES_INVALIDDIRECTORY . "<br />$dir4edit" ) ;
+ exit ;
+ }
+ }
+ if( substr( $dir , -1 ) == '/' ) $dir = substr( $dir , 0 , -1 ) ;
- $title4save = $GLOBALS['myts']->htmlSpecialChars( $_POST['title'] ) ;
- $desc4save = $GLOBALS['myts']->makeTareaData4Save( $_POST['desc'] ) ;
+ $title4save = $GLOBALS['myts']->htmlSpecialChars( $_POST['title'] ) ;
+ $desc4save = $GLOBALS['myts']->makeTareaData4Save( $_POST['desc'] ) ;
- $date = strtotime( $_POST['post_date'] ) ;
- if( $date == -1 ) $date = time() ;
+ $date = strtotime( $_POST['post_date'] ) ;
+ if( $date == -1 ) $date = time() ;
- $dir_h = opendir( $dir ) ;
- if( $dir_h === false ) {
- redirect_header( 'batch.php' , 3 , _ALBM_MES_INVALIDDIRECTORY . "<br />$dir4edit" ) ;
- exit ;
- }
- $filecount = 1 ;
- while( $file_name = readdir( $dir_h ) ) {
+ $dir_h = opendir( $dir ) ;
+ if ($dir_h === false) {
+ redirect_header( 'batch.php' , 3 , _ALBM_MES_INVALIDDIRECTORY . "<br />$dir4edit" ) ;
+ exit ;
+ }
+ $filecount = 1 ;
+ while ( $file_name = readdir( $dir_h ) ) {
- // Skip '.' , '..' and hidden file
- if( substr( $file_name , 0 , 1 ) == '.' ) continue ;
+ // Skip '.' , '..' and hidden file
+ if( substr( $file_name , 0 , 1 ) == '.' ) continue ;
- $ext = substr( strrchr( $file_name , '.' ) , 1 ) ;
- $node = substr( $file_name , 0 , - strlen( $ext ) - 1 ) ;
- $file_path = "$dir/$node.$ext" ;
+ $ext = substr( strrchr( $file_name , '.' ) , 1 ) ;
+ $node = substr( $file_name , 0 , - strlen( $ext ) - 1 ) ;
+ $file_path = "$dir/$node.$ext" ;
- $title = empty( $_POST['title'] ) ? addslashes( $node ) : "$title4save $filecount" ;
+ $title = empty( $_POST['title'] ) ? addslashes( $node ) : "$title4save $filecount" ;
- if( is_readable( $file_path ) && in_array( strtolower( $ext ) , $array_allowed_exts ) ) {
- if( ! in_array( strtolower( $ext ) , $myalbum_normal_exts ) ) {
- list( $w , $h ) = getimagesize( $file_path ) ;
- } else {
- list( $w , $h ) = array( 0 , 0 ) ;
- }
- $photo = $photosHandler->create();
- $photo->setVar('cid', $cid);
- $photo->setVar('title', $title);
- $photo->setVar('ext', $ext);
- $photo->setVar('res_x', $w);
- $photo->setVar('res_y', $h);
- $photo->setVar('submitter', $submitter);
- $photo->setVar('date', $date);
- $photo->setVar('status', 1);
- if( $lid = $photosHandler->insert($photo) ) {
- print " <a href='../photo.php?lid=$lid' target='_blank'>$file_path</a>\n" ;
- copy( $file_path , $GLOBALS['photos_dir'].DS."$lid.$ext" ) ;
- myalbum_create_thumb( $GLOBALS['photos_dir'].DS."$lid.$ext" , $lid , $ext ) ;
- $text = $textHandler->create();
- $text->setVar('lid', $lid);
- $text->setVar('description', $desc4save);
- $textHandler->insert($text);
- echo _AM_MB_FINISHED."<br />\n" ;
- }
+ if ( is_readable( $file_path ) && in_array( strtolower( $ext ) , $array_allowed_exts ) ) {
+ if ( ! in_array( strtolower( $ext ) , $myalbum_normal_exts ) ) {
+ list( $w , $h ) = getimagesize( $file_path ) ;
+ } else {
+ list( $w , $h ) = array( 0 , 0 ) ;
+ }
+ $photo = $photosHandler->create();
+ $photo->setVar('cid', $cid);
+ $photo->setVar('title', $title);
+ $photo->setVar('ext', $ext);
+ $photo->setVar('res_x', $w);
+ $photo->setVar('res_y', $h);
+ $photo->setVar('submitter', $submitter);
+ $photo->setVar('date', $date);
+ $photo->setVar('status', 1);
+ if ( $lid = $photosHandler->insert($photo) ) {
+ print " <a href='../photo.php?lid=$lid' target='_blank'>$file_path</a>\n" ;
+ copy( $file_path , $GLOBALS['photos_dir'].DS."$lid.$ext" ) ;
+ myalbum_create_thumb( $GLOBALS['photos_dir'].DS."$lid.$ext" , $lid , $ext ) ;
+ $text = $textHandler->create();
+ $text->setVar('lid', $lid);
+ $text->setVar('description', $desc4save);
+ $textHandler->insert($text);
+ echo _AM_MB_FINISHED."<br />\n" ;
+ }
- $filecount ++ ;
- }
- }
- closedir( $dir_h ) ;
+ $filecount ++ ;
+ }
+ }
+ closedir( $dir_h ) ;
- if( $filecount <= 1 ) {
- echo "<p>$dir4edit : "._ALBM_MES_BATCHNONE."</p>" ;
- } else {
- printf( "<p>"._ALBM_MES_BATCHDONE."</p>" , $filecount - 1 ) ;
- }
+ if ($filecount <= 1) {
+ echo "<p>$dir4edit : "._ALBM_MES_BATCHNONE."</p>" ;
+ } else {
+ printf( "<p>"._ALBM_MES_BATCHDONE."</p>" , $filecount - 1 ) ;
+ }
- $result_str = ob_get_contents() ;
- ob_end_clean() ;
+ $result_str = ob_get_contents() ;
+ ob_end_clean() ;
}
xoops_cp_header();
@@ -130,7 +128,7 @@
$GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
$GLOBALS['xoopsTpl']->assign('form', myalbum_admin_form_admission());
if (isset($result_str))
- $GLOBALS['xoopsTpl']->assign('result_str', $result_str);
+ $GLOBALS['xoopsTpl']->assign('result_str', $result_str);
$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_batch.html');
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/export.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/export.php 2013-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/export.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -1,97 +1,94 @@
<?php
- // ------------------------------------------------------------------------- //
- // myAlbum-P - XOOPS photo album //
- // <http://www.peak.ne.jp/> //
- // ------------------------------------------------------------------------- //
- include( "admin_header.php" ) ;
- include_once( XOOPS_ROOT_PATH . '/modules/system/constants.php' ) ;
-
- // To imagemanager
- if( ! empty( $_POST['imagemanager_export'] ) && ! empty( $_POST['imgcat_id'] ) && ! empty( $_POST['cid'] ) ) {
-
- // authority check
- $sysperm_handler =& xoops_gethandler('groupperm');
- if( ! $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $xoopsUser->getGroups() ) ) exit ;
-
- // anti-CSRF
- if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
-
- // get dst information
- $dst_cid = intval( $_POST['imgcat_id'] ) ;
- $dst_table_photos = $xoopsDB->prefix( "image" ) ;
- $dst_table_cat = $xoopsDB->prefix( "imagecategory" ) ;
-
- // get src information
- $src_cid = intval( $_POST['cid'] ) ;
- $src_table_photos = $xoopsDB->prefix($table_photos) ;
- $src_table_cat = $xoopsDB->prefix($table_cat);
-
- // get storetype of the imgcat
- $crs = $xoopsDB->query( "SELECT imgcat_storetype,imgcat_maxsize FROM $dst_table_cat WHERE imgcat_id='$dst_cid'" ) or die( 'Invalid imgcat_id.' ) ;
- list( $imgcat_storetype,$imgcat_maxsize ) = $xoopsDB->fetchRow( $crs ) ;
-
- // mime type look up
- $mime_types = array( 'gif' => 'image/gif' , 'png' => 'image/png' , 'jpg' => 'image/jpeg' , 'jpeg' => 'image/jpeg' ) ;
-
- // INSERT loop
- $srs = $xoopsDB->query( "SELECT lid,ext,title,date,status FROM $src_table_photos WHERE cid='$src_cid'" ) ;
- $export_count = 0 ;
- while( list( $lid,$ext,$title,$date,$status ) = $xoopsDB->fetchRow( $srs ) ) {
-
- $dst_node = uniqid( 'img' ) ;
- $dst_file = XOOPS_UPLOAD_PATH . "/{$dst_node}.{$ext}" ;
- $src_file = empty( $_POST['use_thumb'] ) ? "$photos_dir/{$lid}.{$ext}" : "$thumbs_dir/{$lid}.{$ext}" ;
-
- if( $imgcat_storetype == 'db' ) {
- $fp = fopen( $src_file , "rb" ) ;
- if( $fp == false ) continue ;
- $body = addslashes( fread( $fp , filesize( $src_file ) ) ) ;
- fclose( $fp ) ;
- } else {
- if( ! copy( $src_file , $dst_file ) ) continue ;
- $body = '' ;
- }
-
- // insert into image table
- $image_display = $status ? 1 : 0 ;
- $xoopsDB->query( "INSERT INTO $dst_table_photos SET image_name='{$dst_node}.{$ext}',image_nicename='".addslashes($title)."',image_created='$date',image_mimetype='{$mime_types[$ext]}',image_display='$image_display',imgcat_id='$dst_cid'" ) or die( "DB error: INSERT image table" ) ;
- if( $body ) {
- $image_id = $xoopsDB->getInsertId() ;
- $xoopsDB->query( "INSERT INTO ".$xoopsDB->prefix("imagebody")." SET image_id='$image_id',image_body='$body'" ) ;
- }
-
- $export_count ++ ;
- }
-
- redirect_header( 'export.php' , 2 , sprintf( _AM_FMT_EXPORTSUCCESS , $export_count ) ) ;
- exit ;
- }
+ // ------------------------------------------------------------------------- //
+ // myAlbum-P - XOOPS photo album //
+ // <http://www.peak.ne.jp/> //
+ // ------------------------------------------------------------------------- //
+ include 'admin_header.php' ;
+ include_once( XOOPS_ROOT_PATH . '/modules/system/constants.php' ) ;
- //
- // Form Part
- //
-
-
- $sysperm_handler =& xoops_gethandler('groupperm');
- if( $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $xoopsUser->getGroups() ) ) {
- xoops_cp_header();
+ // To imagemanager
+ if ( ! empty( $_POST['imagemanager_export'] ) && ! empty( $_POST['imgcat_id'] ) && ! empty( $_POST['cid'] ) ) {
+
+ // authority check
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ if( ! $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $xoopsUser->getGroups() ) ) exit ;
+
+ // anti-CSRF
+ if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
+
+ // get dst information
+ $dst_cid = intval( $_POST['imgcat_id'] ) ;
+ $dst_table_photos = $xoopsDB->prefix( "image" ) ;
+ $dst_table_cat = $xoopsDB->prefix( "imagecategory" ) ;
+
+ // get src information
+ $src_cid = intval( $_POST['cid'] ) ;
+ $src_table_photos = $xoopsDB->prefix($table_photos) ;
+ $src_table_cat = $xoopsDB->prefix($table_cat);
+
+ // get storetype of the imgcat
+ $crs = $xoopsDB->query( "SELECT imgcat_storetype,imgcat_maxsize FROM $dst_table_cat WHERE imgcat_id='$dst_cid'" ) or die( 'Invalid imgcat_id.' ) ;
+ list( $imgcat_storetype,$imgcat_maxsize ) = $xoopsDB->fetchRow( $crs ) ;
+
+ // mime type look up
+ $mime_types = array( 'gif' => 'image/gif' , 'png' => 'image/png' , 'jpg' => 'image/jpeg' , 'jpeg' => 'image/jpeg' ) ;
+
+ // INSERT loop
+ $srs = $xoopsDB->query( "SELECT lid,ext,title,date,status FROM $src_table_photos WHERE cid='$src_cid'" ) ;
+ $export_count = 0 ;
+ while ( list( $lid,$ext,$title,$date,$status ) = $xoopsDB->fetchRow( $srs ) ) {
+
+ $dst_node = uniqid( 'img' ) ;
+ $dst_file = XOOPS_UPLOAD_PATH . "/{$dst_node}.{$ext}" ;
+ $src_file = empty( $_POST['use_thumb'] ) ? "$photos_dir/{$lid}.{$ext}" : "$thumbs_dir/{$lid}.{$ext}" ;
+
+ if ($imgcat_storetype == 'db') {
+ $fp = fopen( $src_file , "rb" ) ;
+ if( $fp == false ) continue ;
+ $body = addslashes( fread( $fp , filesize( $src_file ) ) ) ;
+ fclose( $fp ) ;
+ } else {
+ if( ! copy( $src_file , $dst_file ) ) continue ;
+ $body = '' ;
+ }
+
+ // insert into image table
+ $image_display = $status ? 1 : 0 ;
+ $xoopsDB->query( "INSERT INTO $dst_table_photos SET image_name='{$dst_node}.{$ext}',image_nicename='".addslashes($title)."',image_created='$date',image_mimetype='{$mime_types[$ext]}',image_display='$image_display',imgcat_id='$dst_cid'" ) or die( "DB error: INSERT image table" ) ;
+ if ($body) {
+ $image_id = $xoopsDB->getInsertId() ;
+ $xoopsDB->query( "INSERT INTO ".$xoopsDB->prefix("imagebody")." SET image_id='$image_id',image_body='$body'" ) ;
+ }
+
+ $export_count ++ ;
+ }
+
+ redirect_header( 'export.php' , 2 , sprintf( _AM_FMT_EXPORTSUCCESS , $export_count ) ) ;
+ exit ;
+ }
+
+ //
+ // Form Part
+ //
+
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ if ( $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $xoopsUser->getGroups() ) ) {
+ xoops_cp_header();
$indexAdmin = new ModuleAdmin();
echo $indexAdmin->addNavigation('export.php');
// myalbum_adminMenu(basename(__FILE__), 7);
- $GLOBALS['xoopsTpl']->assign('admin_title', sprintf(_AM_H3_FMT_EXPORTTO,$GLOBALS['myalbumModule']->name()));
- $GLOBALS['xoopsTpl']->assign('mydirname', $GLOBALS['mydirname']);
- $GLOBALS['xoopsTpl']->assign('photos_url', $GLOBALS['photos_url']);
- $GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
- $GLOBALS['xoopsTpl']->assign('form', myalbum_admin_form_export());
-
- $GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_export.html');
-
- // check $GLOBALS['myalbumModule']
+ $GLOBALS['xoopsTpl']->assign('admin_title', sprintf(_AM_H3_FMT_EXPORTTO,$GLOBALS['myalbumModule']->name()));
+ $GLOBALS['xoopsTpl']->assign('mydirname', $GLOBALS['mydirname']);
+ $GLOBALS['xoopsTpl']->assign('photos_url', $GLOBALS['photos_url']);
+ $GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
+ $GLOBALS['xoopsTpl']->assign('form', myalbum_admin_form_export());
+
+ $GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_export.html');
+
+ // check $GLOBALS['myalbumModule']
// myalbum_footer_adminMenu();
include_once 'admin_footer.php';
- } else {
- redirect_header('dashboard.php', 5, _NOPERM);
- }
-
-?>
\ No newline at end of file
+ } else {
+ redirect_header('dashboard.php', 5, _NOPERM);
+ }
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/groupperm_global.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/groupperm_global.php 2013-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/groupperm_global.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -1,27 +1,27 @@
-<?php
-include_once( 'admin_header.php' ) ;
-include_once( 'mygrouppermform.php' ) ;
-
-xoops_loadLanguage('admin', 'system');
-
-if( ! empty( $_POST['submit'] ) ) {
- include( "mygroupperm.php" ) ;
- redirect_header( XOOPS_URL."/modules/".$xoopsModule->dirname()."/admin/groupperm_global.php" , 1 , _AM_ALBM_GPERMUPDATED );
-}
-
-xoops_cp_header();
-$indexAdmin = new ModuleAdmin();
-echo $indexAdmin->addNavigation('groupperm_global.php');
-//myalbum_adminMenu(basename(__FILE__), 8);
-$GLOBALS['xoopsTpl']->assign('admin_title', $GLOBALS['myalbumModule']->name());
-$GLOBALS['xoopsTpl']->assign('mydirname', $GLOBALS['mydirname']);
-$GLOBALS['xoopsTpl']->assign('photos_url', $GLOBALS['photos_url']);
-$GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
-$GLOBALS['xoopsTpl']->assign('form', myalbum_admin_form_groups());
-if (isset($result_str))
- $GLOBALS['xoopsTpl']->assign('result_str', $result_str);
-
-$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_permissions.html');
-
-// myalbum_footer_adminMenu();
-include_once 'admin_footer.php';
+<?php
+include_once 'admin_header.php' ;
+include_once 'mygrouppermform.php' ;
+
+xoops_loadLanguage('admin', 'system');
+
+if ( ! empty( $_POST['submit'] ) ) {
+ include 'mygroupperm.php' ;
+ redirect_header( XOOPS_URL."/modules/".$xoopsModule->dirname()."/admin/groupperm_global.php" , 1 , _AM_ALBM_GPERMUPDATED );
+}
+
+xoops_cp_header();
+$indexAdmin = new ModuleAdmin();
+echo $indexAdmin->addNavigation('groupperm_global.php');
+//myalbum_adminMenu(basename(__FILE__), 8);
+$GLOBALS['xoopsTpl']->assign('admin_title', $GLOBALS['myalbumModule']->name());
+$GLOBALS['xoopsTpl']->assign('mydirname', $GLOBALS['mydirname']);
+$GLOBALS['xoopsTpl']->assign('photos_url', $GLOBALS['photos_url']);
+$GLOBALS['xoopsTpl']->assign('thumbs_url', $GLOBALS['thumbs_url']);
+$GLOBALS['xoopsTpl']->assign('form', myalbum_admin_form_groups());
+if (isset($result_str))
+ $GLOBALS['xoopsTpl']->assign('result_str', $result_str);
+
+$GLOBALS['xoopsTpl']->display('db:'.$GLOBALS['mydirname'].'_cpanel_permissions.html');
+
+// myalbum_footer_adminMenu();
+include_once 'admin_footer.php';
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/import.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/import.php 2013-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/import.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -4,155 +4,154 @@
// <http://www.peak.ne.jp/> //
// ------------------------------------------------------------------------- //
-include( "admin_header.php" ) ;
+include 'admin_header.php' ;
// From myalbum*
-if( ! empty( $_POST['myalbum_import'] ) && ! empty( $_POST['cid'] ) ) {
+if ( ! empty( $_POST['myalbum_import'] ) && ! empty( $_POST['cid'] ) ) {
- // anti-CSRF
- if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
+ // anti-CSRF
+ if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
- // get src module
- $src_cid = intval( $_POST['cid'] ) ;
- $src_dirname = empty( $_POST['src_dirname'] ) ? '' : $_POST['src_dirname'] ;
- if( $mydirname == $src_dirname ) die( "source dirname is same as dest dirname: " . htmlspecialchars( $src_dirname ) ) ;
- if( ! preg_match( '/^myalbum(\d*)$/' , $src_dirname , $regs ) ) die( "invalid dirname of myalbum: " . htmlspecialchars( $src_dirname ) ) ;
- $module =& $module_handler->getByDirname( $src_dirname ) ;
- if( ! is_object( $module ) ) die( "invalid module dirname:" . htmlspecialchars( $src_dirname ) ) ;
- $src_mid = $module->getvar( 'mid' ) ;
+ // get src module
+ $src_cid = intval( $_POST['cid'] ) ;
+ $src_dirname = empty( $_POST['src_dirname'] ) ? '' : $_POST['src_dirname'] ;
+ if( $mydirname == $src_dirname ) die( "source dirname is same as dest dirname: " . htmlspecialchars( $src_dirname ) ) ;
+ if( ! preg_match( '/^myalbum(\d*)$/' , $src_dirname , $regs ) ) die( "invalid dirname of myalbum: " . htmlspecialchars( $src_dirname ) ) ;
+ $module =& $module_handler->getByDirname( $src_dirname ) ;
+ if( ! is_object( $module ) ) die( "invalid module dirname:" . htmlspecialchars( $src_dirname ) ) ;
+ $src_mid = $module->getvar( 'mid' ) ;
- // authority check
- if( ! $GLOBALS['xoopsUser']->isAdmin( $src_mid ) ) exit ;
+ // authority check
+ if( ! $GLOBALS['xoopsUser']->isAdmin( $src_mid ) ) exit ;
- // read configs from xoops_config directly
- $rs = $GLOBALS['xoopsDB']->query( "SELECT conf_name,conf_value FROM ".$GLOBALS['xoopsDB']->prefix('config')." WHERE conf_modid='$src_mid'" ) ;
- while( list( $key , $val ) = $GLOBALS['xoopsDB']->fetchRow( $rs ) ) {
- $src_configs[ $key ] = $val ;
- }
- $src_photos_dir = XOOPS_ROOT_PATH . $src_configs['myalbum_photospath'] ;
- $src_thumbs_dir = XOOPS_ROOT_PATH . $src_configs['myalbum_thumbspath'] ;
- // src table names
- $src_table_photos = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_photos" ) ;
- $src_table_cat = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_cat" ) ;
- $src_table_text = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_text" ) ;
- $src_table_votedata = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_votedata" ) ;
+ // read configs from xoops_config directly
+ $rs = $GLOBALS['xoopsDB']->query( "SELECT conf_name,conf_value FROM ".$GLOBALS['xoopsDB']->prefix('config')." WHERE conf_modid='$src_mid'" ) ;
+ while ( list( $key , $val ) = $GLOBALS['xoopsDB']->fetchRow( $rs ) ) {
+ $src_configs[ $key ] = $val ;
+ }
+ $src_photos_dir = XOOPS_ROOT_PATH . $src_configs['myalbum_photospath'] ;
+ $src_thumbs_dir = XOOPS_ROOT_PATH . $src_configs['myalbum_thumbspath'] ;
+ // src table names
+ $src_table_photos = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_photos" ) ;
+ $src_table_cat = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_cat" ) ;
+ $src_table_text = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_text" ) ;
+ $src_table_votedata = $GLOBALS['xoopsDB']->prefix( "{$src_dirname}_votedata" ) ;
- if( isset( $_POST['copyormove'] ) && $_POST['copyormove'] == 'move' ) $move_mode = true ;
- else $move_mode = false ;
+ if( isset( $_POST['copyormove'] ) && $_POST['copyormove'] == 'move' ) $move_mode = true ;
+ else $move_mode = false ;
- // create category
- $GLOBALS['xoopsDB']->query( "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_cat )."(pid, title, imgurl) SELECT '0',title,imgurl FROM $src_table_cat WHERE cid='$src_cid'") or die( "DB error: INSERT cat table" ) ;
- $cid = $GLOBALS['xoopsDB']->getInsertId() ;
+ // create category
+ $GLOBALS['xoopsDB']->query( "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_cat )."(pid, title, imgurl) SELECT '0',title,imgurl FROM $src_table_cat WHERE cid='$src_cid'") or die( "DB error: INSERT cat table" ) ;
+ $cid = $GLOBALS['xoopsDB']->getInsertId() ;
- // INSERT loop
- $rs = $GLOBALS['xoopsDB']->query( "SELECT lid,ext FROM $src_table_photos WHERE cid='$src_cid'" ) ;
- $import_count = 0 ;
- while( list( $src_lid , $ext ) = $GLOBALS['xoopsDB']->fetchRow( $rs ) ) {
+ // INSERT loop
+ $rs = $GLOBALS['xoopsDB']->query( "SELECT lid,ext FROM $src_table_photos WHERE cid='$src_cid'" ) ;
+ $import_count = 0 ;
+ while ( list( $src_lid , $ext ) = $GLOBALS['xoopsDB']->fetchRow( $rs ) ) {
- // photos table
- $set_comments = $move_mode ? 'comments' : "'0'" ;
- $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_photos )."(cid,title,ext,res_x,res_y,submitter,status,date,hits,rating,votes,comments) SELECT '$cid',title,ext,res_x,res_y,submitter,status,date,hits,rating,votes,$set_comments FROM $src_table_photos WHERE lid='$src_lid'" ;
- $GLOBALS['xoopsDB']->query( $sql ) or die( "DB error: INSERT photo table" ) ;
- $lid = $GLOBALS['xoopsDB']->getInsertId() ;
+ // photos table
+ $set_comments = $move_mode ? 'comments' : "'0'" ;
+ $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_photos )."(cid,title,ext,res_x,res_y,submitter,status,date,hits,rating,votes,comments) SELECT '$cid',title,ext,res_x,res_y,submitter,status,date,hits,rating,votes,$set_comments FROM $src_table_photos WHERE lid='$src_lid'" ;
+ $GLOBALS['xoopsDB']->query( $sql ) or die( "DB error: INSERT photo table" ) ;
+ $lid = $GLOBALS['xoopsDB']->getInsertId() ;
- // text table
- $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_text )." (lid,description) SELECT '$lid',description FROM $src_table_text WHERE lid='$src_lid'" ;
- $GLOBALS['xoopsDB']->query( $sql ) ;
+ // text table
+ $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_text )." (lid,description) SELECT '$lid',description FROM $src_table_text WHERE lid='$src_lid'" ;
+ $GLOBALS['xoopsDB']->query( $sql ) ;
- // votedata table
- $sql = "INSERT INTO " . $GLOBALS['xoopsDB']->prefix( $table_votedata ) . " (lid,ratinguser,rating,ratinghostname,ratingtimestamp) SELECT '$lid',ratinguser,rating,ratinghostname,ratingtimestamp FROM $src_table_votedata WHERE lid='$src_lid'" ;
- $GLOBALS['xoopsDB']->query( $sql ) ;
+ // votedata table
+ $sql = "INSERT INTO " . $GLOBALS['xoopsDB']->prefix( $table_votedata ) . " (lid,ratinguser,rating,ratinghostname,ratingtimestamp) SELECT '$lid',ratinguser,rating,ratinghostname,ratingtimestamp FROM $src_table_votedata WHERE lid='$src_lid'" ;
+ $GLOBALS['xoopsDB']->query( $sql ) ;
- @copy( "$src_photos_dir/{$src_lid}.{$ext}" , "$photos_dir/{$lid}.{$ext}" ) ;
- if( in_array( strtolower( $ext ) , $myalbum_normal_exts ) ) {
- @copy( "$src_thumbs_dir/{$src_lid}.{$ext}" , "$thumbs_dir/{$lid}.{$ext}" ) ;
- } else {
- @copy( "$src_photos_dir/{$src_lid}.gif" , "$photos_dir/{$lid}.gif" ) ;
- @copy( "$src_thumbs_dir/{$src_lid}.gif" , "$thumbs_dir/{$lid}.gif" ) ; }
+ @copy( "$src_photos_dir/{$src_lid}.{$ext}" , "$photos_dir/{$lid}.{$ext}" ) ;
+ if ( in_array( strtolower( $ext ) , $myalbum_normal_exts ) ) {
+ @copy( "$src_thumbs_dir/{$src_lid}.{$ext}" , "$thumbs_dir/{$lid}.{$ext}" ) ;
+ } else {
+ @copy( "$src_photos_dir/{$src_lid}.gif" , "$photos_dir/{$lid}.gif" ) ;
+ @copy( "$src_thumbs_dir/{$src_lid}.gif" , "$thumbs_dir/{$lid}.gif" ) ; }
- // exec only moving mode
- if( $move_mode ) {
- // moving comments
- $sql = "UPDATE ".$GLOBALS['xoopsDB']->prefix('xoopscomments')." SET com_modid='$myalbum_mid',com_itemid='$lid' WHERE com_modid='$src_mid' AND com_itemid='$src_lid'" ;
- $GLOBALS['xoopsDB']->query( $sql ) ;
+ // exec only moving mode
+ if ($move_mode) {
+ // moving comments
+ $sql = "UPDATE ".$GLOBALS['xoopsDB']->prefix('xoopscomments')." SET com_modid='$myalbum_mid',com_itemid='$lid' WHERE com_modid='$src_mid' AND com_itemid='$src_lid'" ;
+ $GLOBALS['xoopsDB']->query( $sql ) ;
- // delete source photos
- list( $photos_dir , $thumbs_dir , $myalbum_mid , $table_photos , $table_text , $table_votedata , $saved_photos_dir , $saved_thumbs_dir , $saved_myalbum_mid , $saved_table_photos , $saved_table_text , $saved_table_votedata ) = array( $src_photos_dir , $src_thumbs_dir , $src_mid , $src_table_photos , $src_table_text , $src_table_votedata , $photos_dir , $thumbs_dir , $myalbum_mid , $GLOBALS['xoopsDB']->prefix( $table_photos ), $GLOBALS['xoopsDB']->prefix( $table_text ) , $GLOBALS['xoopsDB']->prefix( $table_votedata ) ) ;
- myalbum_delete_photos( "lid='$src_lid'" ) ;
- list( $photos_dir , $thumbs_dir , $myalbum_mid , $table_photos , $table_text ,$table_votedata ) = array( $saved_photos_dir , $saved_thumbs_dir , $saved_myalbum_mid , $saved_table_photos , $saved_table_text , $saved_table_votedata ) ; }
+ // delete source photos
+ list( $photos_dir , $thumbs_dir , $myalbum_mid , $table_photos , $table_text , $table_votedata , $saved_photos_dir , $saved_thumbs_dir , $saved_myalbum_mid , $saved_table_photos , $saved_table_text , $saved_table_votedata ) = array( $src_photos_dir , $src_thumbs_dir , $src_mid , $src_table_photos , $src_table_text , $src_table_votedata , $photos_dir , $thumbs_dir , $myalbum_mid , $GLOBALS['xoopsDB']->prefix( $table_photos ), $GLOBALS['xoopsDB']->prefix( $table_text ) , $GLOBALS['xoopsDB']->prefix( $table_votedata ) ) ;
+ myalbum_delete_photos( "lid='$src_lid'" ) ;
+ list( $photos_dir , $thumbs_dir , $myalbum_mid , $table_photos , $table_text ,$table_votedata ) = array( $saved_photos_dir , $saved_thumbs_dir , $saved_myalbum_mid , $saved_table_photos , $saved_table_text , $saved_table_votedata ) ; }
- $import_count ++ ;
- }
+ $import_count ++ ;
+ }
- redirect_header( 'import.php' , 2 , sprintf( _AM_FMT_IMPORTSUCCESS , $import_count ) ) ;
- exit ;
+ redirect_header( 'import.php' , 2 , sprintf( _AM_FMT_IMPORTSUCCESS , $import_count ) ) ;
+ exit ;
}
-
// From imagemanager
-else if( ! empty( $_POST['imagemanager_import'] ) && ! empty( $_POST['imgcat_id'] ) ) {
+else if ( ! empty( $_POST['imagemanager_import'] ) && ! empty( $_POST['imgcat_id'] ) ) {
- // authority check
- $sysperm_handler =& xoops_gethandler('groupperm');
- if( ! $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $GLOBALS['xoopsUser']->getGroups() ) ) exit ;
+ // authority check
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ if( ! $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_IMAGE, $GLOBALS['xoopsUser']->getGroups() ) ) exit ;
- // anti-CSRF
- if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
+ // anti-CSRF
+ if( ! xoops_refcheck() ) die( "XOOPS_URL is not included in your REFERER" ) ;
- // get src information
- $src_cid = intval( $_POST['imgcat_id'] ) ;
- $src_table_photos = $GLOBALS['xoopsDB']->prefix( "image" ) ;
- $src_table_cat = $GLOBALS['xoopsDB']->prefix( "imagecategory" ) ;
+ // get src information
+ $src_cid = intval( $_POST['imgcat_id'] ) ;
+ $src_table_photos = $GLOBALS['xoopsDB']->prefix( "image" ) ;
+ $src_table_cat = $GLOBALS['xoopsDB']->prefix( "imagecategory" ) ;
- // create category
- $crs = $GLOBALS['xoopsDB']->query( "SELECT imgcat_name,imgcat_storetype FROM $src_table_cat WHERE imgcat_id='$src_cid'" ) ;
- list( $imgcat_name , $imgcat_storetype ) = $GLOBALS['xoopsDB']->fetchRow( $crs ) ;
+ // create category
+ $crs = $GLOBALS['xoopsDB']->query( "SELECT imgcat_name,imgcat_storetype FROM $src_table_cat WHERE imgcat_id='$src_cid'" ) ;
+ list( $imgcat_name , $imgcat_storetype ) = $GLOBALS['xoopsDB']->fetchRow( $crs ) ;
- $GLOBALS['xoopsDB']->query( "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_cat )."SET pid=0,title='".addslashes($imgcat_name)."'" ) or die( "DB error: INSERT cat table" ) ;
- $cid = $GLOBALS['xoopsDB']->getInsertId() ;
+ $GLOBALS['xoopsDB']->query( "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_cat )."SET pid=0,title='".addslashes($imgcat_name)."'" ) or die( "DB error: INSERT cat table" ) ;
+ $cid = $GLOBALS['xoopsDB']->getInsertId() ;
- // INSERT loop
- $rs = $GLOBALS['xoopsDB']->query( "SELECT image_id,image_name,image_nicename,image_created,image_display FROM $src_table_photos WHERE imgcat_id='$src_cid'" ) ;
- $import_count = 0 ;
- while( list( $image_id,$image_name,$image_nicename,$image_created,$image_display ) = $GLOBALS['xoopsDB']->fetchRow( $rs ) ) {
+ // INSERT loop
+ $rs = $GLOBALS['xoopsDB']->query( "SELECT image_id,image_name,image_nicename,image_created,image_display FROM $src_table_photos WHERE imgcat_id='$src_cid'" ) ;
+ $import_count = 0 ;
+ while ( list( $image_id,$image_name,$image_nicename,$image_created,$image_display ) = $GLOBALS['xoopsDB']->fetchRow( $rs ) ) {
- $src_file = XOOPS_UPLOAD_PATH . "/$image_name" ;
- $ext = substr( strrchr( $image_name , '.' ) , 1 ) ;
+ $src_file = XOOPS_UPLOAD_PATH . "/$image_name" ;
+ $ext = substr( strrchr( $image_name , '.' ) , 1 ) ;
- // photos table
- $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_photos )."SET cid='$cid',title='".addslashes($image_nicename)."',ext='$ext',submitter='$my_uid',status='$image_display',date='$image_created'" ;
- $GLOBALS['xoopsDB']->query( $sql ) or die( "DB error: INSERT photo table" ) ;
- $lid = $GLOBALS['xoopsDB']->getInsertId() ;
+ // photos table
+ $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_photos )."SET cid='$cid',title='".addslashes($image_nicename)."',ext='$ext',submitter='$my_uid',status='$image_display',date='$image_created'" ;
+ $GLOBALS['xoopsDB']->query( $sql ) or die( "DB error: INSERT photo table" ) ;
+ $lid = $GLOBALS['xoopsDB']->getInsertId() ;
- // text table
- $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_text )." SET lid='$lid',description=''" ;
- $GLOBALS['xoopsDB']->query( $sql ) ;
+ // text table
+ $sql = "INSERT INTO ".$GLOBALS['xoopsDB']->prefix( $table_text )." SET lid='$lid',description=''" ;
+ $GLOBALS['xoopsDB']->query( $sql ) ;
- $dst_file = "$photos_dir/{$lid}.{$ext}" ;
- if( $imgcat_storetype == 'db' ) {
- $fp = fopen( $dst_file , "wb" ) ;
- if( $fp == false ) continue ;
- $brs = $GLOBALS['xoopsDB']->query( "SELECT image_body FROM ".$GLOBALS['xoopsDB']->prefix("imagebody")." WHERE image_id='$image_id'" ) ;
- list( $body ) = $GLOBALS['xoopsDB']->fetchRow( $brs ) ;
- fwrite( $fp , $body ) ;
- fclose( $fp ) ;
- myalbum_create_thumb( $dst_file , $lid , $ext ) ;
- } else {
- @copy( $src_file , $dst_file ) ;
- myalbum_create_thumb( $src_file , $lid , $ext ) ;
- }
+ $dst_file = "$photos_dir/{$lid}.{$ext}" ;
+ if ($imgcat_storetype == 'db') {
+ $fp = fopen( $dst_file , "wb" ) ;
+ if( $fp == false ) continue ;
+ $brs = $GLOBALS['xoopsDB']->query( "SELECT image_body FROM ".$GLOBALS['xoopsDB']->prefix("imagebody")." WHERE image_id='$image_id'" ) ;
+ list( $body ) = $GLOBALS['xoopsDB']->fetchRow( $brs ) ;
+ fwrite( $fp , $body ) ;
+ fclose( $fp ) ;
+ myalbum_create_thumb( $dst_file , $lid , $ext ) ;
+ } else {
+ @copy( $src_file , $dst_file ) ;
+ myalbum_create_thumb( $src_file , $lid , $ext ) ;
+ }
- list( $width , $height , $type ) = getimagesize( $dst_file ) ;
- $GLOBALS['xoopsDB']->query( "UPDATE ".$GLOBALS['xoopsDB']->prefix( $table_photos )."SET res_x='$width',res_y='$height' WHERE lid='$lid'" ) ;
+ list( $width , $height , $type ) = getimagesize( $dst_file ) ;
+ $GLOBALS['xoopsDB']->query( "UPDATE ".$GLOBALS['xoopsDB']->prefix( $table_photos )."SET res_x='$width',res_y='$height' WHERE lid='$lid'" ) ;
- $import_count ++ ;
- }
+ $import_count ++ ;
+ }
- redirect_header( 'import.php' , 2 , sprintf( _AM_FMT_IMPORTSUCCESS , $import_count ) ) ;
- exit ;
+ redirect_header( 'import.php' , 2 , sprintf( _AM_FMT_IMPORTSUCCESS , $import_count ) ) ;
+ exit ;
}
-include_once('../include/myalbum.forms.php');
+include_once '../include/myalbum.forms.php';
xoops_cp_header();
$indexAdmin = new ModuleAdmin();
echo $indexAdmin->addNavigation('import.php');
Modified: XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/index.php
===================================================================
--- XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/index.php 2013-10-03 13:27:40 UTC (rev 12122)
+++ XoopsModules/myalbum/trunk/htdocs/modules/myalbum/admin/index.php 2013-10-04 11:06:51 UTC (rev 12123)
@@ -1,42 +1,42 @@
<?php
- include ('admin_header.php');
- xoops_loadLanguage('admin');
-
- xoops_cp_header();
+ include 'admin_header.php';
+ xoops_loadLanguage('admin');
+ xoops_cp_header();
+
// myalbum_adminMenu(basename(__FILE__), 0);
- $indexAdmin = new ModuleAdmin();
+ $indexAdmin = new ModuleAdmin();
echo $indexAdmin->addNavigation('index.php');
-
- $cat_handler = xoops_getmodulehandler('cat');
+
+ $cat_handler = xoops_getmodulehandler('cat');
$comments_handler = xoops_getmodulehandler('comments');
$photos_handler = xoops_getmodulehandler('photos');
$text_handler = xoops_getmodulehandler('text');
$votedata_handler = xoops_getmodulehandler('votedata');
$group_handler = xoops_gethandler('group');
- $netpbm_pipes = array( "jpegtopnm" , "giftopnm" , "pngtopnm" ,
- "pnmtojpeg" , "pnmtopng" , "ppmquant" , "ppmtogif" ,
- "pnmscale" , "pnmflip" ) ;
+ $netpbm_pipes = array( "jpegtopnm" , "giftopnm" , "pngtopnm" ,
+ "pnmtojpeg" , "pnmtopng" , "ppmquant" , "ppmtogif" ,
+ "pnmscale" , "pnmflip" ) ;
- // PATH_SEPARATOR
- if( ! defined( 'PATH_SEPARATOR' ) ) {
- if( DIRECTORY_SEPARATOR == '/' ) define( 'PATH_SEPARATOR' , ':' ) ;
- else define( 'PATH_SEPARATOR' , ';' ) ;
- }
-
- // Check the path to binaries of imaging packages
- if( trim( $myalbum_imagickpath ) != '' && substr( $myalbum_imagickpath , -1 ) != DIRECTORY_SEPARATOR ) {
- $myalbum_imagickpath .= DIRECTORY_SEPARATOR ;
- }
- if( trim( $myalbum_netpbmpath ) != '' && substr( $myalbum_netpbmpath , -1 ) != DIRECTORY_SEPARATOR ) {
- $myalbum_netpbmpath .= DIRECTORY_SEPARATOR ;
- }
-
- // Environmental
- $indexAdmin = new ModuleAdmin();
- $title = _AM_MB_PHPDIRECTIVE.' : '._AM_H4_ENVIRONMENT;
+ // PATH_SEPARATOR
+ if ( ! defined( 'PATH_SEPARATOR' ) ) {
+ if( DIRECTORY_SEPARATOR == '/' ) define( 'PATH_SEPARATOR' , ':' ) ;
+ else define( 'PATH_SEPARATOR' , ';' ) ;
+ }
+
+ // Check the path to binaries of imaging packages
+ if ( trim( $myalbum_imagickpath ) != '' && substr( $myalbum_imagickpath , -1 ) != DIRECTORY_SEPARATOR ) {
+ $myalbum_imagickpath .= DIRECTORY_SEPARATOR ;
+ }
+ if ( trim( $myalbum_netpbmpath ) != '' && substr( $myalbum_netpbmpath , -1 ) != DIRECTORY_SEPARATOR ) {
+ $myalbum_netpbmpath .= DIRECTORY_SEPARATOR ;
+ }
+
+ // Environmental
+ $indexAdmin = new ModuleAdmin();
+ $title = _AM_MB_PHPDIRECTIVE.' : '._AM_H4_ENVIRONMENT;
$indexAdmin->addInfoBox($title);
// Safe Mode
$safe_mode_flag = ini_get( "safe_...
[truncated message content] |
|
From: <luc...@us...> - 2013-10-03 13:27:45
|
Revision: 12122
http://sourceforge.net/p/xoops/svn/12122
Author: luciorota
Date: 2013-10-03 13:27:40 +0000 (Thu, 03 Oct 2013)
Log Message:
-----------
fixed bug in clone.php
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php
XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Removed Paths:
-------------
XoopsModules/wfdownloads/trunk/wfdownloads/images/wfdownloads_logo.png
XoopsModules/wfdownloads/trunk/wfdownloads/images/wfdownloads_logo_old.png
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php 2013-10-03 07:03:28 UTC (rev 12121)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/clone.php 2013-10-03 13:27:40 UTC (rev 12122)
@@ -29,8 +29,8 @@
$cloneDirname = $_POST['clonedirname'];
- //check if name is valid
- if (empty($clone) || preg_match('/[^a-zA-Z0-9\_\-]/', $cloneDirname)) {
+ // Check if name is valid
+ if (empty($cloneDirname) || preg_match('/[^a-zA-Z0-9\_\-]/', $cloneDirname)) {
redirect_header($currentFile, 3, sprintf(_AM_WFDOWNLOADS_CLONE_INVALIDNAME, $cloneDirname));
exit();
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-10-03 07:03:28 UTC (rev 12121)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-10-03 13:27:40 UTC (rev 12122)
@@ -1,4 +1,4 @@
-<b><u>=> Version 3.23 Beta (2013-10-02)</u></b>
+<b><u>=> Version 3.23 Beta (2013-10-03)</u></b>
- module standardization: header.php, admin/admin_header.php, xoops_version.php
- module standardization: standardize directories/files names/structures
- module standardization: standardize code headers
Deleted: XoopsModules/wfdownloads/trunk/wfdownloads/images/wfdownloads_logo.png
===================================================================
(Binary files differ)
Deleted: XoopsModules/wfdownloads/trunk/wfdownloads/images/wfdownloads_logo_old.png
===================================================================
(Binary files differ)
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-10-03 07:03:28 UTC (rev 12121)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-10-03 13:27:40 UTC (rev 12122)
@@ -35,21 +35,16 @@
include_once XOOPS_ROOT_PATH . "/modules/" . $modversion['dirname'] . "/include/constants.php";
// Path and name of the module’s logo
-$logo_filename = $modversion['dirname'] . "_logo.png";
-if (file_exists(XOOPS_ROOT_PATH . "/modules/" . $modversion['dirname'] . "/images/" . $logo_filename)) {
- $modversion['image'] = "images/{$logo_filename}";
-} else {
- $modversion['image'] = "images/module_logo.png";
-}
+$modversion['image'] = "images/module_logo.png";
// Install, update, unistall
$modversion['onInstall'] = 'include/module.php';
$modversion['onUpdate'] = 'include/module.php';
$modversion['onUninstall'] = 'include/module.php';
-$modversion['date'] = '2013-10-02';
-$modversion['release_date'] = '2013/10/02';
-$modversion['releasedate'] = '2013-10-02';
+$modversion['date'] = '2013-10-03';
+$modversion['release_date'] = '2013/10/03';
+$modversion['releasedate'] = '2013-10-03';
$modversion['status'] = 'BETA 1';
$modversion['teammembers'] = "Bender, David, FrankBlack, Xpider, M0nty, Mithrandir, Marcan, felix[fx2024], Sudhaker, Jegelstaff";
|
|
From: <txm...@us...> - 2013-10-03 07:03:33
|
Revision: 12121
http://sourceforge.net/p/xoops/svn/12121
Author: txmodxoops
Date: 2013-10-03 07:03:28 +0000 (Thu, 03 Oct 2013)
Log Message:
-----------
Updated
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/about.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/building.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/fields.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/index.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/modules.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_admin_footer.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_admin_header.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_architecture.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_changelog.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_header.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_include_search.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_sql.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_user_comments.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/include/functions.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/include/functions_const.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/language/english/admin.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/language/english/modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/sql/mysql.sql
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/templates/admin/tdmcreate_fields.html
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/templates/admin/tdmcreate_tables.html
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/xoops_version.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/footer.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/header.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldattributes.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldelements.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldkey.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldnull.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fields.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldtype.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/htmltable.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/modules.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/structure.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/tables.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/themeform.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_include_comments.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_include_common.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_include_functions_comments.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_include_notifications.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_language_admin.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_language_blocks.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_language_help.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_language_main.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_language_modinfo.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_templates_blocks.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/const/const_waiting.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/templates/admin/tdmcreate_building.html
Removed Paths:
-------------
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/admin_footer.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/admin_header.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/tdmcreate_architecture.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/tdmcreate_fieldattributes.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/tdmcreate_fieldelements.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/tdmcreate_fieldkey.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/tdmcreate_fieldnull.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/tdmcreate_fields.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/tdmcreate_fields_elements.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/tdmcreate_fieldtype.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/tdmcreate_htmltable.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/tdmcreate_languages.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/tdmcreate_modules.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/tdmcreate_structures.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/tdmcreate_tables.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/tdmcreate_themeform.php
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/images/uploads/tables/broken.png
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/images/uploads/tables/contact.png
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/images/uploads/tables/links.png
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/images/uploads/tables/shoutbox.png
XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/images/uploads/tables/topic.png
Modified: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/about.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/about.php 2013-10-02 16:08:49 UTC (rev 12120)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/about.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -18,8 +18,8 @@
* @author Txmod Xoops <su...@tx...>
* @version $Id: 1.59 about.php 11297 2013-03-24 10:58:10Z timgno $
*/
-include 'admin_header.php';
+include 'header.php';
xoops_cp_header();
echo $adminMenu->addNavigation('about.php');
-echo $adminMenu->renderAbout('YDRUY5QZQHAHS', false);
-include 'admin_footer.php';
\ No newline at end of file
+echo $adminMenu->renderAbout('6KJ7RW5DR3VTJ', false);
+include 'footer.php';
\ No newline at end of file
Deleted: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/admin_footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/admin_footer.php 2013-10-02 16:08:49 UTC (rev 12120)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/admin_footer.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -1,25 +0,0 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-/**
- * tdmcreate module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @package tdmcreate
- * @since 2.5.5
- * @author Txmod Xoops <su...@tx...>
- * @version $Id: 1.59 admin_footer.php 11297 2013-03-24 10:58:10Z timgno $
- */
-$fsname = $GLOBALS['xoopsModule']->getInfo('support_name');
-echo "<div align='center'><a href='http://www.xoops.org' target='_blank'>
- <img src='".$pathIcon32."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>";
- echo "<div class='center pad5'>" . sprintf(_AM_TDMCREATE_MAINTAINEDBY, $GLOBALS['xoopsModule']->getVar('dirname'), $GLOBALS['xoopsModule']->getInfo('support_url'), $fsname, $fsname) . "</div>";
-xoops_cp_footer();
\ No newline at end of file
Deleted: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/admin_header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/admin_header.php 2013-10-02 16:08:49 UTC (rev 12120)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/admin_header.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -1,60 +0,0 @@
-<?php
-/*
- You may not change or alter any portion of this comment or credits
- of supporting developers from this source code or any supporting source code
- which is considered copyrighted (c) material of the original comment or credit authors.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-/**
- * tdmcreate module
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
- * @package tdmcreate
- * @since 2.5.5
- * @author Txmod Xoops <su...@tx...>
- * @version $Id: 1.59 admin_header.php 11297 2013-03-24 10:58:10Z timgno $
- */
-include_once dirname(dirname(dirname(dirname(__FILE__)))).'/include/cp_header.php';
-$dirname = $GLOBALS['xoopsModule']->getVar('dirname');
-include_once $GLOBALS['xoops']->path('modules/'.$dirname.'/include/common.php');
-include_once $GLOBALS['xoops']->path('modules/'.$dirname.'/include/functions.php');
-include_once $GLOBALS['xoops']->path('modules/'.$dirname.'/admin/includes.php');
-
-$pathIcon16 = XOOPS_URL.'/'.$GLOBALS['xoopsModule']->getInfo('icons16');
-$pathIcon32 = XOOPS_URL.'/'.$GLOBALS['xoopsModule']->getInfo('icons32');
-$pathModuleAdmin = $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin');
-
-$modulesHandler=& xoops_getModuleHandler('tdmcreate_modules', $dirname);
-$tablesHandler=& xoops_getModuleHandler('tdmcreate_tables', $dirname);
-$fieldsHandler=& xoops_getModuleHandler('tdmcreate_fields', $dirname);
-$fieldtypeHandler=& xoops_getModuleHandler('tdmcreate_fieldtype', $dirname);
-$fieldattributesHandler=& xoops_getModuleHandler('tdmcreate_fieldattributes', $dirname);
-$fieldnullHandler=& xoops_getModuleHandler('tdmcreate_fieldnull', $dirname);
-$fieldkeyHandler=& xoops_getModuleHandler('tdmcreate_fieldkey', $dirname);
-$fieldelementsHandler=& xoops_getModuleHandler('tdmcreate_fieldelements', $dirname);
-
-$myts =& MyTextSanitizer::getInstance();
-
-if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
- include_once(XOOPS_ROOT_PATH . "/class/template.php");
- $xoopsTpl = new XoopsTpl();
-}
-
-$xoopsTpl->assign('pathIcon16', $pathIcon16);
-$xoopsTpl->assign('pathIcon32', $pathIcon32);
-//Load languages
-xoops_loadLanguage('admin', $dirname);
-xoops_loadLanguage('modinfo', $dirname);
-xoops_loadLanguage('main', $dirname);
-
-// Locad admin menu class
-if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
- include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
-}else{
- redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false);
-}
-$adminMenu = new ModuleAdmin();
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/building.php 2013-10-02 16:08:49 UTC (rev 12120)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/building.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -18,7 +18,15 @@
* @author Txmod Xoops <su...@tx...>
* @version $Id: 1.59 building.php 11297 2013-03-24 10:58:10Z timgno $
*/
-include 'admin_header.php';
+ /*
+$table_name =& $tablesHandler->get($table_name);
+$table_fieldname =& $tablesHandler->get($table_fieldname);
+$table_blocks =& $tablesHandler->get($table_blocks);
+$table_submenu =& $tablesHandler->get($table_submenu);
+$table_search =& $tablesHandler->get($table_search);
+$table_comments =& $tablesHandler->get($table_comments);*/
+include 'header.php';
+xoops_cp_header();
$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
$table_id = TDMCreate_CleanVars( $_REQUEST, 'table_id', 0 );
$table_name = TDMCreate_CleanVars( $_REQUEST, 'table_name', '', 'string' );
@@ -27,22 +35,17 @@
$table_submenu = TDMCreate_CleanVars( $_REQUEST, 'table_submenu', '', 'string' );
$table_search = TDMCreate_CleanVars( $_REQUEST, 'table_search', '', 'string' );
$table_comments = TDMCreate_CleanVars( $_REQUEST, 'table_comments', '', 'string' );
-$mod_id = TDMCreate_CleanVars( $_REQUEST, 'mod_id', 0 );
-$mod_name = TDMCreate_CleanVars( $_REQUEST, 'mod_name', '', 'string' );
+$mid = TDMCreate_CleanVars( $_REQUEST, 'mod_id', 0 );
+$mname = TDMCreate_CleanVars( $_REQUEST, 'mod_name', null, 'string' );
-if (isset($mod_name)) {
- $modules =& $modulesHandler->get($mod_name);
+/*if (isset($mod_name)) {
+ $modules =& $modulesHandler->get($mname);
} else {
$modules =& $modulesHandler;
}
-/*
-$table_name =& $tablesHandler->get($table_name);
-$table_fieldname =& $tablesHandler->get($table_fieldname);
-$table_blocks =& $tablesHandler->get($table_blocks);
-$table_submenu =& $tablesHandler->get($table_submenu);
-$table_search =& $tablesHandler->get($table_search);
-$table_comments =& $tablesHandler->get($table_comments);*/
+
+$mod_id = $modules->getVar('mod_id');
$mod_name = $modules->getVar('mod_name');
$mod_desc = $modules->getVar('mod_description');
$mod_author_website_name = $modules->getVar('mod_author_website_name');
@@ -61,18 +64,69 @@
unset($criteria);
$criteria = new CriteriaCompo();
-$criteria->add(new Criteria('field_mid', $mod_id));
+$criteria->add(new Criteria('field_mid', $mod_name));
$criteria->add(new Criteria('field_tid', $table_id));
$nb_fields = $fieldsHandler->getCount($criteria);
$fields_arr = $fieldsHandler->getAll($criteria);
+unset($criteria);*/
+
+if (isset($_REQUEST['mod_name'])) {
+ $modules =& $modulesHandler->get($_REQUEST['mod_name']);
+} else {
+ $modules =& $modulesHandler;
+}
+
+$mod_name = strtolower($modules->getVar('mod_name'));
+$mod_desc = $modules->getVar('mod_description');
+$mod_author_website_name = $modules->getVar('mod_author_website_name');
+$mod_author_website_url = $modules->getVar('mod_author_website_url');
+$mod_image = $modules->getVar('mod_image');
+$mod_active_search = $modules->getVar('mod_search');
+$mod_active_comments = $modules->getVar('mod_comments');
+$mod_active_notifications = $modules->getVar('mod_notifications');
+$mod_paypal_button = $modules->getVar('mod_donations');
+$mod_subversion = $modules->getVar('mod_subversion');
+
+if (isset($_REQUEST['table_name'])) {
+ $tables =& $tablesHandler->get(isset($_REQUEST['table_name']));
+} else {
+ $tables =& $tablesHandler;
+}
+
+//Name of tables
+$criteria = new CriteriaCompo();
+if (isset($_REQUEST['mod_name'])) {
+ $criteria->add(new Criteria('table_mid', $_REQUEST['mod_name']));
+} else {
+ $criteria->add(new Criteria('table_mid'));
+}
+
+$nb_tables = $tablesHandler->getCount($criteria);
+$tables_arr = $tablesHandler->getAll($criteria);
unset($criteria);
+$criteria = new CriteriaCompo();
+$criteria->add(new Criteria('field_mid', $mod_name));
+$criteria->add(new Criteria('field_tid', $table_name));
+$nb_fields = $fieldsHandler->getCount($criteria);
+$fields_arr = $fieldsHandler->getAll($criteria);
+unset($criteria);
+
+$inroot_modules = TDMCreate_CleanVars( $_REQUEST, 'install_inroot', 0);
+$mpath = $modPath.'/repository/'.$mod_name;
+$rmpath = XOOPS_ROOT_PATH.'/modules/'.$mod_name;
+
switch ($op) {
- case 'build':
- xoops_cp_header();
- //Remove the new module directory if it exists
- TDMCreate_clearDir($modPath.'/repository/'.$mod_name);
-
+ case 'build':
+ $inroot = 0;
+ if($inroot_modules == 1) {
+ $inroot = 1;
+ //Remove the new module directory if it exists in root/modules
+ TDMCreate_clearDir($rmpath);
+ }
+ //Remove the new module if it exists in repository directory
+ TDMCreate_clearDir($mpath);
+
//Debut
OpenTable();
/************************************************/
@@ -106,7 +160,7 @@
//Copie of images tables
$table_img1 = $modPath.'/images/uploads/tables/'.$table_image;
if (file_exists($table_img1)) {
- copy($table_img1, $modPath.'/modules/'.$mod_name.'/images/icons/32/'.$table_image);
+ copy($table_img1, $mpath.'/images/icons/32/'.$table_image);
}
//Creation des classes
const_class($modules, $mod_name, $table_name, $table_fieldname, $fields_arr);
@@ -203,20 +257,17 @@
const_user_index($modules, $mod_name);
}
CloseTable();
-
+ var_dump($inroot);
break;
case 'default':
default:
-
- xoops_cp_header();
-
echo $adminMenu->addNavigation('building.php');
$mod_arr = $modulesHandler->getall();
$numrowsmod = count( $mod_arr );
// Redirect if there aren't modules
if ( $numrowsmod == 0 ) {
- redirect_header('modules.php?op=add_module', 3, _AM_TDMCREATE_NOTMODULES );
+ redirect_header('modules.php?op=new', 3, _AM_TDMCREATE_NOTMODULES );
}
include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php");
@@ -226,11 +277,20 @@
$mod_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_MODULES, 'mod_name', 'mod_name');
$mod_select->addOptionArray($modulesHandler->getList());
- $form->addElement($mod_select, true);
+ $form->addElement($mod_select, true);
- $form->addElement(new XoopsFormHidden('op', 'build'));
+ $checked_inroot = 0;
+ $check_install_inroot = new XoopsFormCheckBox(_AM_TDMCREATE_BUILD_INROOT, 'build_inroot', $checked_inroot);
+ $check_install_inroot->setDescription(_AM_TDMCREATE_BUILD_INROOT_DESC);
+ $check_install_inroot->addOption(1, ' ');
+ $form->addElement($check_install_inroot);
+
+ $install_inroot = ($check_inroot == 1) ? 1 : 0;
+
+ $form->addElement(new XoopsFormHidden('install_inroot', $install_inroot));
+ $form->addElement(new XoopsFormHidden('op', 'build'));
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
$form->display();
- break;
+ break;
}
-include 'admin_footer.php';
\ No newline at end of file
+include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/fields.php 2013-10-02 16:08:49 UTC (rev 12120)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/fields.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -18,7 +18,7 @@
* @author Txmod Xoops <su...@tx...>
* @version $Id: 1.59 fields.php 11297 2013-03-24 10:58:10Z timgno $
*/
-include "admin_header.php";
+include 'header.php';
// Recovered the value of the argument op in the URL $
$op = TDMCreate_CleanVars($_REQUEST, 'op', 'list', 'string');
$field_id = TDMCreate_CleanVars($_REQUEST, 'field_id', 0, 'int');
@@ -27,16 +27,62 @@
$table_mid = TDMCreate_CleanVars($_REQUEST, 'field_mid', 0, 'int');
$table_nbfields = TDMCreate_CleanVars($_REQUEST, 'field_numb', 0, 'int');
$table_fieldname = TDMCreate_CleanVars($_REQUEST, 'field_name', '', 'string');
+/*$table_id = $_SESSION['field_tid'];
+$table_mid = $_SESSION['field_mid'];
+$table_nbfields = $_SESSION['field_numb'];
+$table_fieldname = $_SESSION['field_name'];*/
switch ($op)
{
case 'list':
default:
+ $limit = $GLOBALS['xoopsModuleConfig']['adminperpage'];
+ $start = TDMCreate_CleanVars($_REQUEST, 'start', 0);
+ // Define main template
+ $xoopsOption['template_main'] = 'tdmcreate_fields.html';
xoops_cp_header();
- echo $adminMenu->addNavigation('fields.php');
- $adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
- $adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php', 'list');
- echo $adminMenu->renderButton();
- echo '<div class="center errorMsg">Add, Edit or List View in Tables</div><br />';
+ $xoopsTpl->assign('navigation', $adminMenu->addNavigation('fields.php'));
+ $adminMenu->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add');
+ $xoopsTpl->assign('button_new', $adminMenu->renderButton());
+ $xoopsTpl->assign('tdmc_url', TDMC_URL);
+ $xoopsTpl->assign('tdmc_upload_url', TDMC_UPLOAD_URL);
+ $xoopsTpl->assign('pathIcon32', XOOPS_URL.'/Frameworks/moduleclasses/icons/32');
+ // Get the list of tables
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('table_mid', $_REQUEST['mod_id']));
+ $criteria->setSort('table_id ASC, table_name');
+ $criteria->setOrder('ASC');
+ $nb_tables = $tablesHandler->getCount();
+ $tables_arr = $tablesHandler->getAll($criteria);
+ unset($criteria);
+ if ($nb_tables > 0)
+ {
+ $_yes = "<img src='../images/icons/16/green.png' alt='"._YES."' title='"._YES."' />";
+ $_no = "<img src='../images/icons/16/red.png' alt='"._NO."' title='"._NO."' />";
+ foreach (array_keys($tables_arr) as $t)
+ {
+ $table['id'] = $t;
+ $table['mid'] = $tables_arr[$t]->getVar('table_mid');
+ $table['name'] = $tables_arr[$t]->getVar('table_name');
+ $table['image'] = $tables_arr[$t]->getVar('table_image');
+ $table['nbfields'] = $tables_arr[$t]->getVar('table_nbfields');
+ $table['blocks'] = ( $tables_arr[$t]->getVar('table_blocks') == 1 ) ? $_yes : $_no;
+ $table['admin'] = ( $tables_arr[$t]->getVar('table_admin') == 1 ) ? $_yes : $_no;
+ $table['user'] = ( $tables_arr[$t]->getVar('table_user') == 1 ) ? $_yes : $_no;
+ $table['submenu'] = ( $tables_arr[$t]->getVar('table_submenu') == 1 ) ? $_yes : $_no;
+ $table['search'] = ( $tables_arr[$t]->getVar('table_search') == 1 ) ? $_yes : $_no;
+ $table['comments'] = ( $tables_arr[$t]->getVar('table_comments') == 1 ) ? $_yes : $_no;
+ $table['notifications'] = ( $tables_arr[$t]->getVar('table_notifications') == 1 ) ? $_yes : $_no;
+ $xoopsTpl->append('tables_list', $table);
+ unset($mod);
+ }
+ if ( $nb_tables > $limit ) {
+ include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
+ $pagenav = new XoopsPageNav($nb_tables, $limit, $start, 'start', 'op=list&limit=' . $limit);
+ $xoopsTpl->assign('pagenav', $pagenav->renderNav(4));
+ }
+ } else {
+ $xoopsTpl->assign('error', 'Add, Edit or List View in Tables');
+ }
break;
case 'new':
@@ -85,4 +131,4 @@
$form->display();
break;
}
-include 'admin_footer.php';
\ No newline at end of file
+include 'footer.php';
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/footer.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/footer.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -0,0 +1,25 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.5
+ * @author Txmod Xoops <su...@tx...>
+ * @version $Id: 1.59 admin_footer.php 11297 2013-03-24 10:58:10Z timgno $
+ */
+$fsname = $GLOBALS['xoopsModule']->getInfo('support_name');
+echo "<div align='center'><a href='http://www.xoops.org' target='_blank'>
+ <img src='".$pathIcon32."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>";
+ echo "<div class='center pad5'>" . sprintf(_AM_TDMCREATE_MAINTAINEDBY, $GLOBALS['xoopsModule']->getVar('dirname'), $GLOBALS['xoopsModule']->getInfo('support_url'), $fsname, $fsname) . "</div>";
+xoops_cp_footer();
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/header.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/header.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -0,0 +1,61 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.5
+ * @author Txmod Xoops <su...@tx...>
+ * @version $Id: 1.59 admin_header.php 11297 2013-03-24 10:58:10Z timgno $
+ */
+include_once dirname(dirname(dirname(dirname(__FILE__)))).'/include/cp_header.php';
+
+$dirname = $GLOBALS['xoopsModule']->getVar('dirname');
+include_once $GLOBALS['xoops']->path('modules/'.$dirname.'/include/common.php');
+include_once $GLOBALS['xoops']->path('modules/'.$dirname.'/include/functions.php');
+include_once $GLOBALS['xoops']->path('modules/'.$dirname.'/admin/includes.php');
+
+$pathIcon16 = XOOPS_URL.'/'.$GLOBALS['xoopsModule']->getInfo('icons16');
+$pathIcon32 = XOOPS_URL.'/'.$GLOBALS['xoopsModule']->getInfo('icons32');
+$pathModuleAdmin = $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin');
+
+$modulesHandler=& xoops_getModuleHandler('modules', $dirname);
+$tablesHandler=& xoops_getModuleHandler('tables', $dirname);
+$fieldsHandler=& xoops_getModuleHandler('fields', $dirname);
+$fieldtypeHandler=& xoops_getModuleHandler('fieldtype', $dirname);
+$fieldattributesHandler=& xoops_getModuleHandler('fieldattributes', $dirname);
+$fieldnullHandler=& xoops_getModuleHandler('fieldnull', $dirname);
+$fieldkeyHandler=& xoops_getModuleHandler('fieldkey', $dirname);
+$fieldelementsHandler=& xoops_getModuleHandler('fieldelements', $dirname);
+
+$myts =& MyTextSanitizer::getInstance();
+
+if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
+ include_once(XOOPS_ROOT_PATH . "/class/template.php");
+ $xoopsTpl = new XoopsTpl();
+}
+
+$xoopsTpl->assign('pathIcon16', $pathIcon16);
+$xoopsTpl->assign('pathIcon32', $pathIcon32);
+//Load languages
+xoops_loadLanguage('admin', $dirname);
+xoops_loadLanguage('modinfo', $dirname);
+xoops_loadLanguage('main', $dirname);
+
+// Locad admin menu class
+if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
+ include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
+}else{
+ redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false);
+}
+$adminMenu = new ModuleAdmin();
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/index.php 2013-10-02 16:08:49 UTC (rev 12120)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/index.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -18,7 +18,7 @@
* @author Txmod Xoops <su...@tx...>
* @version $Id: 1.59 index.php 11297 2013-03-24 10:58:10Z timgno $
*/
-include "admin_header.php";
+include 'header.php';
xoops_cp_header();
//count "total modules"
$count_mods = $modulesHandler->getCount();
@@ -29,6 +29,6 @@
$adminMenu->addInfoBox(_AM_TDMCREATE_STATISTICS);
$adminMenu->addInfoBoxLine(_AM_TDMCREATE_STATISTICS,_AM_TDMCREATE_THEREARE_NUMMODULES, $count_mods, ($count_mods == 0) ? $r : $g);
$adminMenu->addInfoBoxLine(_AM_TDMCREATE_STATISTICS,_AM_TDMCREATE_THEREARE_NUMTABLES, $count_tbls, ($count_tbls == 0) ? $r : $g);
- echo $adminMenu->addNavigation("index.php");
+ echo $adminMenu->addNavigation('index.php');
echo $adminMenu->renderIndex();// Render Index
-include "admin_footer.php";
\ No newline at end of file
+include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/modules.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/modules.php 2013-10-02 16:08:49 UTC (rev 12120)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/modules.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -18,7 +18,7 @@
* @author Txmod Xoops <su...@tx...>
* @version $Id: 1.59 modules.php 11297 2013-03-24 10:58:10Z timgno $
*/
-include 'admin_header.php';
+include 'header.php';
// Recovered the value of the argument op in the URL $
$op = TDMCreate_CleanVars($_REQUEST, 'op', 'list', 'string');
@@ -30,7 +30,7 @@
$start = TDMCreate_CleanVars($_REQUEST, 'start', 0);
// Define main template
$xoopsOption['template_main'] = 'tdmcreate_modules.html';
- xoops_cp_header();
+ xoops_cp_header();
$xoopsTpl->assign('navigation', $adminMenu->addNavigation('modules.php'));
$adminMenu->addItemButton(_AM_TDMCREATE_ADD_MODULE, 'modules.php?op=new', 'add');
$xoopsTpl->assign('button_new', $adminMenu->renderButton());
@@ -40,7 +40,7 @@
$criteria->setOrder('ASC');
$numrows = $modulesHandler->getCount();
$mods_arr = $modulesHandler->getAll( $criteria );
- unset($criteria);
+ unset($criteria);
// Display modules list
if ($numrows>0)
{
@@ -96,7 +96,9 @@
$obj =& $modulesHandler->create();
}
//Form module save
- $obj->setVars(array('mod_name' => $_POST['mod_name'], 'mod_version' => $_POST['mod_version'],
+ $obj->setVars(array('mod_name' => $_POST['mod_name'], 'mod_version' => $_POST['mod_version'],
+ 'mod_min_php' => $_POST['mod_min_php'], 'mod_min_xoops' => $_POST['mod_min_xoops'],
+ 'mod_min_admin' => $_POST['mod_min_admin'], 'mod_min_mysql' => $_POST['mod_min_mysql'],
'mod_description' => $_POST['mod_description'], 'mod_author' => $_POST['mod_author'], 'mod_author_mail' => $_POST['mod_author_mail'],
'mod_author_website_url' => $_POST['mod_author_website_url'],
'mod_author_website_name' => $_POST['mod_author_website_name'],
@@ -178,4 +180,4 @@
}
break;
}
-include 'admin_footer.php';
\ No newline at end of file
+include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/tables.php 2013-10-02 16:08:49 UTC (rev 12120)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/admin/tables.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -18,7 +18,7 @@
* @author Txmod Xoops <su...@tx...>
* @version $Id: 1.59 tables.php 11297 2013-03-24 10:58:10Z timgno $
*/
-include 'admin_header.php';
+include 'header.php';
// Recovered the value of the argument op in the URL $
$op = TDMCreate_CleanVars($_REQUEST, 'op', 'list', 'string');
$mod_id = TDMCreate_CleanVars($_REQUEST, 'mod_id', 0);
@@ -26,7 +26,7 @@
{
case 'list':
default:
- $limit = $GLOBALS['xoopsModuleConfig']['adminperpage'];
+ $limit = xoops_getModuleOption('adminperpage');
$start = TDMCreate_CleanVars($_REQUEST, 'start', 0);
// Define main template
$xoopsOption['template_main'] = 'tdmcreate_tables.html';
@@ -54,19 +54,19 @@
// Display modules list
if ( $numrows_modules > 0 )
{
- $_yes = "<img src='../images/icons/16/yellow.png' alt='"._YES."' title='"._YES."' />";
+ $_yyes = "<img src='../images/icons/16/yellow.png' alt='"._YES."' title='"._YES."' />";
$_no = "<img src='../images/icons/16/red.png' alt='"._NO."' title='"._NO."' />";
foreach (array_keys($mods_arr) as $i)
{
$mod['id'] = $i;
$mod['name'] = $mods_arr[$i]->getVar('mod_name');
$mod['image'] = $mods_arr[$i]->getVar('mod_image');
- $mod['admin'] = ( $mods_arr[$i]->getVar('mod_admin') == 1 ) ? $_yes : $_no;
- $mod['user'] = ( $mods_arr[$i]->getVar('mod_user') == 1 ) ? $_yes : $_no;
- $mod['submenu'] = ( $mods_arr[$i]->getVar('mod_submenu') == 1 ) ? $_yes : $_no;
- $mod['search'] = ( $mods_arr[$i]->getVar('mod_search') == 1 ) ? $_yes : $_no;
- $mod['comments'] = ( $mods_arr[$i]->getVar('mod_comments') == 1 ) ? $_yes : $_no;
- $mod['notifications'] = ( $mods_arr[$i]->getVar('mod_notifications') == 1 ) ? $_yes : $_no;
+ $mod['admin'] = ( $mods_arr[$i]->getVar('mod_admin') == 1 ) ? $_yyes : $_no;
+ $mod['user'] = ( $mods_arr[$i]->getVar('mod_user') == 1 ) ? $_yyes : $_no;
+ $mod['submenu'] = ( $mods_arr[$i]->getVar('mod_submenu') == 1 ) ? $_yyes : $_no;
+ $mod['search'] = ( $mods_arr[$i]->getVar('mod_search') == 1 ) ? $_yyes : $_no;
+ $mod['comments'] = ( $mods_arr[$i]->getVar('mod_comments') == 1 ) ? $_yyes : $_no;
+ $mod['notifications'] = ( $mods_arr[$i]->getVar('mod_notifications') == 1 ) ? $_yyes : $_no;
// Get the list of tables
$criteria = new CriteriaCompo();
$criteria->add(new Criteria('table_mid', $i));
@@ -101,8 +101,7 @@
$mod['tables'] = $tables;
$xoopsTpl->append('modules_list', $mod);
unset($mod);
- }
-
+ }
if ( $numrows_modules > $limit ) {
include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
$pagenav = new XoopsPageNav($numrows_modules, $limit, $start, 'start', 'op=list&limit=' . $limit);
@@ -111,7 +110,7 @@
} else {
$xoopsTpl->assign('error', 'There aren\'t modules');
}
- break;
+ break;
case 'new':
// Define main template
@@ -122,7 +121,7 @@
$xoopsTpl->assign('button_new', $adminMenu->renderButton());
$obj =& $tablesHandler->create();
- $form = $obj->getForm();
+ $form = $obj->getForm();
$xoopsTpl->assign('form', $form->render());
break;
@@ -140,6 +139,10 @@
$table_mid = intval($_REQUEST['table_mid']);
$table_nbfields = intval($_REQUEST['table_nbfields']);
$table_fieldname = strtolower($_REQUEST['table_fieldname']);
+ $_SESSION['field_tid'] = $tid;
+ $_SESSION['field_mid'] = $table_mid;
+ $_SESSION['field_numb'] = $table_nbfields;
+ $_SESSION['field_name'] = $table_fieldname;
//Form tables
$obj->setVars(array('table_mid' => $table_mid, 'table_name' => $_POST['table_name'],
'table_nbfields' => $table_nbfields, 'table_fieldname' => $table_fieldname));
@@ -150,8 +153,8 @@
}else{
$uploaddir = TDMC_UPLOAD_PATH.'/images/tables';
}
- $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'],
- $GLOBALS['xoopsModuleConfig']['maxsize'], null, null);
+ $uploader = new XoopsMediaUploader($uploaddir, xoops_getModuleOption('mimetypes'),
+ xoops_getModuleOption('maxsize'), null, null);
if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) {
$extension = preg_replace( '/^.+\.([^.]+)$/sU' , '\\1' , $_FILES['table_image']['name']);
$name_img = $_GET['table_name'].'.'.$extension;
@@ -159,7 +162,7 @@
$uploader->fetchMedia($_POST['xoops_upload_file'][0]);
if (!$uploader->upload()) {
$errors = $uploader->getErrors();
- redirect_header('javascript:history.go(-1)',3, $errors);
+ redirect_header('javascript:history.go(-1)', 3, $errors);
} else {
$obj->setVar('table_image', $uploader->getSavedFileName());
}
@@ -177,16 +180,16 @@
if( $tablesHandler->insert($obj) ) {
if( $obj->isNew() ) {
$tid = $GLOBALS['xoopsDB']->getInsertId();
- redirect_header('fields.php?op=new&field_tid='.$tid.'&field_mid='.$table_mid.'&field_numb='.$table_nbfields.'&field_name='.$table_fieldname, 3, _AM_TDMCREATE_FORMOK);
+ redirect_header('fields.php?op=new&field_tid='.$tid, 3, _AM_TDMCREATE_FORMOK);
} else {
redirect_header('tables.php', 3, _AM_TDMCREATE_FORMOK);
}
- }
+ }
$xoopsTpl->assign('error', $obj->getHtmlErrors());
$form = $obj->getForm();
$xoopsTpl->assign('form', $form->render());
- break;
+ break;
case 'edit':
// Define main template
@@ -199,7 +202,7 @@
$obj = $tablesHandler->get($_REQUEST['table_id']);
$form = $obj->getForm();
$xoopsTpl->assign('form', $form->render());
- break;
+ break;
case 'delete':
$obj =& $tablesHandler->get($_REQUEST['table_id']);
@@ -215,6 +218,6 @@
} else {
xoops_confirm(array('ok' => 1, 'table_id' => $_REQUEST['table_id'], 'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('table_name')));
}
- break;
+ break;
}
-include 'admin_footer.php';
\ No newline at end of file
+include 'footer.php';
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldattributes.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldattributes.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldattributes.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -0,0 +1,46 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.5
+ * @author Txmod Xoops <su...@tx...>
+ * @version $Id: 1.59 fieldattributes.php 11297 2013-03-24 10:58:10Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) { die("XOOPS root path not defined"); }
+
+class TDMCreateFieldattributes extends XoopsObject
+{
+ //Constructor
+ function __construct()
+ {
+ $this->XoopsObject();
+ $this->initVar('fieldattribute_value', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('fieldattribute_name', XOBJ_DTYPE_TXTBOX);
+ }
+
+ //Constructor
+ function TDMCreateFieldattributes()
+ {
+ $this->__construct();
+ }
+}
+
+class TDMCreateFieldattributesHandler extends XoopsPersistableObjectHandler
+{
+ function __construct(&$db)
+ {
+ parent::__construct($db, 'mod_tdmcreate_fieldattributes', 'tdmcreatefieldattributes', 'fieldattribute_value', 'fieldattribute_name');
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldelements.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldelements.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldelements.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -0,0 +1,54 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.5
+ * @author Txmod Xoops <su...@tx...>
+ * @version $Id: 1.59 fieldelements.php 11297 2013-03-24 10:58:10Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) { die("XOOPS root path not defined"); }
+
+class TDMCreateFieldelements extends XoopsObject
+{
+ //Constructor
+ function __construct()
+ {
+ $this->XoopsObject();
+ $this->initVar('fieldelement_id', XOBJ_DTYPE_INT);
+ $this->initVar('fieldelement_value', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('fieldelement_name', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('fieldelement_admin', XOBJ_DTYPE_INT);
+ $this->initVar('fieldelement_inlist', XOBJ_DTYPE_INT);
+ $this->initVar('fieldelement_pid', XOBJ_DTYPE_INT);
+ $this->initVar('fieldelement_user', XOBJ_DTYPE_INT);
+ $this->initVar('fieldelement_block', XOBJ_DTYPE_INT);
+ $this->initVar('fieldelement_mfield', XOBJ_DTYPE_INT);
+ $this->initVar('fieldelement_search', XOBJ_DTYPE_INT);
+ $this->initVar('fieldelement_required', XOBJ_DTYPE_INT);
+ }
+
+ //Constructor
+ function TDMCreateFieldelements()
+ {
+ $this->__construct();
+ }
+}
+class TDMCreateFieldelementsHandler extends XoopsPersistableObjectHandler
+{
+ function __construct(&$db)
+ {
+ parent::__construct($db, 'mod_tdmcreate_fieldelements', 'tdmcreatefieldelements', 'fieldelement_id', 'fieldelement_name');
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldkey.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldkey.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldkey.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -0,0 +1,45 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.5
+ * @author Txmod Xoops <su...@tx...>
+ * @version $Id: 1.59 fieldkey.php 11297 2013-03-24 10:58:10Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) { die("XOOPS root path not defined"); }
+
+class TDMCreateFieldkey extends XoopsObject
+{
+ //Constructor
+ function __construct()
+ {
+ $this->XoopsObject();
+ $this->initVar('fieldkey_value', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('fieldkey_name', XOBJ_DTYPE_TXTBOX);
+ }
+
+ //Constructor
+ function TDMCreateFieldkey()
+ {
+ $this->__construct();
+ }
+}
+class TDMCreateFieldkeyHandler extends XoopsPersistableObjectHandler
+{
+ function __construct(&$db)
+ {
+ parent::__construct($db, 'mod_tdmcreate_fieldkey', 'tdmcreatefieldkey', 'fieldkey_value', 'fieldkey_name');
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldnull.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldnull.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldnull.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -0,0 +1,46 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.5
+ * @author Txmod Xoops <su...@tx...>
+ * @version $Id: 1.59 fieldnull.php 11297 2013-03-24 10:58:10Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) { die("XOOPS root path not defined"); }
+
+class TDMCreateFieldnull extends XoopsObject
+{
+ //Constructor
+ function __construct()
+ {
+ $this->XoopsObject();
+ $this->initVar('fieldnull_value', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('fieldnull_name', XOBJ_DTYPE_TXTBOX);
+ }
+
+ //Constructor
+ function TDMCreateFieldnull()
+ {
+ $this->__construct();
+ }
+}
+
+class TDMCreateFieldnullHandler extends XoopsPersistableObjectHandler
+{
+ function __construct(&$db)
+ {
+ parent::__construct($db, 'mod_tdmcreate_fieldnull', 'tdmcreatefieldnull', 'fieldnull_value', 'fieldnull_name');
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fields.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fields.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fields.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -0,0 +1,215 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.5
+ * @author Txmod Xoops <su...@tx...>
+ * @version $Id: 1.59 fields.php 11297 2013-03-24 10:58:10Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) { die("XOOPS root path not defined"); }
+
+class TDMCreateFields extends XoopsObject
+{
+ //Constructor
+ function __construct()
+ {
+ $this->XoopsObject();
+ $this->initVar('field_id', XOBJ_DTYPE_INT);
+ $this->initVar('field_mid', XOBJ_DTYPE_INT);
+ $this->initVar('field_tid', XOBJ_DTYPE_INT);
+ $this->initVar('field_name', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_numb', XOBJ_DTYPE_INT);
+ $this->initVar('field_type', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_value', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_attribute', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_null', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_default', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_key', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('field_auto_increment', XOBJ_DTYPE_INT);
+ $this->initVar('field_admin', XOBJ_DTYPE_INT);
+ $this->initVar('field_user', XOBJ_DTYPE_INT);
+ $this->initVar('field_blocks', XOBJ_DTYPE_INT);
+ $this->initVar('field_mainfield', XOBJ_DTYPE_INT);
+ $this->initVar('field_search', XOBJ_DTYPE_INT);
+ $this->initVar('field_required', XOBJ_DTYPE_INT);
+ }
+
+ function TDMCreateFields()
+ {
+ $this->__construct();
+ }
+
+ function getForm($table_id = null, $table_mid = null, $table_nbfields = null, $table_fieldname = null, $action = false)
+ {
+ if ($action === false) {
+ $action = $_SERVER['REQUEST_URI'];
+ }
+
+ $title = $this->isNew() ? sprintf(_AM_TDMCREATE_FIELD_ADD) : sprintf(_AM_TDMCREATE_FIELD_EDIT);
+
+ $tablesHandler = xoops_getModuleHandler('tables');
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('table_mid', $table_mid));
+ $criteria->setSort('table_name');
+ $criteria->setOrder('ASC');
+ $tables_arr = $tablesHandler->getall($criteria);
+ unset($criteria);
+
+ include_once(XOOPS_ROOT_PATH.'/class/xoopsformloader.php');
+ include_once(XOOPS_ROOT_PATH.'/modules/TDMCreate/class/themeform.php');
+
+ $headers = array(_AM_TDMCREATE_FIELD_NUMBER, _AM_TDMCREATE_FIELD_NAME, _AM_TDMCREATE_FIELD_TYPE, _AM_TDMCREATE_FIELD_VALUE, _AM_TDMCREATE_FIELD_ATTRIBUTE, _AM_TDMCREATE_FIELD_NULL, _AM_TDMCREATE_FIELD_DEFAULT, _AM_TDMCREATE_FIELD_KEY, _AM_TDMCREATE_FIELD_OTHERS);
+ // $act = 'save&field_tid='.$tid.'&field_numb='.$tfn.'&field_name='.$tfname; .'?op='.$act
+ $form = new TDMCreateThemeForm($title, $headers, 'form', $action, 'post', true);
+ $form->setExtra('enctype="multipart/form-data"');
+
+ if (!$this->isNew()) {
+ $form->addElement(new XoopsFormHidden('field_mid', $this->getVar('field_mid')));
+ } else {
+ $form->addElement(new XoopsFormHidden('field_mid', $table_mid));
+ }
+
+ if (!$this->isNew()) {
+ $form->addElement(new XoopsFormHidden('field_tid', $this->getVar('field_tid')));
+ } else {
+ $form->addElement(new XoopsFormHidden('field_tid', $table_id));
+ }
+
+ if (!$this->isNew()) {
+ $nbfields = $this->getVar('field_numb');
+ } else {
+ $nbfields = $table_nbfields;
+ }
+ include_once(XOOPS_ROOT_PATH.'/modules/TDMCreate/class/htmltable.php');
+ // New Object HtmlTable
+ $tableForm = new TDMCreateHtmlTable(null, 'display outer');
+
+ for($i = 1; $i <= $nbfields; $i++)//3
+ {
+ $field_value = ( $i == 1 ) ? '8' : $this->getVar('field_value');
+ $fieldname = $this->isNew() ? $table_fieldname : $this->getVar('field_name');
+ $field_name = new XoopsFormText(_AM_TDMCREATE_FIELD_NAME, 'field_name['.$i.']', 10, 50, $fieldname);
+ // fieldtype
+ $fieldtypeHandler=& xoops_getModuleHandler('tdmcreate_fieldtype');
+ $fieldtype_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_type['.$i.']', $this->getVar('field_type'));
+ $fieldtype_select->addOptionArray($fieldtypeHandler->getList());
+ // fieldvalue
+ $field_value = new XoopsFormText(_AM_TDMCREATE_FIELD_VALUE, 'field_value['.$i.']', 3, 5, $field_value);
+ // fieldattributes
+ $fieldattrsHandler=& xoops_getModuleHandler('tdmcreate_fieldattributes');
+ $field_attributes_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_TYPE, 'field_attribute['.$i.']', $this->getVar('field_attribute'));
+ $field_attributes_select->addOptionArray($fieldattrsHandler->getList());
+ // fieldnull
+ $fieldnullHandler=& xoops_getModuleHandler('tdmcreate_fieldnull');
+ $field_null_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_NULL, 'field_null['.$i.']', $this->getVar('field_null'));
+ $field_null_select->addOptionArray($fieldnullHandler->getList());
+ // fielddefault
+ $field_default = new XoopsFormText(_AM_TDMCREATE_FIELD_DEFAULT, 'field_default['.$i.']', 15, 25, $this->getVar('field_default'));
+ // fieldkey
+ $fieldkeyHandler=& xoops_getModuleHandler('tdmcreate_fieldkey');
+ $field_key_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_KEY, 'field_key['.$i.']', $this->getVar('field_key'));
+ $field_key_select->addOptionArray($fieldkeyHandler->getList());
+ // render fields
+ $tableFormDataArray = array($i, $field_name->render(), $fieldtype_select->render(), $field_value->render(), $field_attributes_select->render(), $field_null_select->render(), $field_default->render(), $field_key_select->render());
+ // data row
+ $tableForm->addRow('center bgyellow');
+ $tableForm->addCells($tableFormDataArray, 'first', 'data');
+ $tableOtherForm = new TDMCreate_HtmlTable(null, 'display');
+ if($i == 1) {
+ $field_autoincrement = $this->isNew() ? 0 : $this->getVar('field_auto_increment');
+ $check_field_autoincrement = new XoopsFormCheckBox(' ', 'field_auto_increment['.$i.']', $field_autoincrement);
+ $check_field_autoincrement->addOption(1, _AM_TDMCREATE_FIELD_AUTO_INCREMENT);
+ // data row
+ $tableOtherForm->addRow();
+ $tableOtherForm->addCell($check_field_autoincrement->render(), null, 'data');
+ } elseif($i > 1) {
+ // Box header row
+ $tableOtherForm->addRow('center bgyellow');
+ $tableOtherForm->addCell(_AM_TDMCREATE_FIELD_ELEMENTS, 'first', 'header');
+ // fieldelements
+ $fieldelementsHandler=& xoops_getModuleHandler('tdmcreate_fieldelements');
+ $field_elements_select = new XoopsFormSelect(_AM_TDMCREATE_FIELD_ELEMENT_NAME, 'field_element_name['.$i.']', $this->getVar('field_element_name'));
+ $field_elements_select->addOptionArray($fieldelementsHandler->getList());
+ foreach (array_keys($tables_arr) as $j)
+ {
+ $tables_name = $tables_arr[$j]->getVar('table_name');
+ if ( $j[$i] == 'XoopsFormTables-'.$tables_name ) {
+ $field_elements_select->addOption('XoopsFormTables-'.$tables_name, 'Table : '.$tables_name);
+ }
+ }
+ // data row
+ $tableOtherForm->addRow();
+ $tableOtherForm->addCell($field_elements_select->render(), null, 'data');
+ $field_admin = $this->isNew() ? 0 : $this->getVar('field_admin');
+ $check_field_admin = new XoopsFormCheckBox(' ', 'field_admin['.$i.']', $field_admin);
+ $check_field_admin->addOption(1, _AM_TDMCREATE_FIELD_ADMIN);
+ // data row
+ $tableOtherForm->addRow();
+ $tableOtherForm->addCell($check_field_admin->render(), null, 'data');
+ $field_user = $this->isNew() ? 0 : $this->getVar('field_user');
+ $check_field_user = new XoopsFormCheckBox(' ', 'field_user['.$i.']', $field_user);
+ $check_field_user->addOption(1, _AM_TDMCREATE_FIELD_USER);
+ // data row
+ $tableOtherForm->addRow();
+ $tableOtherForm->addCell($check_field_user->render(), null, 'data');
+ $field_blocks = $this->isNew() ? 0 : $this->getVar('field_blocks');
+ $check_field_blocks = new XoopsFormCheckBox(' ', 'field_blocks['.$i.']', $field_blocks);
+ $check_field_blocks->addOption(1, _AM_TDMCREATE_FIELD_BLOCK);
+ // data row
+ $tableOtherForm->addRow();
+ $tableOtherForm->addCell($check_field_blocks->render(), null, 'data');
+ $field_mnfield = $this->isNew() ? 0 : $this->getVar('field_mainfield');
+ $field_mainfield = new XoopsFormRadio(' ', 'field_mainfield['.$i.']', $field_mnfield);
+ $field_mainfield->addOption( $i, _AM_TDMCREATE_FIELD_MAINFIELD );
+ $checked_field_mainfield = ( $i == 1 ) ? ' checked' : '';
+ $field_mainfield->setExtra($checked_field_mainfield);
+ // data row
+ $tableOtherForm->addRow();
+ $tableOtherForm->addCell($field_mainfield->render(), null, 'data');
+ $field_search = $this->isNew() ? 0 : $this->getVar('field_search');
+ $check_field_search = new XoopsFormCheckBox(' ', 'field_search['.$i.']', $field_search);
+ $check_field_search->addOption(1, _AM_TDMCREATE_FIELD_SEARCH);
+ // data row
+ $tableOtherForm->addRow();
+ $tableOtherForm->addCell($check_field_search->render(), null, 'data');
+ $field_required = $this->isNew() ? 0 : $this->getVar('field_required');
+ $check_field_required = new XoopsFormCheckBox(' ', 'field_required['.$i.']', $field_required);
+ $check_field_required->addOption(1, _AM_TDMCREATE_FIELD_REQUIRED);
+ // data row
+ $tableOtherForm->addRow();
+ $tableOtherForm->addCell($check_field_required->render(), null, 'data');
+ }
+ $tableForm->addCell($tableOtherForm->display(), null, 'data');
+ }
+
+ if (!$this->isNew()) {
+ $form->addElement(new XoopsFormHidden('field_id', $this->getVar('field_id')));
+ }
+
+ $form->addElement(new XoopsFormHidden('op', 'save'));
+ $tableFormButton = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
+ $tableForm->addRow('txtright grey');
+ $tableForm->addCell($tableFormButton->render(), null, 'data');
+ $form->addElement($tableForm->display());
+ return $form;
+ }
+}
+class TDMCreateFieldsHandler extends XoopsPersistableObjectHandler
+{
+ function __construct(&$db)
+ {
+ parent::__construct($db, 'mod_tdmcreate_fields', 'tdmcreatefields', 'field_id', 'field_name');
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldtype.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldtype.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/fieldtype.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -0,0 +1,45 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+/**
+ * tdmcreate module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package tdmcreate
+ * @since 2.5.5
+ * @author Txmod Xoops <su...@tx...>
+ * @version $Id: 1.59 fieldtype.php 11297 2013-03-24 10:58:10Z timgno $
+ */
+if (!defined('XOOPS_ROOT_PATH')) { die("XOOPS root path not defined"); }
+
+class TDMCreateFieldtype extends XoopsObject
+{
+ //Constructor
+ function __construct()
+ {
+ $this->XoopsObject();
+ $this->initVar('fieldtype_value', XOBJ_DTYPE_TXTBOX);
+ $this->initVar('fieldtype_name', XOBJ_DTYPE_TXTBOX);
+ }
+
+ //Constructor
+ function TDMCreateFieldtype()
+ {
+ $this->__construct();
+ }
+}
+class TDMCreateFieldtypeHandler extends XoopsPersistableObjectHandler
+{
+ function __construct(&$db)
+ {
+ parent::__construct($db, 'mod_tdmcreate_fieldtype', 'tdmcreatefieldtype', 'fieldtype_value', 'fieldtype_name');
+ }
+}
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/htmltable.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/htmltable.php (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.59/TDMCreate/class/htmltable.php 2013-10-03 07:03:28 UTC (rev 12121)
@@ -0,0 +1,192 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTIC...
[truncated message content] |
|
From: <luc...@us...> - 2013-10-02 16:08:52
|
Revision: 12120
http://sourceforge.net/p/xoops/svn/12120
Author: luciorota
Date: 2013-10-02 16:08:49 +0000 (Wed, 02 Oct 2013)
Log Message:
-----------
better sortby
some more checks
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/common.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php
XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php
XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/review.php
XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_common_letterschoice.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_viewcat.html
XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php 2013-10-02 12:41:05 UTC (rev 12119)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php 2013-10-02 16:08:49 UTC (rev 12120)
@@ -23,8 +23,14 @@
$lid = WfdownloadsRequest::getInt('lid', 0);
$download = $wfdownloads->getHandler('download')->get($lid);
+if (empty($download)) {
+ redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NODOWNLOAD);
+}
$cid = WfdownloadsRequest::getInt('cid', $download->getVar('cid'));
$category = $wfdownloads->getHandler('category')->get($cid);
+if (empty($category)) {
+ redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NOCATEGORY);
+}
// Download not published, expired or taken offline - redirect
if ($download->getVar('published') == 0 || $download->getVar('published') > time() || $download->getVar('offline') == true || ($download->getVar('expired') == true && $download->getVar('expired') < time()) || $download->getVar('status') == 0) {
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-10-02 12:41:05 UTC (rev 12119)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-10-02 16:08:49 UTC (rev 12120)
@@ -1,4 +1,4 @@
-<b><u>=> Version 3.23 Beta (2013-09-30)</u></b>
+<b><u>=> Version 3.23 Beta (2013-10-02)</u></b>
- module standardization: header.php, admin/admin_header.php, xoops_version.php
- module standardization: standardize directories/files names/structures
- module standardization: standardize code headers
@@ -19,7 +19,7 @@
- added: admin side downloads filter (luciorota)
- added: breadcrumb class (luciorota)
- added: new autosummary option: autosummary if summary field is empty (luciorota)
-- added: xoops/multilanguages/html tags compatible autosummary generator (luciorota)
+- added: xoops/xlanguage/html tags compatible autosummary generator (luciorota)
- added: sort subcategories by cid or title or weight (luciorota)
- added: improved by letters choice bar (luciorota)
- added: wfdownloads_submit.html template for submit.php (luciorota)
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/common.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/common.php 2013-10-02 12:41:05 UTC (rev 12119)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/common.php 2013-10-02 16:08:49 UTC (rev 12120)
@@ -34,3 +34,6 @@
define("_CO_WFDOWNLOADS_STATUS","Status");
define("_CO_WFDOWNLOADS_ACTIONS","Actions");
define("_CO_WFDOWNLOADS_LEGEND","Legend");
+
+define("_CO_WFDOWNLOADS_ERROR_NOCATEGORY","Error: non-existent category");
+define("_CO_WFDOWNLOADS_ERROR_NODOWNLOAD","Error: non-existent download");
\ No newline at end of file
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php 2013-10-02 12:41:05 UTC (rev 12119)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php 2013-10-02 16:08:49 UTC (rev 12120)
@@ -325,3 +325,5 @@
define("_MD_WFDOWNLOADS_SUBCATEGORIESLISTING","Subcategories listing");
define("_MD_WFDOWNLOADS_DOWNLOADSLISTING","Downloads listing");
+
+define("_MD_WFDOWNLOADS_SORTDOWNLOADSBY","Sort downloads by");
\ No newline at end of file
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php 2013-10-02 12:41:05 UTC (rev 12119)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php 2013-10-02 16:08:49 UTC (rev 12120)
@@ -23,8 +23,14 @@
$lid = WfdownloadsRequest::getInt('lid', 0);
$download = $wfdownloads->getHandler('download')->get($lid);
+if (empty($download)) {
+ redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NODOWNLOAD);
+}
$cid = WfdownloadsRequest::getInt('cid', $download->getVar('cid'));
$category = $wfdownloads->getHandler('category')->get($cid);
+if (empty($category)) {
+ redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NOCATEGORY);
+}
// Download not published, expired or taken offline - redirect
if ($download->getVar('published') == 0 || $download->getVar('published') > time() || $download->getVar('offline') == 1 || ($download->getVar('expired') != 0 && $download->getVar('expired') < time()) || $download->getVar('status') == 0) {
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php 2013-10-02 12:41:05 UTC (rev 12119)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php 2013-10-02 16:08:49 UTC (rev 12120)
@@ -23,8 +23,14 @@
$lid = WfdownloadsRequest::getInt('lid', 0);
$download = $wfdownloads->getHandler('download')->get($lid);
+if (empty($download)) {
+ redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NODOWNLOAD);
+}
$cid = WfdownloadsRequest::getInt('cid', $download->getVar('cid'));
$category = $wfdownloads->getHandler('category')->get($cid);
+if (empty($category)) {
+ redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NOCATEGORY);
+}
// Download not published, expired or taken offline - redirect
if ($download->getVar('published') == false || $download->getVar('published') > time() || $download->getVar('offline') == true || ($download->getVar('expired') != 0 && $download->getVar('expired') < time())) {
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/review.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/review.php 2013-10-02 12:41:05 UTC (rev 12119)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/review.php 2013-10-02 16:08:49 UTC (rev 12120)
@@ -23,8 +23,14 @@
$lid = WfdownloadsRequest::getInt('lid', 0);
$download = $wfdownloads->getHandler('download')->get($lid);
+if (empty($download)) {
+ redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NODOWNLOAD);
+}
$cid = WfdownloadsRequest::getInt('cid', $download->getVar('cid'));
$category = $wfdownloads->getHandler('category')->get($cid);
+if (empty($category)) {
+ redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NOCATEGORY);
+}
// Download not published, expired or taken offline - redirect
if ($download->getVar('published') == 0 || $download->getVar('published') > time() || $download->getVar('offline') == true || ($download->getVar('expired') != 0 && $download->getVar('expired') < time()) || $download->getVar('status') == 0) {
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php 2013-10-02 12:41:05 UTC (rev 12119)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php 2013-10-02 16:08:49 UTC (rev 12120)
@@ -23,8 +23,14 @@
$lid = WfdownloadsRequest::getInt('lid', 0);
$download = $wfdownloads->getHandler('download')->get($lid);
+if (empty($download)) {
+ redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NODOWNLOAD);
+}
$cid = WfdownloadsRequest::getInt('cid', $download->getVar('cid'));
$category = $wfdownloads->getHandler('category')->get($cid);
+if (empty($category)) {
+ redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NOCATEGORY);
+}
// Check permissions
$userGroups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_common_letterschoice.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_common_letterschoice.html 2013-10-02 12:41:05 UTC (rev 12119)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_common_letterschoice.html 2013-10-02 16:08:49 UTC (rev 12120)
@@ -20,11 +20,13 @@
font-style:normal;
height:20px;
line-height:20px;
- width:18px;
+ width:auto;
+ min-width:10px;
text-decoration:none;
text-align:center;
text-shadow:1px 1px 0px #d9fbbe;
margin: 2px 0px;
+ padding: 0px 4px;
}
.button_green:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b8e356), color-stop(1, #a5cc52) );
@@ -54,11 +56,13 @@
font-style:normal;
height:20px;
line-height:20px;
- width:18px;
+ width:auto;
+ min-width:10px;
text-decoration:none;
text-align:center;
text-shadow:1px 1px 0px #ffffff;
margin: 2px 0px;
+ padding: 0px 4px;
}
.button_grey:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #dfdfdf), color-stop(1, #ededed) );
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_viewcat.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_viewcat.html 2013-10-02 12:41:05 UTC (rev 12119)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_viewcat.html 2013-10-02 16:08:49 UTC (rev 12120)
@@ -64,21 +64,131 @@
<div>
<h3><{$smarty.const._MD_WFDOWNLOADS_DOWNLOADSLISTING}></h3>
<{if $show_links == true}>
+<style type="text/css">
+.button_green {
+ -moz-box-shadow:inset 0px 1px 0px 0px #d9fbbe;
+ -webkit-box-shadow:inset 0px 1px 0px 0px #d9fbbe;
+ box-shadow:inset 0px 1px 0px 0px #d9fbbe;
+ background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #d9fbbe), color-stop(1, #d9fbbe) );
+ background:-moz-linear-gradient( center top, #a5cc52 5%, #d9fbbe 100% );
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d9fbbe', endColorstr='#b8e356');
+ background-color:#d9fbbe;
+ -webkit-border-radius:2px;
+ -moz-border-radius:2px;
+ border-radius:2px;
+ text-indent:0;
+ border:1px solid #83c41a;
+ display:inline-block;
+ color:inherit;
+ font-family:inherit;
+ font-size:12px;
+ font-weight:bold;
+ font-style:normal;
+ height:20px;
+ line-height:20px;
+ width:auto;
+ min-width:10px;
+ text-decoration:none;
+ text-align:center;
+ text-shadow:1px 1px 0px #d9fbbe;
+ margin: 2px 0px;
+ padding: 0px 4px;
+}
+.button_green:hover {
+ background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #b8e356), color-stop(1, #a5cc52) );
+ background:-moz-linear-gradient( center top, #b8e356 5%, #a5cc52 100% );
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b8e356', endColorstr='#a5cc52');
+ background-color:#86ae47;
+}.button_green:active {
+ position:relative;
+ top:1px;
+}
+
+.button_grey {
+ background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
+ background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% );
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf');
+ background-color:#ededed;
+ -webkit-border-radius:2px;
+ -moz-border-radius:2px;
+ border-radius:2px;
+ text-indent:0;
+ border:1px solid #dcdcdc;
+ display:inline-block;
+ color:inherit;
+ font-family:inherit;
+ font-size:12px;
+ font-weight:bold;
+ font-style:normal;
+ height:20px;
+ line-height:20px;
+ width:auto;
+ min-width:10px;
+ text-decoration:none;
+ text-align:center;
+ text-shadow:1px 1px 0px #ffffff;
+ margin: 2px 0px;
+ padding: 0px 4px;
+}
+.button_grey:hover {
+ background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #dfdfdf), color-stop(1, #ededed) );
+ background:-moz-linear-gradient( center top, #dfdfdf 5%, #ededed 100% );
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf', endColorstr='#ededed');
+ background-color:#dfdfdf;
+}.button_grey:active {
+ position:relative;
+ top:1px;
+}
+</style>
<div>
- <small>
- <b><{$smarty.const._MD_WFDOWNLOADS_SORTBY}></b>
- <a href="viewcat.php?cid=<{$category_cid}>&orderby=titleA"><{$smarty.const._MD_WFDOWNLOADS_TITLE}> ↑</a> <a href="viewcat.php?cid=<{$category_cid}>&orderby=titleD"><{$smarty.const._MD_WFDOWNLOADS_TITLE}> ↓</a>
+ <small><b><span title="<{$smarty.const._MD_WFDOWNLOADS_SORTDOWNLOADSBY}>"><{$lang_cursortedby}></span></b></small>
+ <div>
+ <{if ($orderby == "titleA")}>
+ <span class='button_green' title="<{$smarty.const._MD_WFDOWNLOADS_TITLEATOZ}>"><{$smarty.const._MD_WFDOWNLOADS_TITLE}> <img src="<{xoModuleIcons16 up.gif}>" alt="↑"></span>
+ <{else}>
+ <a class='button_grey' href="viewcat.php?cid=<{$category_cid}>&orderby=titleA" title="<{$smarty.const._MD_WFDOWNLOADS_TITLEATOZ}>"><{$smarty.const._MD_WFDOWNLOADS_TITLE}> <img src="<{xoModuleIcons16 up.gif}>" alt="↑"></a>
+ <{/if}>
+ <{if ($orderby == "titleD")}>
+ <span class='button_green' title="<{$smarty.const._MD_WFDOWNLOADS_TITLEZTOA}>"><{$smarty.const._MD_WFDOWNLOADS_TITLE}> <img src="<{xoModuleIcons16 down.gif}>" alt="↓"></span>
+ <{else}>
+ <a class='button_grey' href="viewcat.php?cid=<{$category_cid}>&orderby=titleD" title="<{$smarty.const._MD_WFDOWNLOADS_TITLEZTOA}>"><{$smarty.const._MD_WFDOWNLOADS_TITLE}> <img src="<{xoModuleIcons16 down.gif}>" alt="↓"></a>
+ <{/if}>
|
- <a href="viewcat.php?cid=<{$category_cid}>&orderby=dateA"><{$smarty.const._MD_WFDOWNLOADS_DATE}> ↑</a> <a href="viewcat.php?cid=<{$category_cid}>&orderby=dateD"><{$smarty.const._MD_WFDOWNLOADS_DATE}> ↓</a>
+ <{if ($orderby == "dateA")}>
+ <span class='button_green' title="<{$smarty.const._MD_WFDOWNLOADS_DATEOLD}>"><{$smarty.const._MD_WFDOWNLOADS_DATE}> <img src="<{xoModuleIcons16 up.gif}>" alt="↑"></span>
+ <{else}>
+ <a class='button_grey' href="viewcat.php?cid=<{$category_cid}>&orderby=dateA" title="<{$smarty.const._MD_WFDOWNLOADS_DATEOLD}>"><{$smarty.const._MD_WFDOWNLOADS_DATE}> <img src="<{xoModuleIcons16 up.gif}>" alt="↑"></a>
+ <{/if}>
+ <{if ($orderby == "dateD")}>
+ <span class='button_green' title="<{$smarty.const._MD_WFDOWNLOADS_DATENEW}>"><{$smarty.const._MD_WFDOWNLOADS_DATE}> <img src="<{xoModuleIcons16 down.gif}>" alt="↓"></span>
+ <{else}>
+ <a class='button_grey' href="viewcat.php?cid=<{$category_cid}>&orderby=dateD" title="<{$smarty.const._MD_WFDOWNLOADS_DATENEW}>"><{$smarty.const._MD_WFDOWNLOADS_DATE}> <img src="<{xoModuleIcons16 down.gif}>" alt="↓"></a>
+ <{/if}>
|
<{if $use_ratings == true}>
- <a href="viewcat.php?cid=<{$category_cid}>&orderby=ratingA"><{$smarty.const._MD_WFDOWNLOADS_RATING}> ↑</a> <a href="viewcat.php?cid=<{$category_cid}>&orderby=ratingD"><{$smarty.const._MD_WFDOWNLOADS_RATING}> ↓</a>
+ <{if ($orderby == "ratingA")}>
+ <span class='button_green' title="<{$smarty.const._MD_WFDOWNLOADS_RATINGLTOH}>"><{$smarty.const._MD_WFDOWNLOADS_RATING}> <img src="<{xoModuleIcons16 up.gif}>" alt="↑"></span>
+ <{else}>
+ <a class='button_grey' href="viewcat.php?cid=<{$category_cid}>&orderby=ratingA" title="<{$smarty.const._MD_WFDOWNLOADS_RATINGLTOH}>"><{$smarty.const._MD_WFDOWNLOADS_RATING}> <img src="<{xoModuleIcons16 up.gif}>" alt="↑"></a>
+ <{/if}>
+ <{if ($orderby == "ratingD")}>
+ <span class='button_green' title="<{$smarty.const._MD_WFDOWNLOADS_RATINGHTOL}>"><{$smarty.const._MD_WFDOWNLOADS_RATING}> <img src="<{xoModuleIcons16 down.gif}>" alt="↓"></span>
+ <{else}>
+ <a class='button_grey' href="viewcat.php?cid=<{$category_cid}>&orderby=ratingD" title="<{$smarty.const._MD_WFDOWNLOADS_RATINGHTOL}>"><{$smarty.const._MD_WFDOWNLOADS_RATING}> <img src="<{xoModuleIcons16 down.gif}>" alt="↓"></a>
+ <{/if}>
|
<{/if}>
- <a href="viewcat.php?cid=<{$category_cid}>&orderby=hitsA"><{$smarty.const._MD_WFDOWNLOADS_POPULARITY}> ↑</a> <a href="viewcat.php?cid=<{$category_cid}>&orderby=hitsD"><{$smarty.const._MD_WFDOWNLOADS_POPULARITY}> ↓</a>
- <br />
- <b><{$lang_cursortedby}></b>
- </small>
+ <{if ($orderby == "hitsA")}>
+ <span class='button_green' title="<{$smarty.const._MD_WFDOWNLOADS_POPULARITYLTOM}>"><{$smarty.const._MD_WFDOWNLOADS_POPULARITY}> <img src="<{xoModuleIcons16 up.gif}>" alt="↑"></span>
+ <{else}>
+ <a class='button_grey' href="viewcat.php?cid=<{$category_cid}>&orderby=hitsA" title="<{$smarty.const._MD_WFDOWNLOADS_POPULARITYLTOM}>"><{$smarty.const._MD_WFDOWNLOADS_POPULARITY}> <img src="<{xoModuleIcons16 up.gif}>" alt="↑"></a>
+ <{/if}>
+ <{if ($orderby == "hitsD")}>
+ <span class='button_green' title="<{$smarty.const._MD_WFDOWNLOADS_POPULARITYMTOL}>"><{$smarty.const._MD_WFDOWNLOADS_POPULARITY}> <img src="<{xoModuleIcons16 down.gif}>" alt="↓"></span>
+ <{else}>
+ <a class='button_grey' href="viewcat.php?cid=<{$category_cid}>&orderby=hitsD" title="<{$smarty.const._MD_WFDOWNLOADS_POPULARITYMTOL}>"><{$smarty.const._MD_WFDOWNLOADS_POPULARITY}> <img src="<{xoModuleIcons16 down.gif}>" alt="↓"></a>
+ <{/if}>
+ </div>
</div>
<{/if}>
<br />
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php 2013-10-02 12:41:05 UTC (rev 12119)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php 2013-10-02 16:08:49 UTC (rev 12120)
@@ -24,6 +24,7 @@
$cid = WfdownloadsRequest::getInt('cid', 0);
$start = WfdownloadsRequest::getInt('start', 0);
//$list = WfdownloadsRequest::getString('list', null);
+//$orderby = WfdownloadsRequest::getString('orderby', null);
$orderby = isset($_GET['orderby']) ? convertorderbyin($_GET['orderby']) : $wfdownloads->getConfig('filexorder');
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
@@ -54,6 +55,12 @@
}
}
+// Get category object
+$category = $wfdownloads->getHandler('category')->get($cid);
+if (empty($category)) {
+ redirect_header('index.php', 3, _CO_WFDOWNLOADS_ERROR_NOCATEGORY);
+}
+
// Get download/upload permissions
$allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfdownloads->getModule()->mid());
$allowedUpCategoriesIds = $gperm_handler->getItemIds('WFUpCatPerm', $groups, $wfdownloads->getModule()->mid());
@@ -65,7 +72,6 @@
$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/thickbox.css');
$xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
-$category = $wfdownloads->getHandler('category')->get($cid);
$xoopsTpl->assign('cid', $cid); // this definition is not removed for compatibility issues
$xoopsTpl->assign('category_id', $cid); // this definition is not removed for compatibility issues
$xoopsTpl->assign('category_cid', $cid);
@@ -255,6 +261,7 @@
if ($downloads_count > 1 && $cid != 0) {
$xoopsTpl->assign('show_links', true);
$orderbyTrans = convertorderbytrans($orderby);
+ $xoopsTpl->assign('orderby', convertorderbyout($orderby));
$xoopsTpl->assign('lang_cursortedby', sprintf(_MD_WFDOWNLOADS_CURSORTBY, convertorderbytrans($orderby)));
$orderby = convertorderbyout($orderby);
}
@@ -282,7 +289,7 @@
$xoopsTpl->assign('pagenav', $pagenav->renderNav());
}
-$xoopsTpl->assign('use_ratings', $wfdownloads->getConfig('enable_mirrors'));
+$xoopsTpl->assign('use_mirrors', $wfdownloads->getConfig('enable_mirrors'));
$xoopsTpl->assign('use_ratings', $wfdownloads->getConfig('enable_ratings'));
$xoopsTpl->assign('use_reviews', $wfdownloads->getConfig('enable_reviews'));
$xoopsTpl->assign('use_rss', $wfdownloads->getConfig('enablerss'));
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-10-02 12:41:05 UTC (rev 12119)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-10-02 16:08:49 UTC (rev 12120)
@@ -47,9 +47,9 @@
$modversion['onUpdate'] = 'include/module.php';
$modversion['onUninstall'] = 'include/module.php';
-$modversion['date'] = '2013-09-30';
-$modversion['release_date'] = '2013/09/30';
-$modversion['releasedate'] = '2013-09-30';
+$modversion['date'] = '2013-10-02';
+$modversion['release_date'] = '2013/10/02';
+$modversion['releasedate'] = '2013-10-02';
$modversion['status'] = 'BETA 1';
$modversion['teammembers'] = "Bender, David, FrankBlack, Xpider, M0nty, Mithrandir, Marcan, felix[fx2024], Sudhaker, Jegelstaff";
|
|
From: <dj...@us...> - 2013-10-02 12:41:11
|
Revision: 12119
http://sourceforge.net/p/xoops/svn/12119
Author: djculex
Date: 2013-10-02 12:41:05 +0000 (Wed, 02 Oct 2013)
Log Message:
-----------
wrong RC version
Modified Paths:
--------------
XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt
Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2013-10-02 12:36:30 UTC (rev 12118)
+++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2013-10-02 12:41:05 UTC (rev 12119)
@@ -1,5 +1,5 @@
------------------------------
-Changelog v.1.15 RC 19
+Changelog v.1.15 RC 20
------------------------------
Date 01. October 2013 19:11 Rev: 12114
|
|
From: <dj...@us...> - 2013-10-02 12:36:34
|
Revision: 12118
http://sourceforge.net/p/xoops/svn/12118
Author: djculex
Date: 2013-10-02 12:36:30 +0000 (Wed, 02 Oct 2013)
Log Message:
-----------
Modified Paths:
--------------
XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt
Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2013-10-01 22:49:50 UTC (rev 12117)
+++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2013-10-02 12:36:30 UTC (rev 12118)
@@ -1,4 +1,36 @@
------------------------------
+Changelog v.1.15 RC 19
+------------------------------
+Date 01. October 2013 19:11 Rev: 12114
+
+NEW : When entering admin automaticly rename user avatars set as blank.gif to void.
+NEW : Parsing array from walls in respective classes clearing multible lines of code
+NEW : smallworld_referer to return after various pages
+NEW : Count all msg in wall
+
+Bugfix : Mysql error in ALTER table comments from varchar to text
+Bugfix : School start/stop displayed wrong.
+Bugfix : User avatars displayed void if blank. No shows default gender / no-gender user avatar
+Bugfix : User gallery opening in new tab / window. Now direct to _self instead of _SELF (?)
+Bugfix : Error in smallworld_getAvatarLink($userid, $image); Condition changed from || to &&
+Bugfix : comment_ajax. Condition changed from AND to OR if admin or owner of comment. Permission added to condition correctly.
+Bugfix : In edit profile education start/stop displays correct data (date function not needed in this case).
+Bugfix : In gallery only displays if visitor is a friend or admin.
+Bugfix : Heavy code cleanup -> re-arranging to make use of classes / functions.
+Bugfix : Only allow friends to view profile.
+Bugfix : User posts not showing correctly to friends/followers OR admin.
+Bugfix : jquery.history.js added to code to show hidden iframe in IE correctly.
+Bugfix : After accepting friend request force reload of page to show new friend posts.
+Bugfix : After closing gallery return to refer-page.
+Bugfix : In smallworld.js -> tagging. If @ is followed by /s then close autocomplete indicating email or other. ((this).autocomplete( "close" );)
+Bugfix : When tagging autocomplete is attached after single @ not @@@ (wow strange error)
+Bugfix : Removed test alert() OR console.logs used for testing.
+Bugfix : In friendpage show only gallery menu items for friends.
+Bugfix : Show only wall container if num of messages > 0. [smarty error]
+Bugfix : Rename selector (gave issue with TDMPicture) [mamba]
+
+
+------------------------------
Changelog v.1.15 RC 18
------------------------------
Date: 18. juli 2013 19:29:48: Revision: 11843
@@ -313,8 +345,8 @@
- Danish language files (djculex)
2. februar 2012
-- BUG: User website not added to form (djculex)
-- BUG: Ie adding horizontal scroll to colorbox when not needed (Yeeeeahh IE) (djculex)
+- Bugfix: User website not added to form (djculex)
+- Bugfix: Ie adding horizontal scroll to colorbox when not needed (Yeeeeahh IE) (djculex)
31. januar 2012
- Return only year in education & job fields (djculex)
|