-
Notifications
You must be signed in to change notification settings - Fork 66
Unzip file in ZIP #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Ajtak
wants to merge
232
commits into
rocktronica:master
Choose a base branch
from
Self-Evident:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Used in Cancel_Submit_Buttons($button_label), [Cancel] button. Will be used to in place of $_SERVER["SCRIPT_NAME"] thru-out later.
Copy, Rename, Delete, etc... Primarily adds a [Cancel] button to those pages
In folders with no sub-folders, just keeps some space between path/to/current/folder/ and list of files
If ?p=SomethingInvalid, seemed to only load site root. Now loads with ?p=index
…ser), then don't display login page.
Makes lines a bit shorter, and is a bit easier to read. Well, to me, at least.
Mostly styling changes, but some minor rewording. Removed use of logo.gif. Using styled text now. Message box that confirms success/failure of actions no longer fades out.
Fixed link for "root/path/file.ext" on Edit, Delete, Copy, Rename File pages (It wasn't working after implemented "chdir(DOCUMENT_ROOT)" <b>$filename</b> in $messages Tweaked wording on Other page a bit.
added / after folder names in list/ of/ folders/.
Renamed a few global configurable variables in a more consistant manor with the rest. $EXLUDED_FILES now ignores folders, as it doesn't make sense or work well overall otherwise. On index page, Enter can be used to select/deselect checkboxes. on_Tab_down(): removed superfluous returns. Improved Up/Down arrow key use: "cursor" (ie: focus), can now nav up & down [Move][Copy][Del][x] Changed PU & PD key responses to include [Logo] & [Admin] instead of skipping them. Fixed minor bug where PU (or was it PD?) got "stuck" when in an empty folder and on the "../" row, Check if (FR == FROWS) before if (FR == 0), so AD still passes thru [Admin] And some css: #del_backup Fixed minor typo in $_['edit_caution_02']: "...OneFileCM.'; => "...OneFileCMS.';
Added line numbering to edit page: Line_Numbering() js functions & associated css & html. (This was way more work than anticipated... :) Added Word wrap toggle to edit page. (for editable files only.) (This was way more work than anticipated... :) Added $_['Word_Wrap'], $_['on'], $_['off'] (This was easy.) Added $WORD_WRAP & $TAB_SIZE config variables. (This was easy.) In Display_Messages():Changed ternaries to if/thens. Because simpler. (also fixed a typo) In Countdown(), made $message_box local (was no var, don't know why). In pre_validate_pwun(), a little cleanup. Renamed a few global var's from lowercase to all caps: $MESSAGE, $EXCLUDED_LIST, $ETYPES, $STYPES, $ITYPES, $FTYPES, $FCLASSES css: box-sizing: border-box, plus subsequent changes...
Fixed sporadic directory-won't-display issue: moved initial Sort_and_Show() to end of page. Fixed wrapping & line-numbering issue when toggling between wrap on & wrap off. Added line-numbers to read-only files also. (OFCMS || $too_large_to_edit) Added cookie for word_wrap. (now called line_wrap) Added (bytes) to Size header of file listing, and removed "B" suffix from sizes. In sort_DIRECTORY(), changed ternaries to if/thens. Because simpler. Index Page: "Home" key now just goes to first row (../). On Edit Page, initial textarea cursor location set to start of file. Cursor postion/selection saved when toggling between Wide/Normal views, and Wrap on/off. Edit Page: Word Wrap now called Line Wrap, and switched from radio buttons to just a button to toggle wrap on/off. Tweeked X_box style. Adjusted/simplified some css for the index page buttons & all svg icons. Added $_['Line_Wrap'] to language files.
[Line Wrap on/off] button: added underline on current state (on or off). Removed some css & js from when [Word Wrap *on *off] used radio buttons. Rearranged Edit_Page_scripts a bit in a hopefully more logical way. Set height of both line_numbers & file_editor with css. Removed setSelRange() in lieu of selectionStart/End in Reset_File(). Moved Toggle_Line_Wrap() out of Line_Numbering(), & into "global" scope of Edit_Page_Scripts(). Added some basic validation to $TAB_SIZE & its js conterpart TAB_SIZE. Updated OneFileCMS_structure.txt
[Wide View] / [Normal View] button only available on edit page when $text_editable.
Added if (Toggle_Wrap)... since not available if file not editable.
Wrapped some function calls in "if (File_textarea) {...}" because needed.
Moved some inline events from Index_Page_buttons_top() to Index_Page_events().
Removed: <style>#message_box {min-height: 2em;}</style> from Change_PWUN_Page().
Added file permissions to Directory List: sogw (s(u/g)id/sticky owner group world)
ex: 0644
affected: Create_Table_for_Listing(), Init_Dir_table_rows(), Assemble_Insert_row(), Build_Directory()
changed js array delclarations from New Array() to [].
Removed <head> & <body> tags, as they're superfluous and just clutter things up.
OneFileCMS no longer restricted to public_html. Affected: $DOC_ROOT, $ACCESS_ROOT, $DEFAULT_PATH, and a couple localized $ipath's. Also affected how optional config & laguage files are referenced. Maybe some other stuff too, I forget... Added session path to Admin page. Added "Connected to: [hostname]" to Admin page. Added $_['admin_txt_03'], $_['admin_txt_04'], & $_['must_be_decendant'] to langauge files Added $_['Invalid'] to language files, but not yet used. Because. Added $DEFAULT_PATH config variable, for $ipath if $ipath is not present or is invalid. Added Set_IS_OFCMS(). Removed all usage of $WEB_ROOT. It was based on $DOC_ROOT, which has changed slightly. Changed $DOC_ROOT. Now only defines default folder for $ACCESS_ROOT. Updated OneFileCMS.config.SAMPLE.php Increased $MAX_EDIT_SIZE from 200000 to 250000. And only a couple minor css changes!
Fixed minor bug in $ACCESS_ROOT. (Even if set to root, was unable to acually access root...)
Some prep work for allowing editing of file permissions. Not yet editable.
For js, created E() function for document.getElementById(). Because shorter & easier to read.
document.onkeydown => E("main").onkeydown
Proper-cased common_scripts() to Common_Scripts().
Some css.
Fixed minor issue of not showing site's favicon next to site name. Fixed sort-of minor bug introduced in 3.5.23 on edit page: Wasn't showing images, and couldn't view file by clicking on filename in, Editing: filename
Fixed minor tabindex bug introduced when added file permissions. Check for and attempt to set session_save_path($user_tmp_path). Increased default $PRE_ITERATIONS from 1000 to 10000. Had kept low as IE8 was slow. If IE8 support is needed, it can be changed back. Removed a couple redundant $_[] language values: $_['login_txt_01'] = 'Username:'; $_['login_txt_02'] = 'Password:'; A couple css tweaks.
Removed Rename/Delete/Edit options for readonly files. (previously would simple have generated an error.) Some more prep for eventual option to edit file perms. Some improvement to cursor control feedback (bg colors) handling. (evidently I just discovered onblur & onfocus) Removed $_['edit_txt_04'] (not used) Added $_['edit_txt_05']
ckbox bgcolors for focus & blur are now handled by onfocus & onblur events.
(Instead of the other method - a convoluted buckshot of code...)
Removed a few one-time use vars of elements since E('element_id') is almost as short.
(As opposed to document.getElementById('element_id')...)
On index page, changed from <form> name to id. document.mcdselect => E('mcdselect')
Fixed a couple bugs in keyboard navigation when there's only one item in current diretory.
- Couldn't "arrow up" when in the file row [M][C][D][x][perms] [Filename]
- It was submitting on enter when on checkboxes.
Added ability to edit file permissions:
PHP: Update_File_Permissions()
js: Perms_onkeydown()
Directory_Events()
Validate_and_Post()
Enable_Edit_Perms()
Octal_Input_Only()
Perms_Update_Response()
Post_New_File_Perms()
Removed period at end of value: $_['Update_failed'] = 'Update failed';
Still needs some new langauge $_[] values, but I'll get those next commit.
066e15b to
a028db1
Compare
New language values $_[] values: $_['Permissions_msg_1'], $_['Press_Enter'], $_['Enter_to_edit'] Changed $_['Update_failed'] from 'Update failed - could not save file.' to 'Update failed.' Restored $_['edit_txt_04'] to language files. (Had inadvertently removed it previously.) Added Format_Perms(), in both php & js: [7777] [ugt rwx rwx rwx] (js version not yet used.) Added Insert_mov_del_ckbox() to index page js. (Prep for future improvements.) Added Cancel_Perm_Changes() to index page js. Improved handling of ckbox & permission field events. Cleaned up some inline css.
[Mov], [Del], & [X] now show/hide as needed as perms are changed (owner write bit). Some restructuring/refactoring in: Init_Dir_table_rows(), Insert_mov_del_ckbox(), Assemble_Insert_row(), Build_Directory(), Split Insert_mov_del_ckbox() into Assemble_mdx() & Insert_mdx(). Fixed minor perms bug (if changed perms, then resorted dir list, would show old perms value). Perms_Update_Response() Index_Page_events() - moved some "hard coded" colors to .classes In header, "(on php 5.x.x)" version & phpinfo link now only shows on Admin page. Minor wording change in readme "Limitations" section. Tweaked some class names. And some css.
When focus is in path header, HOME & END now goto ID=path_0 & ID=path_(last) respectively. Otherwise, HOME & END goto f0c.. or f(last)c.. Added file owner & group (when available) to dir list. Removed hsc() of early output messages when updating permissions. $ckbox events are now only assigned in Insert_mdx(). Some misc code improvements in Timeout_Timer(), Create_Table_for_Listing(), & other places. In index page js, variaible row split to frow & drow, depending on use. See Assemble_Insert_row() for description/explanation. Send_directory_data_to_js() simplified & rolled into Index_Page(). Now using (php) json_encode & (js) JSON.parse to send directory data to js. New language values: $_['Group'], $_['User']
Fixed minor bug introduced in 3.6.09: removed unneeded client side JSON.parse of the result of PHP's json_encode($DIRECTORY_DATA). Re-worked the Index page keyboard nav a bit. Fixed issue of stat() errors on dead links. (by using lstat(), of course) Directory list now shows link targets:[ symlinkedfile -> /path/to/linked/file ] Some restructure of Get_DIRECTORY_DATA().
- Switched to php short tags: <?= ?>. Because I felt like it. I wanted to years ago, in the beginning, but my web host was still on some 5.3 version of php, and didn't always have 'em enabled. But now that php is up to v7.something, and most hosts have, at least, php 5.4, it seems like a safe move at this point. If not, oh well!
Show username on Admin page. Now checks if is_writable, Dir list then hides [m] [d][x] for files not writable. Update_File_Permissions() & Edit_Page_...(). New function Get_File_Stats(), used by: Get_DIRECTORY_DATA, Edit_Page_buttons_top(), Edit_Page_form() Enable_Edit_Perms(): added current perms [rwxrwxrwx] to msg.
Tweaked usage of $DOC_ROOT to "server/doc/root/" (no leading "/"). $MESSAGES from System_Setup() no longer reported on Login page, but are reported after login. Minor restructure of Session_Startup(). Improved $ACCESS_ROOT & $DEFAULT_PATH a bit.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, i need function for unzip zip folder here.
Thank YOu